<commit_before><?php

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

use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

$app = new Application();

/**
 * Cache
 */
$app['cache.path'] = __DIR__ . '/cache';
$app['http_cache.cache_dir'] = $app['cache.path'] . '/http';

/**
 * Service providers
 */
$app->register(new Silex\Provider\HttpCacheServiceProvider());
$app->register(new Silex\Provider\SessionServiceProvider());
$app->register(new Igorw\Silex\ConfigServiceProvider( __DIR__ . "/resources/config/settings.yml"));
$app->register(new Silex\Provider\UrlGeneratorServiceProvider());

/**
 * Locale
 */
$app['locale'] = 'en';
$app['session.default_locale'] = $app['locale'];

$app->register(new Silex\Provider\TranslationServiceProvider(), array(
    'locale_fallback' => $app['locale'],
    'translator.domains' => array(
        'messages' => require __DIR__ . '/resources/locales/translations.php',
    ),
));
$app['languages'] = array_keys($app['translator.domains']['messages']);

/**
 * Twig registration
 */
$app->register(new Silex\Provider\TwigServiceProvider(), array(
    'twig.path' => __DIR__ . '/views',<commit_msg>Make en as default locale if not set in settings.yml<commit_after><?php

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

use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

$app = new Application();

/**
 * Cache
 */
$app['cache.path'] = __DIR__ . '/cache';
$app['http_cache.cache_dir'] = $app['cache.path'] . '/http';

/**
 * Service providers
 */
$app->register(new Silex\Provider\HttpCacheServiceProvider());
$app->register(new Silex\Provider\SessionServiceProvider());
$app->register(new Igorw\Silex\ConfigServiceProvider( __DIR__ . "/resources/config/settings.yml"));
$app->register(new Silex\Provider\UrlGeneratorServiceProvider());

/**
 * Locale
 */
$app['locale'] = isset($app['defaultLocale']) ? $app['defaultLocale'] : 'en';
$app['session.default_locale'] = $app['locale'];

$app->register(new Silex\Provider\TranslationServiceProvider(), array(
    'locale_fallback' => $app['locale'],
    'translator.domains' => array(
        'messages' => require __DIR__ . '/resources/locales/translations.php',
    ),
));
$app['languages'] = array_keys($app['translator.domains']['messages']);

/**
 * Twig registration
 */
$app->register(new Silex\Provider\TwigServiceProvider(), array(
    'twig.path' => __DIR__ . '/views',
{'fraction_non_alphanumeric': 0.17801966292134833, 'fraction_numerical': 0.0, 'mean_word_length': 5.735224586288416, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '1721121', 'n_tokens_mistral': 890, 'n_tokens_neox': 885, 'n_words': 138}