| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public static function dispatch(EventDispatcherInterface $eventDispatcher = null, $eventName, BaseEvent $event) { |
||
| 36 | |||
| 37 | if (null === $eventDispatcher || false === $eventDispatcher->hasListeners($eventName)) { |
||
| 38 | return null; |
||
| 39 | } |
||
| 40 | |||
| 41 | if (Kernel::VERSION_ID < 40300) { |
||
| 42 | return $eventDispatcher->dispatch($eventName, $event); |
||
| 43 | } |
||
| 44 | |||
| 45 | return $eventDispatcher->dispatch($event, $eventName); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |