Configures the command
171035
protected function configure()
    {
        $this->addArgument(
            'command-to-run',
            InputArgument::REQUIRED,
            'Command to run'
        );
        $this->addOption(
            'log',
            null,
            Option::VALUE_REQUIRED,
            'Log to file'
        );
        $this->addOption(
            'stage',
            null,
            Option::VALUE_REQUIRED,
            'Stage to deploy'
        );
        $this->addOption(
            'roles',
            null,
            Option::VALUE_REQUIRED,
            'Roles to deploy'
        );
        $this->addOption(
            'hosts',
            null,
            Option::VALUE_REQUIRED,
            'Host to deploy, comma separated, supports ranges [:]'
        );
    }
1070899
def set_configuration(self, command):
        
        self.permanent_progressbar_slots = command.permanent_progressbar_slots
        self.redraw_frequency_millis = command.redraw_frequency_millis
        self.console_level = command.console_level
        self.task_millis_to_removal = command.task_millis_to_removal

        self.console_format_strftime = command.console_format_strftime
        self.console_format = command.console_format
        self.file_handlers = command.file_handlers

        # If the logger has already been initialized, then clear file handlers and add the new ones
        if len(self.log.handlers) > 0:
            self.log.handlers.clear()

            for handler in self.file_handlers:
                if isinstance(handler, StreamHandler)\
                        and (handler.stream == sys.stdout or handler.stream == sys.stderr):
                    self.critical(LogMessageCommand(text='Cannot use logging.StreamHandler with \'sys.stdout\' nor '
                                                         '\'sys.stderr\' because those are reserved by the logger '
                                                         'process',
                                                    level=logging.CRITICAL))
                    continue

                self.log.addHandler(hdlr=handler)

        # Do not clear exceptions if the user changes the configuration during runtime
        if self.exceptions:
            # If exceptions already exists
            current_length = len(self.exceptions)

            if command.exception_number < current_length:
                # Delete exceptions from the end to desired index to keep most recent exceptions
                range_to_delete = current_length - command.exception_number
                for i in range(range_to_delete):
                    del self.exceptions[-1]

            elif command.exception_number > current_length:
                # Add empty slots at the end
                range_to_add = command.exception_number - current_length
                for i in range(range_to_add):
                    self.exceptions.append('')
        else:
            # Else, initialize a new list
            self.exceptions = command.exception_number * ['']

        # Do not clear messages if the user changes the configuration during runtime
        if self.messages:
            # If messages already exists
            current_length = len(self.messages)

            if command.message_number < current_length:
                # Delete messages from 0 to desired index to keep most recent messages
                range_to_delete = current_length - command.message_number
                for i in range(range_to_delete):
                    del self.messages[0]

            elif command.message_number > current_length:
                # Add empty slots at 0
                range_to_add = command.message_number - current_length
                for i in range(range_to_add):
                    self.messages.insert(0, '')
        else:
            # Else, initialize a new list
            self.messages = command.message_number * ['']
655161
def configure(root_directory, build_path, cmake_command, only_show):
    
    default_build_path = os.path.join(root_directory, 'build')

    # check that CMake is available, if not stop
    check_cmake_exists('cmake')

    # deal with build path
    if build_path is None:
        build_path = default_build_path
    if not only_show:
        setup_build_path(build_path)

    cmake_command += ' -B' + build_path
    print('{0}\n'.format(cmake_command))
    if only_show:
        sys.exit(0)

    run_cmake(cmake_command, build_path, default_build_path)
228388
protected function configure()
    {
        $this->setDescription($this->shortDesc);

        foreach($this->paramsArray as $nameParam => $arrayOptions){
            if($arrayOptions['optional']){
                $this->addOption($nameParam, null, InputOption::VALUE_OPTIONAL, $arrayOptions['comment'], null);
            }
            else {
                $this->addOption($nameParam, null, InputOption::VALUE_REQUIRED, $arrayOptions['comment'], null);
            } 
        }
    }
