<commit_before><?php
    /**
     * PHP7 Phalcon Core Library
     *
     * @author Phoenix <<EMAIL>>
     * @license http://www.opensource.org/licenses/mit-license.html MIT License
     * @copyright 2016 Twister's Fury
     */

    namespace TwistersFury\Phalcon\Shared;

    use Phalcon\Di;
    use Phalcon\Di\FactoryDefault;
    use Phalcon\Events\Event;
    use Phalcon\Loader;
    use TwistersFury\Phalcon\Shared\Helpers\Defines;

    //Let Phalcon Handle Auto-Loading
    (new Loader())->registerNamespaces(
        [
            'TwistersFury\Phalcon\Shared' => __DIR__
        ]
    )->register(true);


    if (!Di::getDefault()) {
        Di::setDefault((new FactoryDefault()));
    }

    (function() {
        /** @var \Phalcon\Events\Manager $eventsManager */
        $eventsManager = Di::getDefault()->get('eventsManager');

        $eventsManager->attach('twistersfury:static-defines', function(Event $event, Defines $definesHelper) {
            $definesHelper->define('TF_DEBUG_MODE_DISABLED', 0)
                ->define('TF_DEBUG_MODE_TESTING' , 1);
        });

        $eventsManager->attach('twistersfury:dynamic-defines', function(Event $event, Defines $definesHelper) {
            $definesHelper->define(
                'TF_SHARED_SOURCE',
                __DIR__
            )->define(
                'TF_SHARED_PROJECT',
                realpath(__DIR__ . '/..')
            )->define(
                'TF_SHARED_TESTS',
                realpath(__DIR__ . '/../tests/unit')
            )->define('TF_APP_ROOT', function() {
                $isComposer = strstr(__DIR__, 'vendor') !== false;

                return $isComposer ? __DIR__ . '/../../../app' : __DIR__ . '/..';
            })->define('TF_DEBUG_MODE', getenv('TF_DEBUG_MODE') ?: TF_DEBUG_MODE_DISABLED);
        }, -1000);

        $eventsManager->fire('twistersfury:static-defines', Di::getDefault()->get(Defines::class));<commit_msg>Documentation Change<commit_after><?php
    /**
     * PHP7 Phalcon Core Library
     *
     * @author Phoenix <<EMAIL>>
     * @license http://www.opensource.org/licenses/mit-license.html MIT License
     * @copyright 2016 Twister's Fury
     */

    namespace TwistersFury\Phalcon\Shared;

    use Phalcon\Di;
    use Phalcon\Di\FactoryDefault;
    use Phalcon\Events\Event;
    use Phalcon\Loader;
    use TwistersFury\Phalcon\Shared\Helpers\Defines;

    //Let Phalcon Handle Auto-Loading
    (new Loader())->registerNamespaces(
        [
            'TwistersFury\Phalcon\Shared' => __DIR__
        ]
    )->register(true);


    if (!Di::getDefault()) {
        Di::setDefault((new FactoryDefault()));
    }

    (function() {
        /** @var \Phalcon\Events\Manager $eventsManager */
        $eventsManager = Di::getDefault()->get('eventsManager');

        $eventsManager->attach('twistersfury:static-defines', function(Event $event, Defines $definesHelper) {
            $definesHelper->define('TF_DEBUG_MODE_DISABLED', 0)
                ->define('TF_DEBUG_MODE_TESTING' , 1);
        });

        $eventsManager->attach('twistersfury:dynamic-defines', function(Event $event, Defines $definesHelper) {
            $definesHelper->define(
                'TF_SHARED_SOURCE',
                __DIR__
            )->define(
                'TF_SHARED_PROJECT',
                realpath(__DIR__ . '/..')
            )->define(
                'TF_SHARED_TESTS',
                realpath(__DIR__ . '/../tests/unit')
            )->define('TF_APP_ROOT', function() {
                $isComposer = strstr(__DIR__, 'vendor') !== false;

                return $isComposer ? __DIR__ . '/../../../app' : __DIR__ . '/..';
            })->define('TF_DEBUG_MODE', getenv('TF_DEBUG_MODE') ?: TF_DEBUG_MODE_DISABLED);
        }, -1000); //Setting Priority Low So This Runs Last

        $eventsManager->fire('twistersfury:static-defines', Di::getDefault()->get(Defines::class));
{'fraction_non_alphanumeric': 0.15076923076923077, 'fraction_numerical': 0.0056410256410256415, 'mean_word_length': 2.2481265611990007, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6479926', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1171, 'n_words': 183}