<commit_before><?php

/*
 * This file is part of the Yodler package.
 *
 * (c) aes3xs <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

$autoloadFiles = array(
    __DIR__ . '/../vendor/autoload.php',
    __DIR__ . '/../../../autoload.php'
);

$autoloader = false;
foreach ($autoloadFiles as $autoloadFile) {
    if (file_exists($autoloadFile)) {
        require_once $autoloadFile;
        $autoloader = true;
    }
}

if (!$autoloader) {
    die('vendor/autoload.php could not be found.');
}

\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function($class) {
    return class_exists($class, true);
});

use Aes3xs\Yodler\Kernel;
use Aes3xs\Yodler\Console\Application;
use Symfony\Component\ClassLoader\ClassMapGenerator;
use Symfony\Component\ClassLoader\MapClassLoader;
use Symfony\Component\Console\Input\ArgvInput;

$input = new ArgvInput();
$file = $input->getParameterOption(['--file'], 'deploy.yml');

$kernel = new Kernel($file);
$kernel->boot();

foreach ($kernel->getContainer()->getParameter('autoload') as $dir) {
    $map = ClassMapGenerator::createMap($dir);
    $map_loader = new MapClassLoader($map);
    $map_loader->register();<commit_msg>Fix to not to search autoload classes recursively<commit_after><?php

/*
 * This file is part of the Yodler package.
 *
 * (c) aes3xs <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

$autoloadFiles = array(
    __DIR__ . '/../vendor/autoload.php',
    __DIR__ . '/../../../autoload.php'
);

$autoloader = false;
foreach ($autoloadFiles as $autoloadFile) {
    if (file_exists($autoloadFile)) {
        require_once $autoloadFile;
        $autoloader = true;
    }
}

if (!$autoloader) {
    die('vendor/autoload.php could not be found.');
}

\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function($class) {
    return class_exists($class, true);
});

use Aes3xs\Yodler\Kernel;
use Aes3xs\Yodler\Console\Application;
use Symfony\Component\ClassLoader\ClassMapGenerator;
use Symfony\Component\ClassLoader\MapClassLoader;
use Symfony\Component\Console\Input\ArgvInput;

$input = new ArgvInput();
$file = $input->getParameterOption(['--file'], 'deploy.yml');

$kernel = new Kernel($file);
$kernel->boot();

foreach ($kernel->getContainer()->getParameter('autoload') as $dir) {
    $map = ClassMapGenerator::createMap(new \RecursiveDirectoryIterator($dir));
    $map_loader = new MapClassLoader($map);
    $map_loader->register();
{'fraction_non_alphanumeric': 0.15216558068225375, 'fraction_numerical': 0.0022997316979685703, 'mean_word_length': 4.37037037037037, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '2301055', 'n_tokens_mistral': 855, 'n_tokens_neox': 856, 'n_words': 187}