| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 55 | 10 | private static function findHandler(Handlers $handlers, Exception $exception): callable |
|
| 56 | { |
||
| 57 | 10 | $handler = $handlers->getAllHandlers()[get_class($exception)] ?? null; |
|
| 58 | |||
| 59 | 10 | if ($handler === null) { |
|
| 60 | 2 | return $handlers->getAllHandlers()[Exception::class]; |
|
| 61 | } |
||
| 62 | |||
| 63 | 8 | return $handler; |
|
| 64 | } |
||
| 66 |