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 a30de3c commit 3b01039
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions application/api/controllers/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ public function getCi()
* Simple helper, which writes data as JSON to the body
*
* @param Response $response
* @param mixed $data
* @param mixed $jsonStyle
* @param array $data
* @param int $jsonStyle
* @return Response
*/
protected function respondWithJson(Response $response, mixed $data, mixed $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 @@ -193,11 +193,11 @@ protected function redirectFromReferer(
* Simple helper, which writes data as JSON to the body
*
* @param Response $response
* @param mixed $data
* @param array $data
* @param int $jsonStyle
* @return Response
*/
protected function respondWithJson(Response $response, mixed $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 3b01039

Please sign in to comment.