Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
15 | 2 | public function process( |
|
16 | ServerRequestInterface $request, |
||
17 | RequestHandlerInterface $handler): ResponseInterface |
||
18 | { |
||
19 | 2 | $response = $handler->handle($request); |
|
20 | 2 | if (null === $this->value) { |
|
21 | 1 | return $response; |
|
22 | } |
||
23 | 1 | return $response->withHeader('x-powered-by', $this->value); |
|
24 | } |
||
26 |
If you suppress an error, we recommend checking for the error condition explicitly: