Total Complexity | 4 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | class SimpleListener implements ListenerInterface |
||
13 | { |
||
14 | protected $events = []; |
||
15 | |||
16 | /** |
||
17 | * @param EventInterface $event |
||
18 | */ |
||
19 | public function __invoke(EventInterface $event) |
||
20 | { |
||
21 | $this->handle($event); |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * Handle an event. |
||
26 | * |
||
27 | * @param EventInterface $event |
||
28 | * |
||
29 | * @return void |
||
30 | */ |
||
31 | public function handle(EventInterface $event) |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param EventInterface|string $event |
||
38 | * @return bool |
||
39 | */ |
||
40 | public function invoked($event): bool |
||
44 | } |
||
45 | } |
||
46 |