| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | 9 | public function matches(Throwable $exception): bool |
|
| 23 | { |
||
| 24 | 9 | foreach ($this->exceptions as $exceptionEntry) { |
|
| 25 | 9 | if ($exception::class === $exceptionEntry) { |
|
| 26 | 5 | return true; |
|
| 27 | } |
||
| 28 | |||
| 29 | 4 | if (is_subclass_of($exception::class, $exceptionEntry)) { |
|
| 30 | 3 | return true; |
|
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | 1 | return false; |
|
| 35 | } |
||
| 48 |