public function installHook(string $hook, bool $ask)
    {
        $doIt = true;
        if ($ask) {
            $answer = $this->io->ask('  <info>Install \'' . $hook . '\' hook?</info> <comment>[y,n]</comment> ', 'y');
            $doIt   = IOUtil::answerToBool($answer);
        }

        if ($doIt) {
            $this->writeHookFile($hook);
        }
    }
public function installHook(string $hook, bool $ask)
    {
        $doIt = true;
        if ($ask) {
            $answer = $this->io->ask('  <info>Install \'' . $hook . '\' hook?</info> <comment>[y,n]</comment> ', 'y');
            $doIt   = IOUtil::answerToBool($answer);
        }

        if ($doIt) {
            $this->writeHookFile($hook);
        }
    }
public function installHook ( string $ hook , bool $ ask ) { $ doIt = true ; if ( $ ask ) { $ answer = $ this -> io -> ask ( '  <info>Install \'' . $ hook . '\' hook?</info> <comment>[y,n]</comment> ' , 'y' ) ; $ doIt = IOUtil :: answerToBool ( $ answer ) ; } if ( $ doIt ) { $ this -> writeHookFile ( $ hook ) ; } }
Install given hook

@param string $hook
@param bool   $ask
Install given hook