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