<commit_before><?php
namespace Samurai\Module\Task;

use Samurai\Module\Module;
use Samurai\Task\ITask;
use Samurai\Task\Task;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ConfirmationQuestion;

/**
 * Class Installing
 * @package Samurai\Module\Task
 * @author <NAME> <<EMAIL>>
 */
class Installing extends Task
{
    /**
     * @var array
     */
    private $modules = [
        'git' => [
            'package' => 'raphhh/samurai-module-git',
            'version' => '@dev',
        ],
        'cleaner' => [
            'package' => 'raphhh/samurai-module-cleaner',
            'version' => '@dev',
        ],
    ];

    /**
     * @param InputInterface $input
     * @param OutputInterface $output
     * @return int|null
     */
    public function execute(InputInterface $input, OutputInterface $output)
    {
        if($input->getArgument('name') && !$input->getArgument('package')) {
            throw new \InvalidArgumentException('bootstrap param is mandatory for this action');
        }

        if($input->getArgument('name') && $input->getArgument('package')){
            return $this->installModule($input, $output);
        }

        return $this->installModules($input, $output);
    }

    /**<commit_msg>specify stable version for recommended modules<commit_after><?php
namespace Samurai\Module\Task;

use Samurai\Module\Module;
use Samurai\Task\ITask;
use Samurai\Task\Task;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ConfirmationQuestion;

/**
 * Class Installing
 * @package Samurai\Module\Task
 * @author <NAME> <<EMAIL>>
 */
class Installing extends Task
{
    /**
     * @var array
     */
    private $modules = [
        'git' => [
            'package' => 'raphhh/samurai-module-git',
            'version' => '',
        ],
        'cleaner' => [
            'package' => 'raphhh/samurai-module-cleaner',
            'version' => '',
        ],
    ];

    /**
     * @param InputInterface $input
     * @param OutputInterface $output
     * @return int|null
     */
    public function execute(InputInterface $input, OutputInterface $output)
    {
        if($input->getArgument('name') && !$input->getArgument('package')) {
            throw new \InvalidArgumentException('bootstrap param is mandatory for this action');
        }

        if($input->getArgument('name') && $input->getArgument('package')){
            return $this->installModule($input, $output);
        }

        return $this->installModules($input, $output);
    }

    /**
{'fraction_non_alphanumeric': 0.14972067039106146, 'fraction_numerical': 0.0, 'mean_word_length': 2.6494565217391304, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 33, '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': '6176877', 'n_tokens_mistral': 777, 'n_tokens_neox': 760, 'n_words': 149}