<commit_before><?php
require '../bootstrap.php';

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

// Initialize out Silex app and let's do it
$app = new Silex\Application();

// Register our session provider
$app->register(new Silex\Provider\SessionServiceProvider());
$app['session']->start();

// Register the Twig provider
$app->register(new Silex\Provider\TwigServiceProvider());
$app['twig'] = $twig;

// Add our DB to the p
$app['db'] = new \PDO(
    $container['database.dsn'],
    $container['database.user'],
    $container['database.password']
); 

// We're using Sentry, so make it available to app
$app['sentry'] = $app->share(function() use ($app) {
    $hasher = new Cartalyst\Sentry\Hashing\NativeHasher;
    $userProvider = new Cartalyst\Sentry\Users\Eloquent\Provider($hasher);
    $groupProvider = new Cartalyst\Sentry\Groups\Eloquent\Provider;
    $throttleProvider = new Cartalyst\Sentry\Throttling\Eloquent\Provider($userProvider);
    $session = new Cartalyst\Sentry\Sessions\NativeSession;
    $cookie = new Cartalyst\Sentry\Cookies\NativeCookie(array());

    $sentry = new Cartalyst\Sentry\Sentry(
        $userProvider,
        $groupProvider,
        $throttleProvider,
        $session,
        $cookie
    );

    Cartalyst\Sentry\Facades\Native\Sentry::setupDatabaseResolver($app['db']);

    return $sentry;
});

// Configure our flash messages functionality
$app->before(function() use ($app) {
    $flash = $app['session']->get('flash');
    $app['session']->set('flash', null);

    if (!empty($flash)) {
        $app['twig']->addGlobal('flash', $flash);
    }
});

// Configure our routes
$app->get('/', function() use($app) {
    $template = $app['twig']->loadTemplate('home.twig');
    return $template->render(array());
});
$app->get('/dashboard', 'OpenCFP\DashboardController::indexAction');
$app->get('/talk/edit/{id}', 'OpenCFP\TalkController::editAction');
$app->post('/talk/create', 'OpenCFP\TalkController::createAction');
$app->get('/login', 'OpenCFP\LoginController::indexAction');
$app->post('/login', 'OpenCFP\LoginController::processAction');
$app->get('/signup', 'OpenCFP\SignupController::indexAction');
$app->post('/signup', 'OpenCFP\SignupController::processAction');

$app['debug'] = true;
$app->run();<commit_msg>Added route for /logut<commit_after><?php
require '../bootstrap.php';

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

// Initialize out Silex app and let's do it
$app = new Silex\Application();

// Register our session provider
$app->register(new Silex\Provider\SessionServiceProvider());
$app['session']->start();

// Register the Twig provider
$app->register(new Silex\Provider\TwigServiceProvider());
$app['twig'] = $twig;

// Add our DB to the p
$app['db'] = new \PDO(
    $container['database.dsn'],
    $container['database.user'],
    $container['database.password']
); 

// We're using Sentry, so make it available to app
$app['sentry'] = $app->share(function() use ($app) {
    $hasher = new Cartalyst\Sentry\Hashing\NativeHasher;
    $userProvider = new Cartalyst\Sentry\Users\Eloquent\Provider($hasher);
    $groupProvider = new Cartalyst\Sentry\Groups\Eloquent\Provider;
    $throttleProvider = new Cartalyst\Sentry\Throttling\Eloquent\Provider($userProvider);
    $session = new Cartalyst\Sentry\Sessions\NativeSession;
    $cookie = new Cartalyst\Sentry\Cookies\NativeCookie(array());

    $sentry = new Cartalyst\Sentry\Sentry(
        $userProvider,
        $groupProvider,
        $throttleProvider,
        $session,
        $cookie
    );

    Cartalyst\Sentry\Facades\Native\Sentry::setupDatabaseResolver($app['db']);

    return $sentry;
});

// Configure our flash messages functionality
$app->before(function() use ($app) {
    $flash = $app['session']->get('flash');
    $app['session']->set('flash', null);

    if (!empty($flash)) {
        $app['twig']->addGlobal('flash', $flash);
    }
});

// Configure our routes
$app->get('/', function() use($app) {
    $template = $app['twig']->loadTemplate('home.twig');
    return $template->render(array());
});
$app->get('/dashboard', 'OpenCFP\DashboardController::indexAction');
$app->get('/talk/edit/{id}', 'OpenCFP\TalkController::editAction');
$app->post('/talk/create', 'OpenCFP\TalkController::createAction');
$app->get('/login', 'OpenCFP\LoginController::indexAction');
$app->post('/login', 'OpenCFP\LoginController::processAction');
$app->get('/logout', 'OpenCFP\LoginController::outAction');
$app->get('/signup', 'OpenCFP\SignupController::indexAction');
$app->post('/signup', 'OpenCFP\SignupController::processAction');

$app['debug'] = true;
$app->run();
{'fraction_non_alphanumeric': 0.1890568447945497, 'fraction_numerical': 0.0, 'mean_word_length': 4.85785536159601, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 42, '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': '1945291', 'n_tokens_mistral': 1528, 'n_tokens_neox': 1517, 'n_words': 264}