| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function format(WebResponse $webResponse): ResponseInterface |
||
| 21 | { |
||
| 22 | $jsonSerializer = new JsonSerializer($this->options); |
||
| 23 | $content = $jsonSerializer->serialize($webResponse->getData()); |
||
| 24 | $response = $webResponse->getResponse(); |
||
| 25 | $response->getBody()->write($content); |
||
| 26 | |||
| 27 | return $response->withHeader('Content-Type', $this->contentType); |
||
| 28 | } |
||
| 35 |