Total Complexity | 2 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | abstract class AbstractEventHandler implements EventHandler |
||
19 | { |
||
20 | /** |
||
21 | * {@inheritdoc} |
||
22 | * |
||
23 | * @throws InvalidEventException |
||
24 | */ |
||
25 | final public function handle(Event $event): void |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Get supported event type. |
||
41 | * |
||
42 | * @return string[] |
||
43 | */ |
||
44 | abstract protected function getSupportedEventTypes(): array; |
||
45 | |||
46 | /** |
||
47 | * Handle event. |
||
48 | * |
||
49 | * @param Event $event |
||
50 | */ |
||
51 | abstract protected function handleEvent(Event $event): void; |
||
52 | } |
||
53 |