453168
function configure(alg, pswd, sto) {
  algorithm = alg;
  password = pswd;
  sessionTimeout = sto;
}
362511
protected function configureCommand(Command $command)
    {
        $broker = new MessageBroker();
        $pool = new WorkerPool($this->getConfiguration(), $this->emitter, $broker);
        $runner = new StreamSelectRunner($this->emitter, $pool);
        $command->setRunner($runner);

        $loader = new SuiteLoader($this->getConfiguration()->getGrep(), $this->emitter);
        $command->setLoader($loader);
    }
996154
protected function configure()
    {
        $command = new ConsoleCommand();

        $command->name($this->commandName)
                ->description($this->commandDescription);

        if ($this->argument != null) {
            $command->argument([
                'name'        => $this->argument,
                'description' => $this->argumentDescription,
                'type'        => $this->argumentType,
            ]);
        }
        $this->configureCommand($command);
    }
49793
protected function configure()
    {
        $this
            ->setDescription('Configure an index')
            ->addArgument(
                'app-name',
                InputArgument::REQUIRED,
                'App name'
            )
            ->addArgument(
                'index-name',
                InputArgument::REQUIRED,
                'Index'
            )
            ->addOption(
                'language',
                null,
                InputOption::VALUE_OPTIONAL,
                'Index language',
                null
            )
            ->addOption(
                'no-store-searchable-metadata',
                null,
                InputOption::VALUE_NONE,
                'Store searchable metadata'
            )
            ->addOption(
                'synonym',
                null,
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Synonym'
            )
            ->addOption(
                'synonyms-file',
                null,
                InputOption::VALUE_OPTIONAL,
                'Synonyms file'
            )
            ->addOption(
                'shards',
                null,
                InputOption::VALUE_OPTIONAL,
                'Shards for the index',
                Config::DEFAULT_SHARDS
            )
            ->addOption(
                'replicas',
                null,
                InputOption::VALUE_OPTIONAL,
                'Replicas for the index',
                Config::DEFAULT_REPLICAS
            );
    }
280463
protected function configure()
    {
        parent::configure();

        $this
            ->setName('run_jobs')
            ->setDescription('Run jobs that are next in line for up to N seconds')
            ->addOption(
                'seconds',
                's',
                InputOption::VALUE_REQUIRED,
                'Run jobs for -s seconds before quitting the process',
                50
            )
            ->addOption(
                'channels',
                'c',
                InputOption::VALUE_REQUIRED,
                'Select one or more channels for jobs for process',
                QueueInterface::MAIN_CHANNEL
            )
            ->addOption(
                'jobs-per-batch',
                '',
                InputOption::VALUE_REQUIRED,
                'Number of jobs that should be fetched and executed per single run',
                1
            );
    }
137945
protected function configure()
    {
        $this->setName(static::NAME);
        $this->setDescription(static::DESCRIPTION);

        foreach ($this->defineOptions() as $option) {
            call_user_func_array([$this, 'addOption'], $option);
        }

        foreach ($this->defineArguments() as $argument) {
            call_user_func_array([$this, 'addArgument'], $argument);
        }
    }
907607
protected function configure()
    {
        $this->analyser->setDirectory(WORKING_DIRECTORY);
        $this->setName('init');
        $description = 'Creates a default .lpv file in a given '
            . 'project/micro-package repository';
        $this->setDescription($description);

        $directoryDescription = 'The directory of a project/micro-package repository';
        $overwriteDescription = 'Overwrite existing default .lpv file file';

        $this->addArgument(
            'directory',
            InputArgument::OPTIONAL,
            $directoryDescription,
            $this->analyser->getDirectory()
        );
        $this->addOption('overwrite', 'o', InputOption::VALUE_NONE, $overwriteDescription);
    }
