public function setHook(string $hook) : Hook
    {
        if (!Util::isValid($hook)) {
            throw new \RuntimeException('Invalid hook name');
        }
        $this->hookToExecute = $hook;
        return $this;
    }
public function setHook(string $hook) : Hook
    {
        if (!Util::isValid($hook)) {
            throw new \RuntimeException('Invalid hook name');
        }
        $this->hookToExecute = $hook;
        return $this;
    }
public function setHook ( string $ hook ) : Hook { if ( ! Util :: isValid ( $ hook ) ) { throw new \ RuntimeException ( 'Invalid hook name' ) ; } $ this -> hookToExecute = $ hook ; return $ this ; }
Set the hook to execute

@param  string $hook
@return \CaptainHook\App\Console\Application\Hook
Set the hook to execute