<commit_before><?php

use Symfony\Component\HttpFoundation\Response;

//Request::setTrustedProxies(array('127.0.0.1'));

$app->register(new \Shorty\Provider\ShortyServiceProvider());

$app->error(
    function (\Exception $e, $code) use ($app) {
        if ($app['debug']) {
            return;
        }

        // 404.html.twig, or 40x.html, or 4xx.html.twig, or error.html
        $templates = array(
            'errors/' . $code . '.html.twig',
            'errors/' . substr($code, 0, 2) . 'x.html.twig',
            'errors/' . substr($code, 0, 1) . 'xx.html.twig',
            'errors/default.html.twig',
        );

        return new Response(
            $app['twig']->resolveTemplate($templates)->render(array('code' => $code, 'exception' => $e)),
            $code
        );
    }
);<commit_msg>Debugging debug values on dokku.<commit_after><?php

use Symfony\Component\HttpFoundation\Response;

//Request::setTrustedProxies(array('127.0.0.1'));

$app->register(new \Shorty\Provider\ShortyServiceProvider());

$app->error(
    function (\Exception $e, $code) use ($app) {
        var_dump($app);exit;
        if ($app['debug']) {
            return;
        }

        // 404.html.twig, or 40x.html, or 4xx.html.twig, or error.html
        $templates = array(
            'errors/' . $code . '.html.twig',
            'errors/' . substr($code, 0, 2) . 'x.html.twig',
            'errors/' . substr($code, 0, 1) . 'xx.html.twig',
            'errors/default.html.twig',
        );

        return new Response(
            $app['twig']->resolveTemplate($templates)->render(array('code' => $code, 'exception' => $e)),
            $code
        );
    }
);
{'fraction_non_alphanumeric': 0.1906474820143885, 'fraction_numerical': 0.019184652278177457, 'mean_word_length': 2.131332082551595, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1636173', 'n_tokens_mistral': 571, 'n_tokens_neox': 545, 'n_words': 99}