Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
54 | 2 | private static function handleException(Handlers $handlers, Exception $exception): string |
|
55 | { |
||
56 | 2 | $handler = $handlers->getAllHandlers()[get_class($exception)] ?? null; |
|
57 | |||
58 | 2 | if ($handler === null) { |
|
59 | 1 | header('HTTP/1.1 500 Internal Server Error'); |
|
60 | 1 | return ''; |
|
61 | } |
||
62 | |||
63 | 1 | return $handler($exception); |
|
64 | } |
||
66 |