| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class JsonResponseFormatter implements ResponseFormatterInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var string the Content-Type header for the response |
||
| 15 | */ |
||
| 16 | private string $contentType = 'application/json'; |
||
| 17 | |||
| 18 | private JsonSerializer $jsonSerializer; |
||
| 19 | |||
| 20 | public function __construct() |
||
| 21 | { |
||
| 22 | $this->jsonSerializer = new JsonSerializer(); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function format(WebResponse $webResponse): ResponseInterface |
||
| 32 | } |
||
| 33 | } |
||
| 34 |