<commit_before><?php
// Dependency Injection Container configuration
$container = $app->getContainer();

// monolog
$container['logger'] = function ($c) {
    $settings = $c->get('settings')['logger'];
    $logger = new Monolog\Logger($settings['name']);
    $logger->pushProcessor(new Monolog\Processor\UidProcessor());
    $logger->pushHandler(
        new Monolog\Handler\StreamHandler($settings['path'], $settings['level']));
    return $logger;
};

// illuminate capsule
$container['db'] = function ($c) {
    $settings = $c->get('settings')['db'];
    $capsule = new Illuminate\Database\Capsule\Manager();
    $capsule->addConnection($settings);
    $capsule->bootEloquent();
    
    //$capsule->getContainer()->singleton(
    //   Illuminate\Contracts\Debug\ExceptionHandler::class);
    
    return $capsule;
};

// Adding the Illuminate ExceptionHandler to the DI Container
$container->singleton(Illuminate\Contracts\Debug\ExceptionHandler::class);

// opcache magic
$container['cache'] = function ($c) {
    return new FSS\Utilities\Cache($c->get('logger'));
};

// JWT Token Generator
$container['jwt'] = function ($c) {
    return new FSS\Utilities\Token();
};

// DJH juryrigging the Illuminate Manager object to
// be global here, so Model extensions work
$container['db']->setAsGlobal();
<commit_msg>Another Try<commit_after><?php
// Dependency Injection Container configuration
$container = $app->getContainer();

// monolog
$container['logger'] = function ($c) {
    $settings = $c->get('settings')['logger'];
    $logger = new Monolog\Logger($settings['name']);
    $logger->pushProcessor(new Monolog\Processor\UidProcessor());
    $logger->pushHandler(
        new Monolog\Handler\StreamHandler($settings['path'], $settings['level']));
    return $logger;
};

// illuminate capsule
$container['db'] = function ($c) {
    $settings = $c->get('settings')['db'];
    $capsule = new Illuminate\Database\Capsule\Manager();
    $capsule->addConnection($settings);
    $capsule->bootEloquent();
    
    //$capsule->getContainer()->singleton(
    //   Illuminate\Contracts\Debug\ExceptionHandler::class);
    
    return $capsule;
};

// Adding the Illuminate ExceptionHandler to the DI Container
// $container->singleton(Illuminate\Contracts\Debug\ExceptionHandler::class);

// opcache magic
$container['cache'] = function ($c) {
    return new FSS\Utilities\Cache($c->get('logger'));
};

// JWT Token Generator
$container['jwt'] = function ($c) {
    return new FSS\Utilities\Token();
};

// DJH juryrigging the Illuminate Manager object to
// be global here, so Model extensions work
$container['db']->setAsGlobal();

{'fraction_non_alphanumeric': 0.17546524876566655, 'fraction_numerical': 0.0, 'mean_word_length': 4.453416149068323, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '1316665', 'n_tokens_mistral': 772, 'n_tokens_neox': 790, 'n_words': 163}