<commit_before><?php

namespace Concrete\Core\Console;

use Core;
use Database;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Concrete\Core\Updater\Migrations\Configuration as MigrationsConfiguration;

class Application extends \Symfony\Component\Console\Application
{
    public function __construct()
    {
        parent::__construct('concrete5', \Config::get('concrete.version'));
        $this->add(new Command\ResetCommand());
        $this->add(new Command\InstallCommand());
        $this->add(new Command\GenerateIDESymbolsCommand());
        $this->add(new Command\JobCommand());
        $cms = Core::make('app');
        if ($cms->isInstalled()) {
            $cn = Database::get();
            /* @var $cn \Concrete\Core\Database\Connection\Connection */
            $helperSet = ConsoleRunner::createHelperSet($cn->getEntityManager());
            $this->setHelperSet($helperSet);
            $mirationsConfiguration = new MigrationsConfiguration();
            foreach (array(
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand(),
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand(),
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand(),
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\MigrateCommand(),
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\StatusCommand(),
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\VersionCommand(),
            ) as $migrationsCommand) {
                $migrationsCommand->setMigrationConfiguration($mirationsConfiguration);
                $this->add($migrationsCommand);
            }
            ConsoleRunner::addCommands($this);
        }
    }
}<commit_msg>Only add jobs command if installed<commit_after><?php

namespace Concrete\Core\Console;

use Core;
use Database;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Concrete\Core\Updater\Migrations\Configuration as MigrationsConfiguration;

class Application extends \Symfony\Component\Console\Application
{
    public function __construct()
    {
        parent::__construct('concrete5', \Config::get('concrete.version'));
        $this->add(new Command\ResetCommand());
        $this->add(new Command\InstallCommand());
        $this->add(new Command\GenerateIDESymbolsCommand());
        $cms = Core::make('app');
        if ($cms->isInstalled()) {
            $this->add(new Command\JobCommand());
            $cn = Database::get();
            /* @var $cn \Concrete\Core\Database\Connection\Connection */
            $helperSet = ConsoleRunner::createHelperSet($cn->getEntityManager());
            $this->setHelperSet($helperSet);
            $mirationsConfiguration = new MigrationsConfiguration();
            foreach (array(
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand(),
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand(),
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand(),
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\MigrateCommand(),
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\StatusCommand(),
                new \Doctrine\DBAL\Migrations\Tools\Console\Command\VersionCommand(),
            ) as $migrationsCommand) {
                $migrationsCommand->setMigrationConfiguration($mirationsConfiguration);
                $this->add($migrationsCommand);
            }
            ConsoleRunner::addCommands($this);
        }
    }
}
{'fraction_non_alphanumeric': 0.12825539064687763, 'fraction_numerical': 0.0005600672080649678, 'mean_word_length': 2.7521008403361344, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '4879450', 'n_tokens_mistral': 952, 'n_tokens_neox': 942, 'n_words': 133}