public static function preHooks(Event $event): bool
    {

        $directory = self::getProjectDir($event);
        $io        = $event->getIO();
        $removed   = false;

        foreach (self::$hooks as $hookName) {
            $hook = sprintf(
                '%1$s.git%3$shooks%3$s%2$s',
                $directory,
                $hookName,
                DIRECTORY_SEPARATOR
            );

            if (file_exists($hook)) {
                unlink($hook);
                $removed = true;
            }
        }

        if ($removed) {
            $io->write('<info>Hooks removed!</info>');
        }

        return true;
    }
public static function preHooks(Event $event): bool
    {

        $directory = self::getProjectDir($event);
        $io        = $event->getIO();
        $removed   = false;

        foreach (self::$hooks as $hookName) {
            $hook = sprintf(
                '%1$s.git%3$shooks%3$s%2$s',
                $directory,
                $hookName,
                DIRECTORY_SEPARATOR
            );

            if (file_exists($hook)) {
                unlink($hook);
                $removed = true;
            }
        }

        if ($removed) {
            $io->write('<info>Hooks removed!</info>');
        }

        return true;
    }
public static function preHooks ( Event $ event ) : bool { $ directory = self :: getProjectDir ( $ event ) ; $ io = $ event -> getIO ( ) ; $ removed = false ; foreach ( self :: $ hooks as $ hookName ) { $ hook = sprintf ( '%1$s.git%3$shooks%3$s%2$s' , $ directory , $ hookName , DIRECTORY_SEPARATOR ) ; if ( file_exists ( $ hook ) ) { unlink ( $ hook ) ; $ removed = true ; } } if ( $ removed ) { $ io -> write ( '<info>Hooks removed!</info>' ) ; } return true ; }
Pre hooks.

@param Event $event Composer event.

@return bool
Pre hooks .