protected function runHook($hook, $dir)
    {
        $code = $this->shellHelper->executeSimple(
            implode("\n", (array) $hook),
            $dir
        );
        if ($code !== 0) {
            $this->output->writeln("<comment>The hook failed with the exit code: $code</comment>");
            return false;
        }

        return true;
    }
protected function runHook($hook, $dir)
    {
        $code = $this->shellHelper->executeSimple(
            implode("\n", (array) $hook),
            $dir
        );
        if ($code !== 0) {
            $this->output->writeln("<comment>The hook failed with the exit code: $code</comment>");
            return false;
        }

        return true;
    }
protected function runHook ( $ hook , $ dir ) { $ code = $ this -> shellHelper -> executeSimple ( implode ( "\n" , ( array ) $ hook ) , $ dir ) ; if ( $ code !== 0 ) { $ this -> output -> writeln ( "<comment>The hook failed with the exit code: $code</comment>" ) ; return false ; } return true ; }
Run a user-defined hook.

@param string|array $hook
@param string       $dir

@return bool
Run a user - defined hook .