| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 69 | 2 | public function dispatch(object $event): object |
|
| 70 | { |
||
| 71 | 2 | $listeners = $this->listenerProvider->getListenersForEvent($event); |
|
| 72 | |||
| 73 | 2 | foreach ($listeners as $listener) { |
|
| 74 | 2 | if ($event instanceof StoppableEventInterface && $event->isPropagationStopped()) { |
|
| 75 | 1 | break; |
|
| 76 | } |
||
| 77 | |||
| 78 | 2 | $listener($event); |
|
| 79 | } |
||
| 80 | |||
| 81 | 2 | return $event; |
|
| 82 | } |
||
| 84 |