public function setHook(string $hook) : Editor
    {
        if (!Util::isValid($hook)) {
            throw new Exception\InvalidHookName('Invalid hook name \'' . $hook . '\'');
        }
        $this->hookToEdit = $hook;
        return $this;
    }
public function setHook(string $hook) : Editor
    {
        if (!Util::isValid($hook)) {
            throw new Exception\InvalidHookName('Invalid hook name \'' . $hook . '\'');
        }
        $this->hookToEdit = $hook;
        return $this;
    }
public function setHook ( string $ hook ) : Editor { if ( ! Util :: isValid ( $ hook ) ) { throw new Exception \ InvalidHookName ( 'Invalid hook name \'' . $ hook . '\'' ) ; } $ this -> hookToEdit = $ hook ; return $ this ; }
Set the hook that should be changed

@param  string $hook
@return \CaptainHook\App\Runner\Config\Editor
@throws \CaptainHook\App\Exception\InvalidHookName
Set the hook that should be changed