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