| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | private function supports(\ReflectionMethod $method, string $eventClass): bool |
||
| 25 | { |
||
| 26 | if ($method->getNumberOfParameters() !== 1) { |
||
| 27 | return false; |
||
| 28 | } |
||
| 29 | |||
| 30 | $paramClass = $method->getParameters()[0]->getClass(); |
||
| 31 | |||
| 32 | if ($paramClass === null) { |
||
| 33 | return false; |
||
| 34 | } |
||
| 35 | |||
| 36 | if (!is_a($eventClass, $paramClass->getName(), true)) { |
||
| 37 | return false; |
||
| 38 | } |
||
| 39 | |||
| 40 | return true; |
||
| 41 | } |
||
| 42 | |||
| 48 |