| Conditions | 6 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function dispatch(object $event): object |
||
| 35 | { |
||
| 36 | $stoppable = $event instanceof StoppableEventInterface; |
||
| 37 | if ($stoppable && $event->isPropagationStopped()) { |
||
| 38 | return $event; |
||
| 39 | } |
||
| 40 | |||
| 41 | foreach ($this->listenerProvider->getListenersForEvent($event) as $listener) { |
||
| 42 | $listener($event); |
||
| 43 | |||
| 44 | // @phpstan-ignore-next-line |
||
| 45 | if ($stoppable && $event->isPropagationStopped()) { |
||
| 46 | break; |
||
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | return $event; |
||
| 51 | } |
||
| 53 |