| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Lines | 10 |
| Ratio | 100 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 1 | public function handleRequest(RequestInterface $request, callable $next, callable $first) |
|
| 33 | { |
||
| 34 | 1 | foreach ($this->headers as $header => $headerValue) { |
|
| 35 | 1 | if (!$request->hasHeader($header)) { |
|
| 36 | 1 | $request = $request->withHeader($header, $headerValue); |
|
| 37 | 1 | } |
|
| 38 | 1 | } |
|
| 39 | |||
| 40 | 1 | return $next($request); |
|
| 41 | } |
||
| 42 | } |
||
| 43 |
If you suppress an error, we recommend checking for the error condition explicitly: