Conditions | 4 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
26 | 4 | public function wrap(\Exception $exception) |
|
27 | { |
||
28 | 4 | if ($exception instanceof ClientException && |
|
29 | 4 | $exception->getResponse() instanceof ResponseInterface && |
|
30 | 4 | $exception->getResponse()->getStatusCode() == 404 |
|
31 | ) { |
||
32 | 1 | return NotFoundException::page(); |
|
33 | } |
||
34 | |||
35 | 3 | return ErrorException::wrap($exception); |
|
36 | } |
||
58 |