Conditions | 1 |
Paths | 1 |
Total Lines | 5 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
13 | public function generate($model, int $httpStatusCode = 200, array $headers = []) : \Psr\Http\Message\ResponseInterface { |
||
14 | return new \Zend\Diactoros\Response\TextResponse( |
||
15 | $this->hateoas->serialize($model, 'json'), |
||
16 | $httpStatusCode, |
||
17 | $headers + ['Content-Type' => 'application/json'] |
||
18 | ); |
||
20 | } |