Conditions | 2 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
21 | public function __invoke(ServerRequestInterface $request, callable $next) |
||
22 | { |
||
23 | return resolve($next($request))->then(function (ResponseInterface $response) { |
||
24 | foreach ($this->headers as $header => $value) { |
||
25 | $response = $response->withHeader($header, $value); |
||
26 | } |
||
27 | |||
28 | return resolve($response); |
||
29 | }); |
||
32 |