private function createCondition(Config\Condition $config) : ConditionInterface
    {
        if (Util::getExecType($config->getExec()) === 'cli') {
            return new Cli(new Processor(), $config->getExec());
        }

        $class = $config->getExec();
        if (!class_exists($class)) {
            throw new RuntimeException('could not find condition class: ' . $class);
        }
        return new $class(...$config->getArgs());
    }
private function createCondition(Config\Condition $config) : ConditionInterface
    {
        if (Util::getExecType($config->getExec()) === 'cli') {
            return new Cli(new Processor(), $config->getExec());
        }

        $class = $config->getExec();
        if (!class_exists($class)) {
            throw new RuntimeException('could not find condition class: ' . $class);
        }
        return new $class(...$config->getArgs());
    }
private function createCondition ( Config \ Condition $ config ) : ConditionInterface { if ( Util :: getExecType ( $ config -> getExec ( ) ) === 'cli' ) { return new Cli ( new Processor ( ) , $ config -> getExec ( ) ) ; } $ class = $ config -> getExec ( ) ; if ( ! class_exists ( $ class ) ) { throw new RuntimeException ( 'could not find condition class: ' . $ class ) ; } return new $ class ( ... $ config -> getArgs ( ) ) ; }
Return the configured condition

In case of a cli condition it returns an special condition class that deals with
the binary execution with implementing the same interface.

@param  \CaptainHook\App\Config\Condition $config
@return \CaptainHook\App\Hook\Condition
@throws \RuntimeException
Return the configured condition