<commit_before><?php

namespace Lordjancso\DevelopmentBundle\Composer\Script;

use Composer\Script\Event;

class Hooks
{
    public static function checkHooks(Event $event)
    {
        $io = $event->getIO();
        $gitHook = @file_get_contents(__DIR__.'/../../../.git/hooks/pre-commit');
        $docHook = @file_get_contents(__DIR__.'/../../../docs/hooks/pre-commit');

        $result = true;
        if ($gitHook !== $docHook) {
            $io->write('<error>You, motherfucker, please, set up your hooks!</error>');
            $result = false;
        }

        return $result;
    }
}
<commit_msg>Directory check and error message added<commit_after><?php

namespace Lordjancso\DevelopmentBundle\Composer\Script;

use Composer\Script\Event;

class Hooks
{
    public static function checkHooks(Event $event)
    {
        $pwd = exec('pwd');
        $io = $event->getIO();
        $gitHook = @file_get_contents($pwd.'/.git/hooks/pre-commit');
        $docHook = @file_get_contents(__DIR__.'/../../../docs/hooks/pre-commit');

        if ($gitHook !== $docHook) {
            $io->write('<error>Please set up your hooks!</error>');
            $io->write('<error>rm -rf .git/hooks && ln -s vendor/lordjancso/development-bundle/docs/hooks .git/hooks</error>');

            return false;
        }

        return true;
    }
}

{'fraction_non_alphanumeric': 0.1705310396409873, 'fraction_numerical': 0.0, 'mean_word_length': 2.448453608247423, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2336393', 'n_tokens_mistral': 434, 'n_tokens_neox': 429, 'n_words': 78}