| Conditions | 4 |
| Paths | 5 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function callCommandEventHooks(ConsoleCommandEvent $event) |
||
| 21 | { |
||
| 22 | $hooks = [ |
||
| 23 | HookManager::PRE_COMMAND_EVENT, |
||
| 24 | HookManager::COMMAND_EVENT, |
||
| 25 | HookManager::POST_COMMAND_EVENT |
||
| 26 | ]; |
||
| 27 | $commandEventHooks = $this->getHooks($hooks); |
||
| 28 | foreach ($commandEventHooks as $commandEvent) { |
||
| 29 | if ($commandEvent instanceof EventDispatcherInterface) { |
||
| 30 | $commandEvent->dispatch($event, ConsoleEvents::COMMAND); |
||
| 31 | } |
||
| 32 | if (is_callable($commandEvent)) { |
||
| 33 | $commandEvent($event); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 | } |
||
| 38 |