| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4.125 |
| Changes | 5 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 1 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
| 32 | { |
||
| 33 | 1 | \ob_start(); |
|
| 34 | |||
| 35 | 1 | $response = $handler->handle($request); |
|
| 36 | |||
| 37 | 1 | foreach ($response->getHeaders() as $header => $values) { |
|
| 38 | $name = $this->normalize($header); |
||
| 39 | |||
| 40 | foreach ($values as $value) { |
||
| 41 | \header( |
||
| 42 | \sprintf('%s: %s', $name, $value), |
||
| 43 | true, |
||
| 44 | $response->getStatusCode() |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 49 | 1 | \ob_get_flush(); |
|
| 50 | |||
| 51 | 1 | return $response; |
|
| 52 | } |
||
| 67 |