<commit_before><?php

namespace Nip\Application\Bootstrap\Bootstrapers;

use Nip\Application;
use Nip\Debug\Debug;
use Nip\Debug\ErrorHandler;

/**
 * Class HandleExceptions
 * @package Nip\Application\Bootstrap\Bootstrapers
 */
class HandleExceptions extends AbstractBootstraper
{
    /**
     * Bootstrap the given application.
     *
     * @param Application $app
     * @return void
     */
    public function bootstrap(Application $app)
    {
        $this->setApp($app);

        error_reporting(-1);

        if ($app['config.debug']) {
            Debug::enable();
        } else {
            Debug::enable(-1, false);
        }

        $handler = set_error_handler('var_dump');
        $handler = is_array($handler) ? $handler[0] : null;
        restore_error_handler();

        if ($handler instanceof ErrorHandler) {
            $app->getContainer()->share(ErrorHandler::class, $handler);
        }
    }
<commit_msg>update logger<commit_after><?php

namespace Nip\Application\Bootstrap\Bootstrapers;

use Nip\Application;
use Nip\Debug\Debug;
use Nip\Debug\ErrorHandler;

/**
 * Class HandleExceptions
 * @package Nip\Application\Bootstrap\Bootstrapers
 */
class HandleExceptions extends AbstractBootstraper
{
    /**
     * Bootstrap the given application.
     *
     * @param Application $app
     * @return void
     */
    public function bootstrap(Application $app)
    {
        $this->setApp($app);

        error_reporting(-1);

        if (config('app.debug')) {
            Debug::enable();
        } else {
            Debug::enable(-1, false);
        }

        $handler = set_error_handler('var_dump');
        $handler = is_array($handler) ? $handler[0] : null;
        restore_error_handler();

        if ($handler instanceof ErrorHandler) {
            $app->getContainer()->share(ErrorHandler::class, $handler);
        }
    }
{'fraction_non_alphanumeric': 0.1303648068669528, 'fraction_numerical': 0.003218884120171674, 'mean_word_length': 2.538899430740038, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '3630838', 'n_tokens_mistral': 543, 'n_tokens_neox': 530, 'n_words': 103}