PHP code example of sweetchuck / git-hooks

1. Go to this page and download the library: Download sweetchuck/git-hooks library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sweetchuck / git-hooks example snippets




class RoboFile extends \Robo\Tasks
{

    #[\Consolidation\AnnotatedCommand\Attributes\Command(
        name: 'githook:pre-commit',
    )]
    #[\Consolidation\AnnotatedCommand\Attributes\Help(
        description: 'Git "pre-commit" hook callback.',
        hidden: true,
    )]
    public function cmdGitHookPreCommitExecute(): int
    {
        $this->say('The Git pre-commit hook is running');

        return 0;
    }
}