getHooks($hooks); foreach ($commandEventHooks as $commandEvent) { if ($commandEvent instanceof EventDispatcherInterface) { $commandEvent->dispatch(ConsoleEvents::COMMAND, $event); } if (is_callable($commandEvent)) { $commandEvent($event); } } } }