1137517
protected function configure()
        {

            // get systemname
            $sAppName = SystemSettings::get('app_name');

            // set cli options
            $this->setName($sAppName . ':remote:cron')->addOption('app', null, InputOption::VALUE_REQUIRED, 'run only for specific remote app', false)->addOption('force', null, InputOption::VALUE_NONE, 'force to run remote app / ignore cron settings')->setDescription('Run/Crawl registered remote apps');
        }
76664
public static function configure(): void
    {
        $filesystem = new Filesystem();
        $config     = [
            'colors'          => '1',
            'installed_paths' => implode(',', [
                Path::VENDOR_DIR . '/hostnet/phpcs-tool/src/',
                Path::VENDOR_DIR . '/slevomat/coding-standard/SlevomatCodingStandard',
            ]),
        ];

        if (!$filesystem->exists(['phpcs.xml', 'phpcs.xml.dist'])) {
            $config['default_standard'] = 'Hostnet';
        }

        $filesystem->dumpFile(
            Path::VENDOR_DIR . '/squizlabs/php_codesniffer/CodeSniffer.conf',
            sprintf('<?php $phpCodeSnifferConfig = %s;', var_export($config, true))
        );

        $filesystem->dumpFile(__DIR__ . '/../../../HostnetPaths/ruleset.xml', self::generateHostnetPathsXml());
    }
500188
protected function configure(): void
    {
        $this
            ->setName('make:model')
            ->setDescription('Creates a new App model')
            ->addArgument(
                'modelName',
                InputArgument::OPTIONAL,
                'Define the name of the model to create'
            )
            ->addOption(
                'skip-db',
                null,
                InputOption::VALUE_NONE,
                'Skip database table creation'
            )
            ->addOption(
                'skip-seeder',
                null,
                InputOption::VALUE_NONE,
                'Skip seeder creation'
            )
            ->addOption(
                'auto-detect',
                null,
                InputOption::VALUE_NONE,
                'Automatically build models from the database'
            )
            ->addOption(
                'localised',
                null,
                InputOption::VALUE_NONE,
                'Create a localised model (or convert an existing model)'
            );

        if (Components::exists('nails/module-admin')) {
            $this->addOption(
                'admin',
                null,
                InputOption::VALUE_NONE,
                'Create an admin controller'
            );
        }
    }
420342
protected function configure()
    {
        $this->setName('phpjunitmerge')
            ->setDefinition(
                array(
                    new InputArgument(
                        'dir',
                        InputArgument::REQUIRED,
                        'Directory where all files ready to get merged are stored'
                    ),
                    new InputArgument(
                        'file',
                        InputArgument::REQUIRED,
                        'The target file in which the merged result should be written'
                    )
                )
            )
            ->addOption(
                'names',
                null,
                InputOption::VALUE_REQUIRED,
                'A comma-separated list of file names to check',
                '*.xml'
            )
            ->addOption(
                'ignore',
                null,
                InputOption::VALUE_REQUIRED,
                'A comma-separated list of file names to ignore',
                'result.xml'
            )
			->addOption(
				'no-suffix',
				null,
				InputOption::VALUE_NONE,
				'Do not add suffix for test suites with duplicate names',
				null
			);
    }
1266094
protected function configure()
    {
        $this->addArgument(
            'stage',
            InputArgument::OPTIONAL,
            'Stage or hostname'
        );
        $this->addOption(
            'parallel',
            'p',
            Option::VALUE_NONE,
            'Run tasks in parallel'
        );
        $this->addOption(
            'limit',
            'l',
            Option::VALUE_REQUIRED,
            'How many host to run in parallel?'
        );
        $this->addOption(
            'no-hooks',
            null,
            Option::VALUE_NONE,
            'Run task without after/before hooks'
        );
        $this->addOption(
            'log',
            null,
            Option::VALUE_REQUIRED,
            'Log to file'
        );
        $this->addOption(
            'roles',
            null,
            Option::VALUE_REQUIRED,
            'Roles to deploy'
        );
        $this->addOption(
            'hosts',
            null,
            Option::VALUE_REQUIRED,
            'Host to deploy, comma separated, supports ranges [:]'
        );
        $this->addOption(
            'option',
            'o',
            Option::VALUE_REQUIRED | Option::VALUE_IS_ARRAY,
            'Sets configuration option'
        );
    }
