<commit_before><?php namespace App\Console\Commands;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

use App\Generator\SCSSGenerator;
use App\Generator\LESSGenerator;

class Generate extends Command {

    /**
     * The name of the command
     *
     * @var
     */
    protected $name = 'generate:style';

    /**
     * The description of what the command should do
     *
     * @var
     */
    protected $description = 'Generate a style file in the given type [Default: scss]';

    /**
     * Configure the command
     */
    protected function configure()
    {
        $this->setName($this->name);
        $this->setDescription($this->description);

        $this->addArgument(
            'type',
            InputArgument::OPTIONAL,
            'Which style type should we generate?',
            'scss'
        );
    }

    /**
     * Execute the command
     *
     * @param InputInterface $input
     * @param OutputInterface $output
     *
     * @return void
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $type = $input->getArgument('type');

        if ($type === 'scss') {
            SCSSGenerator::generate();
            $output->writeln("<info>Wrote the SCSS file to: " . storage_path('output.scss') . "</info>");
        } elseif ($type === 'less') {
            LESSGenerator::generate();
            $output->writeln("<info>Wrote the LESS file to: " . storage_path('output.less') . "</info>");
        }
    }
}<commit_msg>Show error on unknown file type<commit_after><?php namespace App\Console\Commands;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

use App\Generator\SCSSGenerator;
use App\Generator\LESSGenerator;

class Generate extends Command {

    /**
     * The name of the command
     *
     * @var
     */
    protected $name = 'generate:style';

    /**
     * The description of what the command should do
     *
     * @var
     */
    protected $description = 'Generate a style file in the given type [Default: scss]';

    /**
     * Configure the command
     */
    protected function configure()
    {
        $this->setName($this->name);
        $this->setDescription($this->description);

        $this->addArgument(
            'type',
            InputArgument::OPTIONAL,
            'Which style type should we generate?',
            'scss'
        );
    }

    /**
     * Execute the command
     *
     * @param InputInterface $input
     * @param OutputInterface $output
     *
     * @return void
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $type = $input->getArgument('type');

        if ($type === 'scss') {
            SCSSGenerator::generate();
            $output->writeln("<info>Wrote the SCSS file to: " . storage_path('output.scss') . "</info>");
        } elseif ($type === 'less') {
            LESSGenerator::generate();
            $output->writeln("<info>Wrote the LESS file to: " . storage_path('output.less') . "</info>");
        } else {
            $output->writeln("<error>Unknown file type {$type}</error>");
        }
    }
}
{'fraction_non_alphanumeric': 0.1340876944837341, 'fraction_numerical': 0.0, 'mean_word_length': 2.3902205177372964, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 30, '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': '343212', 'n_tokens_mistral': 986, 'n_tokens_neox': 978, 'n_words': 230}