Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4.0466 |
Changes | 0 |
1 | <?php |
||
20 | 120 | public function dispatch(object $event): object |
|
21 | { |
||
22 | /** @var callable $listener */ |
||
23 | 120 | foreach ($this->listenerProvider->getListenersForEvent($event) as $listener) { |
|
24 | 120 | if ($event instanceof StoppableEventInterface && $event->isPropagationStopped()) { |
|
25 | return $event; |
||
26 | } |
||
27 | |||
28 | 120 | $e = $event; |
|
29 | 120 | $listener($e); |
|
30 | } |
||
31 | |||
32 | 120 | return $event; |
|
33 | } |
||
35 |