<commit_before><?php

namespace Axn\Illuminate\Foundation\Console;

use Exception;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;

class MigrateTest extends Command
{
	/**
	 * The console command name.
	 *
	 * @var string
	 */
	protected $name = 'migrate:test';

	/**
	 * The console command description.
	 *
	 * @var string
	 */
	protected $description = 'Tests migrate/seed commands';

	/**
	 * Execute the console command.
	 *
	 * @return mixed
	 */
	public function handle()
	{
        $testingDbConn = $this->option('conn');
        $defaultDbConn = $this->laravel['db']->getName();

        try {
            $this->laravel['db']->getConfig($testingDbConn); // Pour lever une exception si la connexion n'est pas configurée
            $this->laravel['db']->setDefaultConnection($testingDbConn);

            $this->info('> Running "migrate" command:');
            $this->call('migrate');
            echo "\n";

            $this->info('> Running "db:seed" command:');
            $this->call('db:seed');
            echo "\n";

            $this->info('> Running "migrate:reset" command:');
            $this->call('migrate:reset');
            echo "\n";

            $this->info('Completed!');
        }
        catch (Exception $e) {
            $this->info('Exception catched:');
            $this->comment($e->getMessage());
        }

        $this->laravel['db']->setDefaultConnection($defaultDbConn);
	}

    /**
	 * Get the console command arguments.
	 *
	 * @return array
	 */
	protected function getArguments()
	{
		return [
			//['example', InputArgument::REQUIRED, 'An example argument.'],
		];
	}

	/**
	 * Get the console command options.
	 *
	 * @return array
	 */
	protected function getOptions()
	{
		return [
			['conn', null, InputOption::VALUE_OPTIONAL, 'DB connection to use', 'testing'],
		];
	}<commit_msg>Changements mineures au niveau des couleurs dans la console<commit_after><?php

namespace Axn\Illuminate\Foundation\Console;

use Exception;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;

class MigrateTest extends Command
{
	/**
	 * The console command name.
	 *
	 * @var string
	 */
	protected $name = 'migrate:test';

	/**
	 * The console command description.
	 *
	 * @var string
	 */
	protected $description = 'Tests migrate/seed commands';

	/**
	 * Execute the console command.
	 *
	 * @return mixed
	 */
	public function handle()
	{
        $testingDbConn = $this->option('conn');
        $defaultDbConn = $this->laravel['db']->getName();

        try {
            $this->laravel['db']->getConfig($testingDbConn); // Pour lever une exception si la connexion n'est pas configurée
            $this->laravel['db']->setDefaultConnection($testingDbConn);

            $this->comment('> Running "migrate" command:');
            $this->call('migrate');
            echo "\n";

            $this->comment('> Running "db:seed" command:');
            $this->call('db:seed');
            echo "\n";

            $this->comment('> Running "migrate:reset" command:');
            $this->call('migrate:reset');
            echo "\n";

            $this->info('Completed!');
        }
        catch (Exception $e) {
            $this->error('Exception catched:');
            $this->line($e->getMessage());
        }

        $this->laravel['db']->setDefaultConnection($defaultDbConn);
	}

    /**
	 * Get the console command arguments.
	 *
	 * @return array
	 */
	protected function getArguments()
	{
		return [
			//['example', InputArgument::REQUIRED, 'An example argument.'],
		];
	}

	/**
	 * Get the console command options.
	 *
	 * @return array
	 */
	protected function getOptions()
	{
		return [
			['conn', null, InputOption::VALUE_OPTIONAL, 'DB connection to use', 'testing'],
		];
	}
{'fraction_non_alphanumeric': 0.15952808412413438, 'fraction_numerical': 0.0, 'mean_word_length': 2.6144578313253013, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, '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': '3001524', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1135, 'n_words': 258}