Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
24 | 6 | protected function getVarValue(Request $request, Response|null $response, ?\Throwable $exception): string |
|
25 | { |
||
26 | 6 | if (null !== $response) { |
|
27 | 3 | return (string) $response->getStatusCode(); |
|
28 | } |
||
29 | |||
30 | 3 | if ($exception instanceof \Throwable) { |
|
31 | 2 | return (string) $exception->getCode(); |
|
32 | } |
||
33 | |||
34 | 1 | return '500'; |
|
35 | } |
||
42 |