<commit_before><?php
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

/** @var Symfony\Component\Console\Input\InputDefinition $input */
$inputDefinition = \Deployer\Deployer::get()->getConsole()->getDefinition();
if (!$inputDefinition->hasArgument('stage')) {
    $inputDefinition->addArgument(new InputArgument('stage', \Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'Run tasks only on this server or group of servers.'));
}
if (!$inputDefinition->hasArgument('branch')) {
    $inputDefinition->addArgument(new InputArgument('branch', \Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'Release branch'));
}
if (!$inputDefinition->hasOption('build-type')) {
    $inputDefinition->addOption(new InputOption('build-type', 't', \Symfony\Component\Console\Input\InputOption::VALUE_REQUIRED, 'Deploy strategy (build type), D|T|P', \TheRat\SymDep\BUILD_TYPE_DEV));
}
if (!$inputDefinition->hasOption('composer-no-dev')) {
    $inputDefinition->addOption(new InputOption('composer-no-dev', 'C', \Symfony\Component\Console\Input\InputOption::VALUE_NONE, 'Composer --no-dev'));
}
$buildType = \TheRat\SymDep\getBuildType();

require_once 'common.php';

task('deploy', [
    'install',
    'configure',
    'link',
])
    ->desc('Default command, depend on --build-type=<[d]ev|[t]est|[p]rod>');

switch ($buildType) {
    case \TheRat\SymDep\BUILD_TYPE_DEV:
        require_once 'local.php';

        before('properties', 'check_connection');
        after('properties', 'project-update:properties');

        before('install', 'install-before');
        before('install', 'properties');
        after('install', 'project-update:update_code');
        after('install', 'create_cache_dir');
        after('install', 'shared');
        after('install', 'writable');
        after('install', 'assets');
        after('install', 'install-after');

        before('configure', 'configure-before');
        before('configure', 'properties');
        after('configure', 'vendors');
        after('configure', 'assetic:dump');
        after('configure', 'cache:warmup');
        after('configure', 'database:migrate');
        after('configure', 'database:cache-clear');
        after('configure', 'configure-after');

        before('link', 'link-before');
        before('link', 'properties');
        after('link', 'link-after');

        break;
    case \TheRat\SymDep\BUILD_TYPE_TEST:
        require_once 'test.php';

        before('properties', 'check_connection');
        after('properties', 'deploy-on-test:properties');

        before('install', 'install-before');
        before('install', 'properties');
        after('install', 'deploy-on-test:update_code');
        after('install', 'create_cache_dir');
        after('install', 'shared');
        after('install', 'writable');<commit_msg>bug fix<commit_after><?php
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

/** @var Symfony\Component\Console\Input\InputDefinition $input */
$inputDefinition = \Deployer\Deployer::get()->getConsole()->getDefinition();
if (!$inputDefinition->hasArgument('stage')) {
    $inputDefinition->addArgument(new InputArgument('stage', \Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'Run tasks only on this server or group of servers.'));
}
if (!$inputDefinition->hasArgument('branch')) {
    $inputDefinition->addArgument(new InputArgument('branch', \Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'Release branch'));
}
if (!$inputDefinition->hasOption('build-type')) {
    $inputDefinition->addOption(new InputOption('build-type', 't', \Symfony\Component\Console\Input\InputOption::VALUE_REQUIRED, 'Deploy strategy (build type), D|T|P', \TheRat\SymDep\BUILD_TYPE_DEV));
}
if (!$inputDefinition->hasOption('composer-no-dev')) {
    $inputDefinition->addOption(new InputOption('composer-no-dev', 'C', \Symfony\Component\Console\Input\InputOption::VALUE_NONE, 'Composer --no-dev'));
}
$buildType = \TheRat\SymDep\getBuildType();

require_once 'common.php';

task('deploy', [
    'install',
    'configure',
    'link',
])
    ->desc('Default command, depend on --build-type=<[d]ev|[t]est|[p]rod>');

switch ($buildType) {
    case \TheRat\SymDep\BUILD_TYPE_DEV:
        require_once 'local.php';

        before('properties', 'check_connection');
        after('properties', 'project-update:properties');

        before('install', 'install-before');
        before('install', 'properties');
        after('install', 'project-update:update_code');
        after('install', 'create_cache_dir');
        after('install', 'shared');
        after('install', 'writable');
        after('install', 'assets');
        after('install', 'install-after');

        before('configure', 'configure-before');
        before('configure', 'properties');
        after('configure', 'vendors');
        after('configure', 'assetic:dump');
        after('configure', 'cache:warmup');
        after('configure', 'database:migrate');
        after('configure', 'database:cache-clear');
        after('configure', 'configure-after');

        before('link', 'link-before');
        before('link', 'properties');
        after('link', 'link-after');

        break;
    case \TheRat\SymDep\BUILD_TYPE_TEST:
        require_once 'test.php';

        before('properties', 'check_connection');
        after('properties', 'deploy-on-test:properties');

        before('install', 'install-before');
        before('install', 'properties');
        after('install', 'deploy-on-test:update_code');
        after('install', 'create_cache_dir');
        after('install', 'deploy-on-test:shared');
        after('install', 'writable');
{'fraction_non_alphanumeric': 0.18380171059521733, 'fraction_numerical': 0.0, 'mean_word_length': 4.247252747252747, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 27, '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': '6371447', 'n_tokens_mistral': 1653, 'n_tokens_neox': 1639, 'n_words': 268}