Conditions | 2 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
23 | 1 | public function __invoke(ServerRequestInterface $request, callable $next): PromiseInterface |
|
24 | 1 | { |
|
25 | 1 | return resolve($next($request))->then(function (ResponseInterface $response): ResponseInterface { |
|
26 | foreach ($this->headers as $header) { |
||
27 | $response = $response->withHeader($header->name(), $header->contents()); |
||
28 | 1 | } |
|
29 | 1 | ||
30 | return $response; |
||
31 | }); |
||
34 |