<commit_before><?php

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

function check_or_create_json_dir(\PickleWeb\Application $app)
{
    if (is_dir($app->config('json_path')) === false) {
        mkdir($app->config('json_path'), 0777, true);
        mkdir($app->config('json_path') . 'users/github', 0777, true);
        mkdir($app->config('json_path') . 'extensions', 0777, true);
    }
}

$app = new \PickleWeb\Application(
    [
        'view'      => new \PickleWeb\View\Twig(),
        'json_path' => __DIR__ . '/json/',
        'cache_dir' => __DIR__ . '/../cache-dir/',
    ]
);

/**
 * Declare service
 *
 * example :
 *
 * $app->container->singleton('authorization.oauth2.github', function ($container) {
 *     return new \PickleWeb\Action\AuthAction('github');
 * });
 */


/**
 * Declare controllers if you need to inject dependancies in it
 *
 * example :
 *
 * $app->container->singleton('PickleWeb\Controller\AuthController', function ($container) {
 *     return new PickleWeb\Controller\AuthController($container['authorization.oauth2.github']);
 * });
 */

/**
 * Declare routes
 */

// Default
$app->get('/', 'PickleWeb\Controller\DefaultController:indexAction');

// Authorization
$app->get('/login', 'PickleWeb\Controller\AuthController:loginAction');
$app->get('/logout', 'PickleWeb\Controller\AuthController:loginAction');
$app->get('/login/:provider', 'PickleWeb\Controller\AuthController:loginWithProviderAction');

// Packages
$app->getSecured('/package/register', 'PickleWeb\Controller\PackageController:packageAction');
$app->postSecured('/package/register', 'PickleWeb\Controller\PackageController:registerPackageAction');
$app->get('/package/:package', 'PickleWeb\Controller\PackageController:viewPackageAction');

// Users
$app->getSecured('/profile', 'PickleWeb\Controller\UserController:profileAction');
$app->get('/account(/:name)', 'PickleWeb\Controller\UserController:viewAccountAction');

/*
 * Run application
 */
$app->run();<commit_msg>fix action name<commit_after><?php

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

function check_or_create_json_dir(\PickleWeb\Application $app)
{
    if (is_dir($app->config('json_path')) === false) {
        mkdir($app->config('json_path'), 0777, true);
        mkdir($app->config('json_path') . 'users/github', 0777, true);
        mkdir($app->config('json_path') . 'extensions', 0777, true);
    }
}

$app = new \PickleWeb\Application(
    [
        'view'      => new \PickleWeb\View\Twig(),
        'json_path' => __DIR__ . '/json/',
        'cache_dir' => __DIR__ . '/../cache-dir/',
    ]
);

/**
 * Declare service
 *
 * example :
 *
 * $app->container->singleton('authorization.oauth2.github', function ($container) {
 *     return new \PickleWeb\Action\AuthAction('github');
 * });
 */


/**
 * Declare controllers if you need to inject dependancies in it
 *
 * example :
 *
 * $app->container->singleton('PickleWeb\Controller\AuthController', function ($container) {
 *     return new PickleWeb\Controller\AuthController($container['authorization.oauth2.github']);
 * });
 */

/**
 * Declare routes
 */

// Default
$app->get('/', 'PickleWeb\Controller\DefaultController:indexAction');

// Authorization
$app->get('/login', 'PickleWeb\Controller\AuthController:loginAction');
$app->get('/logout', 'PickleWeb\Controller\AuthController:loginAction');
$app->get('/login/:provider', 'PickleWeb\Controller\AuthController:loginWithProviderAction');

// Packages
$app->getSecured('/package/register', 'PickleWeb\Controller\PackageController:registerAction');
$app->postSecured('/package/register', 'PickleWeb\Controller\PackageController:registerPackageAction');
$app->get('/package/:package', 'PickleWeb\Controller\PackageController:viewPackageAction');

// Users
$app->getSecured('/profile', 'PickleWeb\Controller\UserController:profileAction');
$app->get('/account(/:name)', 'PickleWeb\Controller\UserController:viewAccountAction');

/*
 * Run application
 */
$app->run();
{'fraction_non_alphanumeric': 0.19013906447534767, 'fraction_numerical': 0.007079646017699115, 'mean_word_length': 4.643366619115549, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, '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': '1401640', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1216, 'n_words': 173}