Conditions | 1 |
Paths | 1 |
Total Lines | 6 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function render(ResponseInterface $response, $statusCode = 200, array $data = []) |
||
28 | { |
||
29 | $newResponse = $response->withHeader('Content-Type', 'application/json'); |
||
30 | $newResponse = $newResponse->withStatus($statusCode); |
||
31 | $newResponse->getBody()->write(json_encode($data)); |
||
32 | return $newResponse; |
||
33 | } |
||
38 |