Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
Beutlin committed Apr 11, 2023
1 parent 3b01039 commit eeb2251
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions application/api/controllers/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ public function getCi()
*
* @param Response $response
* @param array $data
* @param int $jsonStyle
* @param ?int $jsonStyle
* @return Response
*/
protected function respondWithJson(Response $response, array $data, int $jsonStyle): Response
protected function respondWithJson(Response $response, array $data, ?int $jsonStyle): Response
{
$jsonStyle = $jsonStyle ?? 0;
$response->getBody()->write(json_encode($data, $jsonStyle));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ protected function redirectFromReferer(
*
* @param Response $response
* @param array $data
* @param int $jsonStyle
* @param ?int $jsonStyle
* @return Response
*/
protected function respondWithJson(Response $response, array $data, int $jsonStyle = 0): Response
protected function respondWithJson(Response $response, array $data, ?int $jsonStyle = 0): Response
{
$response->getBody()->write(json_encode($data, $jsonStyle));
return $response->withHeader('Content-Type', 'application/json');
Expand Down

0 comments on commit eeb2251

Please sign in to comment.