<commit_before><?php
/**
 * Defines the environment config
 */
use RDev\Applications\Environments\Environment;
use RDev\Applications\Environments\EnvironmentDetector;
use RDev\Applications\Environments\Hosts\Host;
use RDev\Applications\Environments\Hosts\HostRegistry;

/**
 * ----------------------------------------------------------
 * Create the environment registry
 * ----------------------------------------------------------
 */
$detector = new EnvironmentDetector();
$registry = new HostRegistry();
$registry->registerHost("production", [
    // Add any production hosts here
    new Host("#^.*$#", true)
]);
$registry->registerHost("staging", [
    // Add any staging hosts here
]);
$registry->registerHost("testing", [
    // Add any testing hosts here
]);
$registry->registerHost("development", [
    // Add any development hosts here
]);
$environmentName = $detector->detect($registry);
$environment = new Environment($environmentName);

/**
 * ----------------------------------------------------------
 * Load environment variables for non-production environments
 * ----------------------------------------------------------
 *
 * Note:  For performance in production, it's highly suggested
 * you set environment variables on the server itself
 */
if($environmentName != "production")
{
    foreach(glob(__DIR__ . "/environment/.env.*.php") as $environmentFile)
    {
        if(basename($environmentFile) != ".env.example.php")
        {
            require $environmentFile;
        }
    }
}

return $environment;<commit_msg>Updated to work with latest RDev environment<commit_after><?php
/**
 * Defines the environment config
 */
use RDev\Applications\Environments\Environment;
use RDev\Applications\Environments\EnvironmentDetector;
use RDev\Applications\Environments\Host;

/**
 * ----------------------------------------------------------
 * Create the environment registry
 * ----------------------------------------------------------
 */
$detector = new EnvironmentDetector();
$detector->registerHost("production", [
    // Add any production hosts here
    new Host("#^.*$#", true)
]);
$detector->registerHost("staging", [
    // Add any staging hosts here
]);
$detector->registerHost("testing", [
    // Add any testing hosts here
]);
$detector->registerHost("development", [
    // Add any development hosts here
]);
$environmentName = $detector->detect();
$environment = new Environment($environmentName);

/**
 * ----------------------------------------------------------
 * Load environment variables for non-production environments
 * ----------------------------------------------------------
 *
 * Note:  For performance in production, it's highly suggested
 * you set environment variables on the server itself
 */
if($environmentName != "production")
{
    foreach(glob(__DIR__ . "/environment/.env.*.php") as $environmentFile)
    {
        if(basename($environmentFile) != ".env.example.php")
        {
            require $environmentFile;
        }
    }
}

return $environment;
{'fraction_non_alphanumeric': 0.27095064590924145, 'fraction_numerical': 0.0, 'mean_word_length': 2.069105691056911, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '7355353', 'n_tokens_mistral': 709, 'n_tokens_neox': 689, 'n_words': 178}