392369
protected function configure()
    {
        $this->setDefinition([
            new InputArgument('suite', InputArgument::OPTIONAL, 'suite to be tested'),
            new InputArgument('test', InputArgument::OPTIONAL, 'test to be run'),
            new InputOption('override', 'o', InputOption::VALUE_IS_ARRAY  | InputOption::VALUE_REQUIRED, 'Override config values'),
            new InputOption('ext', 'e', InputOption::VALUE_IS_ARRAY  | InputOption::VALUE_REQUIRED, 'Run with extension enabled'),
            new InputOption('report', '', InputOption::VALUE_NONE, 'Show output in compact style'),
            new InputOption('html', '', InputOption::VALUE_OPTIONAL, 'Generate html with results', 'report.html'),
            new InputOption('xml', '', InputOption::VALUE_OPTIONAL, 'Generate JUnit XML Log', 'report.xml'),
            new InputOption('phpunit-xml', '', InputOption::VALUE_OPTIONAL, 'Generate PhpUnit XML Log', 'phpunit-report.xml'),
            new InputOption('tap', '', InputOption::VALUE_OPTIONAL, 'Generate Tap Log', 'report.tap.log'),
            new InputOption('json', '', InputOption::VALUE_OPTIONAL, 'Generate Json Log', 'report.json'),
            new InputOption('colors', '', InputOption::VALUE_NONE, 'Use colors in output'),
            new InputOption(
                'no-colors',
                '',
                InputOption::VALUE_NONE,
                'Force no colors in output (useful to override config file)'
            ),
            new InputOption('silent', '', InputOption::VALUE_NONE, 'Only outputs suite names and final results'),
            new InputOption('steps', '', InputOption::VALUE_NONE, 'Show steps in output'),
            new InputOption('debug', 'd', InputOption::VALUE_NONE, 'Show debug and scenario output'),
            new InputOption(
                'coverage',
                '',
                InputOption::VALUE_OPTIONAL,
                'Run with code coverage'
            ),
            new InputOption(
                'coverage-html',
                '',
                InputOption::VALUE_OPTIONAL,
                'Generate CodeCoverage HTML report in path'
            ),
            new InputOption(
                'coverage-xml',
                '',
                InputOption::VALUE_OPTIONAL,
                'Generate CodeCoverage XML report in file'
            ),
            new InputOption(
                'coverage-text',
                '',
                InputOption::VALUE_OPTIONAL,
                'Generate CodeCoverage text report in file'
            ),
            new InputOption(
                'coverage-crap4j',
                '',
                InputOption::VALUE_OPTIONAL,
                'Generate CodeCoverage report in Crap4J XML format'
            ),
            new InputOption(
                'coverage-phpunit',
                '',
                InputOption::VALUE_OPTIONAL,
                'Generate CodeCoverage PHPUnit report in path'
            ),
            new InputOption('no-exit', '', InputOption::VALUE_NONE, 'Don\'t finish with exit code'),
            new InputOption(
                'group',
                'g',
                InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED,
                'Groups of tests to be executed'
            ),
            new InputOption(
                'skip',
                's',
                InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED,
                'Skip selected suites'
            ),
            new InputOption(
                'skip-group',
                'x',
                InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED,
                'Skip selected groups'
            ),
            new InputOption(
                'env',
                '',
                InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED,
                'Run tests in selected environments.'
            ),
            new InputOption('fail-fast', 'f', InputOption::VALUE_NONE, 'Stop after first failure'),
            new InputOption('no-rebuild', '', InputOption::VALUE_NONE, 'Do not rebuild actor classes on start'),
            new InputOption(
                'seed',
                '',
                InputOption::VALUE_REQUIRED,
                'Define random seed for shuffle setting'
            ),

        ]);

        parent::configure();
    }