<commit_before><?php namespace Mayconbordin\Laragen\Console;

use Illuminate\Console\Command;
use Mayconbordin\Laragen\Generator\RepositoryGenerator;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

class RepositoryCommand extends Command
{
    /**
     * The name of command.
     *
     * @var string
     */
    protected $name = 'generate:repository';

    /**
     * The description of command.
     *
     * @var string
     */
    protected $description = 'Generate a new repository.';

    /**
     * Execute the command.
     */
    public function fire()
    {
        $generator = new RepositoryGenerator([
            'name'     => $this->argument('name'),
            'entity'   => $this->argument('entity'),
            'force'    => $this->option('force'),
        ]);

        $generator->run();

        $this->info("Repository {$generator->getClass()} created successfully.");
    }

    /**
     * The array of command arguments.
     *
     * @return array
     */
    public function getArguments()
    {
        return [
            ['name', InputArgument::REQUIRED, 'The name of class being generated.', null],
        ];
    }

    /**
     * The array of command options.
     *<commit_msg>Fixed repository option<commit_after><?php namespace Mayconbordin\Laragen\Console;

use Illuminate\Console\Command;
use Mayconbordin\Laragen\Generator\RepositoryGenerator;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

class RepositoryCommand extends Command
{
    /**
     * The name of command.
     *
     * @var string
     */
    protected $name = 'generate:repository';

    /**
     * The description of command.
     *
     * @var string
     */
    protected $description = 'Generate a new repository.';

    /**
     * Execute the command.
     */
    public function fire()
    {
        $generator = new RepositoryGenerator([
            'name'     => $this->argument('name'),
            'entity'   => $this->option('entity'),
            'force'    => $this->option('force'),
        ]);

        $generator->run();

        $this->info("Repository {$generator->getClass()} created successfully.");
    }

    /**
     * The array of command arguments.
     *
     * @return array
     */
    public function getArguments()
    {
        return [
            ['name', InputArgument::REQUIRED, 'The name of class being generated.', null],
        ];
    }

    /**
     * The array of command options.
     *
{'fraction_non_alphanumeric': 0.13375295043273014, 'fraction_numerical': 0.0, 'mean_word_length': 2.1827284105131413, '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': '1885147', 'n_tokens_mistral': 695, 'n_tokens_neox': 686, 'n_words': 164}