<commit_before><?php
namespace Samurai\Module;

use Samurai\Command\Command;
use Samurai\Module\Task\Factory\ModuleManagementTaskFactory;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * Class ModuleCommand
 * @package Samurai\Module
 * @author <NAME> <<EMAIL>>
 */
class ModuleCommand extends Command
{
    /**
     *
     */
    protected function configure()
    {
        $this
            ->setName('module')
            ->setDescription('Handles Samurai modules')
            ->addArgument(
                'action',
                InputArgument::OPTIONAL,
                'sub-command'
            )
            ->addArgument(
                'name',
                InputArgument::OPTIONAL,
                'module name'
            )
            ->addArgument(
                'package',
                InputArgument::OPTIONAL,
                'package name'
            )
            ->addArgument(
                'version',
                InputArgument::OPTIONAL,
                'package version'
            )
            ->addArgument(
                'description',
                InputArgument::OPTIONAL,
                'bootstrap description'
            )
            ->addArgument(
                'source',
                InputArgument::OPTIONAL,
                'bootstrap source'
            );
    }

    /**
     * @param InputInterface $input
     * @param OutputInterface $output
     * @return void
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->getTask($input)->execute($input, $output);
        $this->getService('module_manager')->flush();
    }

    /**
     * @param InputInterface $input
     * @return \Samurai\Task\ITask<commit_msg>set help in the module command<commit_after><?php
namespace Samurai\Module;

use Samurai\Command\Command;
use Samurai\Module\Task\Factory\ModuleManagementTaskFactory;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * Class ModuleCommand
 * @package Samurai\Module
 * @author <NAME> <<EMAIL>>
 */
class ModuleCommand extends Command
{
    /**
     *
     */
    protected function configure()
    {
        $this
            ->setName('module')
            ->setDescription('Handles Samurai modules')
            ->addArgument(
                'action',
                InputArgument::OPTIONAL,
                'sub-command'
            )
            ->addArgument(
                'name',
                InputArgument::OPTIONAL,
                'module name'
            )
            ->addArgument(
                'package',
                InputArgument::OPTIONAL,
                'package name'
            )
            ->addArgument(
                'version',
                InputArgument::OPTIONAL,
                'package version'
            )
            ->addArgument(
                'description',
                InputArgument::OPTIONAL,
                'bootstrap description'
            )
            ->addArgument(
                'source',
                InputArgument::OPTIONAL,
                'bootstrap source'
            )
            ->setHelp('See the documentation for more info: https://github.com/Raphhh/samurai');
    }

    /**
     * @param InputInterface $input
     * @param OutputInterface $output
     * @return void
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->getTask($input)->execute($input, $output);
        $this->getService('module_manager')->flush();
    }

    /**
     * @param InputInterface $input
     * @return \Samurai\Task\ITask
{'fraction_non_alphanumeric': 0.10930537352555701, 'fraction_numerical': 0.0, 'mean_word_length': 1.608339029391661, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 34, 'https://': 1, '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': '7122526', 'n_tokens_mistral': 971, 'n_tokens_neox': 937, 'n_words': 177}