| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | 2 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) |
|
| 27 | { |
||
| 28 | 2 | if (false === strpos($response->getHeaderLine('Content-Type'), 'application/json')) { |
|
| 29 | 1 | return $next($request, $response); |
|
| 30 | } |
||
| 31 | |||
| 32 | 1 | return $next($request, $response->withHeader('Content-Type', $this->contentType)); |
|
| 33 | } |
||
| 34 | } |
||
| 35 |