Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | final public function handle(Event $event): void |
||
26 | { |
||
27 | if (!\in_array($event->getEventType(), $this->getSupportedEventTypes(), true)) { |
||
28 | throw new InvalidEventException(\sprintf( |
||
29 | 'Event handler "%s" can only handle events of: "%s", "%s" given.', |
||
30 | static::class, |
||
31 | \implode('"or "', $this->getSupportedEventTypes()), |
||
32 | \get_class($event) |
||
33 | )); |
||
34 | } |
||
35 | |||
36 | $this->handleEvent($event); |
||
37 | } |
||
53 |