<commit_before><?php
// Here we define some constants Parable has a use of
if (!defined("DS")) {
    define("DS", DIRECTORY_SEPARATOR);
}
if (!defined("BASEDIR")) {
    define("BASEDIR", realpath(__DIR__ . DS . ".." . DS . ".." . DS . ".." . DS . ".."));
}
if (!defined("APP_CONTEXT")) {
    if (PHP_SAPI === "cli") {
        define("APP_CONTEXT", "console");
    } else {
        define("APP_CONTEXT", "web");
    }
}<commit_msg>Make defines.php more readable, now that it's expanding.<commit_after><?php
/**
 * DIRECTORY_SEPARATOR is just too long -- shorten it!
 */
if (!defined("DS")) {
    define("DS", DIRECTORY_SEPARATOR);
}

/**
 * Relative paths are hell. Make sure we can work from a reliable base directory.
 */
if (!defined("BASEDIR")) {
    define("BASEDIR", realpath(__DIR__ . DS . ".." . DS . ".." . DS . ".." . DS . ".."));
}

/**
 * We want to be able to know whether we're in web or console context.
 */
if (!defined("APP_CONTEXT")) {
    if (PHP_SAPI === "cli") {
        define("APP_CONTEXT", "console");
    } else {
        define("APP_CONTEXT", "web");
    }
}

/**
 * We want to allow packages to register themselves
 */
if (!function_exists("register_parable_package"))
{
    function register_parable_package($packageName)
    {
        \Parable\DI\Container::get(\Parable\Framework\Package\PackageManager::class)->addPackage($packageName);
    }
}
{'fraction_non_alphanumeric': 0.19213973799126638, 'fraction_numerical': 0.0, 'mean_word_length': 3.1167664670658684, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '298147', 'n_tokens_mistral': 449, 'n_tokens_neox': 443, 'n_words': 111}