Skip to content

Commit eeb2251

Browse files
committed
fix types
1 parent 3b01039 commit eeb2251

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: application/api/controllers/ApiController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ public function getCi()
7777
*
7878
* @param Response $response
7979
* @param array $data
80-
* @param int $jsonStyle
80+
* @param ?int $jsonStyle
8181
* @return Response
8282
*/
83-
protected function respondWithJson(Response $response, array $data, int $jsonStyle): Response
83+
protected function respondWithJson(Response $response, array $data, ?int $jsonStyle): Response
8484
{
8585
$jsonStyle = $jsonStyle ?? 0;
8686
$response->getBody()->write(json_encode($data, $jsonStyle));

Diff for: application/front/controller/visitor/ShaarliVisitorController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ protected function redirectFromReferer(
194194
*
195195
* @param Response $response
196196
* @param array $data
197-
* @param int $jsonStyle
197+
* @param ?int $jsonStyle
198198
* @return Response
199199
*/
200-
protected function respondWithJson(Response $response, array $data, int $jsonStyle = 0): Response
200+
protected function respondWithJson(Response $response, array $data, ?int $jsonStyle = 0): Response
201201
{
202202
$response->getBody()->write(json_encode($data, $jsonStyle));
203203
return $response->withHeader('Content-Type', 'application/json');

0 commit comments

Comments
 (0)