<commit_before><?php

/**
 * 
 * @author  <NAME>
 * @license See LICENSE in source root
 * @version 0.1
 * @since   0.1
 */

require_once __DIR__ . '/vendor/autoload.php';

use Labrador\Bootstrap\FrontControllerBootstrap;

$masterConfig = include __DIR__ . '/config/master_config.php';

/** @var Auryn\Provider $provider */
/** @var Labrador\Application $app */
/** @var Symfony\Component\HttpFoundation\Request $request */
$provider = (new FrontControllerBootstrap($masterConfig))->run();
$app = $provider->make('Labrador\\Application');
$request = $provider->make('Symfony\\Component\\HttpFoundation\\Request');
<commit_msg>setting basic error and exception handler<commit_after><?php

/**
 * 
 * @author  <NAME>
 * @license See LICENSE in source root
 * @version 0.1
 * @since   0.1
 */

set_error_handler(function($severity, $msg, $file, $line) {
    throw new ErrorException($msg, 0, $severity, $file, $line);
});
set_exception_handler(function(Exception $exception) {
    http_response_code(500);
    $msg = htmlspecialchars($exception->getMessage());
    echo <<<HTML
<!DOCTYPE html>
<html>
    <head>
        <title>Labrador Error</title>
    </head>
    <body>
        <h1>Internal Server Error</h1>
        <p>An error was encountered processing your request. Please contact the administrator.</p>
        <p>The error message was: {$msg}</p>
    </body>
</html>
HTML;
    exit;
});

require_once __DIR__ . '/vendor/autoload.php';

use Labrador\Bootstrap\FrontControllerBootstrap;

$masterConfig = include __DIR__ . '/config/master_config.php';

/** @var Auryn\Provider $provider */
/** @var Labrador\Application $app */
/** @var Symfony\Component\HttpFoundation\Request $request */
$provider = (new FrontControllerBootstrap($masterConfig))->run();
$app = $provider->make('Labrador\\Application');
$request = $provider->make('Symfony\\Component\\HttpFoundation\\Request');

{'fraction_non_alphanumeric': 0.1651619755708975, 'fraction_numerical': 0.007434944237918215, 'mean_word_length': 4.307042253521127, 'pattern_counts': {'":': 0, '<': 25, '<?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': '2687558', 'n_tokens_mistral': 599, 'n_tokens_neox': 585, 'n_words': 130}