protected function getEngineCommand(CommandHookInterface $command_hook)
    {
        $method = $command_hook->getCommand();
        $engine = $this->getEngineInstance();

        if (!method_exists($engine, $method)) {
            throw new CommandHookRuntimeException(
                sprintf("The %s method doesn't exist on the environment engine.", $method)
            );
        }
        $args = array_merge(
            $command_hook->getOptions(),
            $command_hook->getArguments()
        );

        return call_user_func_array([$engine, $method], [$args]);
    }