@param InputInterface $input

@return ConfigDumper
333437
public function initializePluginConfigDumper(InputInterface $input)
    {
        $dumper = new ConfigDumper();
        $dumper->addSection('filter', 'notPaths', $this->csvToArray($input->getOption('not-paths')));
        $dumper->addSection('filter', 'notNames', $this->csvToArray($input->getOption('not-names')));

        foreach ($this->getApplication()->all() as $command) {
            if (!$command instanceof AbstractPluginCommand) {
                continue;
            }

            $prefix   = strtoupper($command->getName());
            $envPaths = $prefix.'_IGNORE_PATHS';
            $envNames = $prefix.'_IGNORE_NAMES';

            $paths = getenv($envPaths) !== false ? getenv($envPaths) : null;
            $names = getenv($envNames) !== false ? getenv($envNames) : null;

            if (!empty($paths)) {
                $dumper->addSection('filter-'.$command->getName(), 'notPaths', $this->csvToArray($paths));
            }
            if (!empty($names)) {
                $dumper->addSection('filter-'.$command->getName(), 'notNames', $this->csvToArray($names));
            }
        }

        return $dumper;
    }
587983
protected static function mergeCommandArgumentsIntoConfiguration(Configuration $config, InputExtendedInterface $input)
    {
        if ($input->hasArgument('instances') === false) {
            return $config;
        }

        $argumentInstances = $input->getArgument('instances');

        if (count($argumentInstances) === 0) {
            return $config;
        }

        // Gerrie is a reserved keyword for project names
        $config->setConfigurationValue('Gerrit.Gerrie', $argumentInstances);

        return $config;
    }
1295491
protected function getUsableConfig(InputInterface $input)
    {
        $configLoader = new ConfigLoader();
        $configFinder = new ConfigFinder();

        /**
         * This section is just for finding the right values to work with in
         * this execution.
         *
         * $options array will have, after this block, all these values
         */
        $configPath = rtrim($input->getOption('config'), DIRECTORY_SEPARATOR);

        $configValue = $configLoader->loadConfigValues(
            $this->getCommandConfigAlias(),
            $configFinder->findConfigFile($configPath),
            $this->getCommandConfigValue($input),
            $this->getDefaultConfigValue()

        );

        if (is_null($configValue)) {
            throw new Exception("Config definition must be defined in .formatter.yml file under {$this->getCommandConfigAlias()}");
        }

        return $configValue;
    }
1274435
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $io = new SymfonyStyle($input, $output);
        $errorIo = $io->getErrorStyle();

        if (null === $name = $input->getArgument('name')) {
            $this->listBundles($errorIo);
            $errorIo->comment([
                'Provide the name of a bundle as the first argument of this command to dump its default configuration. (e.g. <comment>config:dump-reference FrameworkBundle</comment>)',
                'For dumping a specific option, add its path as the second argument of this command. (e.g. <comment>config:dump-reference FrameworkBundle profiler.matcher</comment> to dump the <comment>framework.profiler.matcher</comment> configuration)',
            ]);

            return;
        }

        $extension = $this->findExtension($name);

        $configuration = $extension->getConfiguration([], $this->getContainerBuilder());

        $this->validateConfiguration($extension, $configuration);

        $format = $input->getOption('format');
        $path = $input->getArgument('path');

        if (null !== $path && 'yaml' !== $format) {
            $errorIo->error('The "path" option is only available for the "yaml" format.');

            return 1;
        }

        if ($name === $extension->getAlias()) {
            $message = sprintf('Default configuration for extension with alias: "%s"', $name);
        } else {
            $message = sprintf('Default configuration for "%s"', $name);
        }

        if (null !== $path) {
            $message .= sprintf(' at path "%s"', $path);
        }

        switch ($format) {
            case 'yaml':
                $io->writeln(sprintf('# %s', $message));
                $dumper = new YamlReferenceDumper();
                break;
            case 'xml':
                $io->writeln(sprintf('<!-- %s -->', $message));
                $dumper = new XmlReferenceDumper();
                break;
            default:
                $io->writeln($message);
                throw new InvalidArgumentException('Only the yaml and xml formats are supported.');
        }

        $io->writeln(null === $path ? $dumper->dump($configuration, $extension->getNamespace()) : $dumper->dumpAtPath($configuration, $path));
    }
248709
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $parameters = new ParameterBag();
        $parameters->set('configuration.file', $input->getOption('project-dir').DIRECTORY_SEPARATOR.'accompli.json');
        $parameters->set('console.output_interface', $output);

        $accompli = new Accompli($parameters);
        $accompli->initialize();

        $successfulInstall = $accompli->install($input->getArgument('version'), $input->getArgument('stage'));
        if ($successfulInstall) {
            return 0;
        }

        return 1;
    }
1045532
public function createProjectByInput(InputInterface $input) : Project
    {
        $configFinder = new ConfigFinder();
        $configLoader = new ConfigLoader();

        /**
         * This section is just for finding the right values to work with in
         * this execution.
         *
         * $options array will have, after this block, all these values
         */
        $configPath = rtrim($input->getOption('config'), DIRECTORY_SEPARATOR);
        $configValues = $configLoader->loadConfigValues(
            $configFinder->findConfigFile($configPath)
        );

        $masterLanguage = $configValues['master_language'];
        $languages = $configValues['languages'];
        $filePaths = $configValues['paths'];

        return Project::create(
            $masterLanguage,
            $languages,
            $filePaths
        );
    }
307060
protected function createUser(InputInterface $input)
    {
        return $this->userFactory->createUser()
            ->setEmail($input->getArgument('email'))
            ->setPlainPassword($input->getArgument('password'));
    }
820841
public static function findFiles(InputInterface $input)
    {
        if ($input->hasParameterOption('--config-file')) {
            $file = $input->getParameterOption('--config-file');
            if (file_exists($file)) {
                return [$file];
            }

            throw new ConfigurationFileNotFoundException(
                sprintf("Couldn't find the configuration file: %s", $file)
            );
        }

        $format = $input->hasParameterOption('--config-format')
            ? $input->getParameterOption('--config-format')
            : static::$DEFAULT_TYPE
        ;

        return [
            sprintf("%s.%s", static::$NAME, $format),
            sprintf("%s.%s.dist", static::$NAME, $format)
        ];
    }
320376
protected function getCommandName(InputInterface $input)
    {
        if ($input->getFirstArgument() === null && !$input->hasParameterOption(array('--help', '-h'))) {
            $this->isDefault = true;
            return $this->getDefaultCommandName();
        }
        return parent::getCommandName($input);
    }
765115
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $container = $this->getContainer();
        $configBuilder = $container->get('admin.configuration.configbuilder');
        $pool = $container->get('admin.configuration.pool');
        foreach ($pool->getConfigurations() as $id => $attributes) {
            $config = $container->get($id);
            $config->build($configBuilder);
        }
    }
1198571
private function validateInput(InputInterface $input)
    {
        if (!$input->getArgument('target')) {
            // if no target is passed, there can be no properties or methods
            foreach (['properties', 'methods', 'no-inherit'] as $option) {
                if ($input->getOption($option)) {
                    throw new RuntimeException('--' . $option . ' does not make sense without a specified target');
                }
            }

            foreach (['globals', 'vars', 'constants', 'functions', 'classes', 'interfaces', 'traits'] as $option) {
                if ($input->getOption($option)) {
                    return;
                }
            }

            // default to --vars if no other options are passed
            $input->setOption('vars', true);
        } else {
            // if a target is passed, classes, functions, etc don't make sense
            foreach (['vars', 'globals', 'functions', 'classes', 'interfaces', 'traits'] as $option) {
                if ($input->getOption($option)) {
                    throw new RuntimeException('--' . $option . ' does not make sense with a specified target');
                }
            }

            foreach (['constants', 'properties', 'methods'] as $option) {
                if ($input->getOption($option)) {
                    return;
                }
            }

            // default to --constants --properties --methods if no other options are passed
            $input->setOption('constants',  true);
            $input->setOption('properties', true);
            $input->setOption('methods',    true);
        }
    }
346397
protected function getOptions(InputInterface $input)
    {
        return [
            'dir'    => (bool) $input->getOption('fix_dir'),
            'file'   => (bool) $input->getOption('fix_file'),
            'skip'   => (bool) $input->getOption('skip_dir_file'),
            'strict' => (bool) $input->getOption('strict_types'),
        ];
    }
428517
protected function getCommand(InputInterface $input)
    {
        /** @var ServerRegistry $serverRegistry */
        $serverRegistry = $this->getContainer()->get('nanbando.server_registry');

        return $serverRegistry->getCommand($this->getServerName($input), $this->getName());
    }
472889
protected function getConverter(InputInterface $input)
    {
        return $this->getConverterFactory()->get($input->getOption('input-format'), $this->output_format);
    }
1132369
public function processLoaded(InputInterface $input, OutputInterface $output, Config $config)
    {
        $this->write($input, $output, $this->encode($this->dump($config)));

        return $config;
    }
755824
protected function configureIO(InputInterface $input, OutputInterface $output)
    {
        if (true === $input->hasParameterOption(['--ansi'], true)) {
            $output->setDecorated(true);
        } elseif (true === $input->hasParameterOption(['--no-ansi'], true)) {
            $output->setDecorated(false);
        }

        if (true === $input->hasParameterOption(['--no-interaction', '-n'], true)) {
            $input->setInteractive(false);
        } elseif (\function_exists('posix_isatty')) {
            $inputStream = null;

            if ($input instanceof StreamableInputInterface) {
                $inputStream = $input->getStream();
            }

            if (!@posix_isatty($inputStream) && false === getenv('SHELL_INTERACTIVE')) {
                $input->setInteractive(false);
            }
        }

        switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) {
            case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break;
            case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break;
            case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break;
            case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break;
            default: $shellVerbosity = 0; break;
        }

        if (true === $input->hasParameterOption(['--quiet', '-q'], true)) {
            $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
            $shellVerbosity = -1;
        } else {
            if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
                $shellVerbosity = 3;
            } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
                $shellVerbosity = 2;
            } elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) {
                $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
                $shellVerbosity = 1;
            }
        }

        if (-1 === $shellVerbosity) {
            $input->setInteractive(false);
        }

        putenv('SHELL_VERBOSITY='.$shellVerbosity);
        $_ENV['SHELL_VERBOSITY'] = $shellVerbosity;
        $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity;
    }
968704
public function prepareExecute(InputInterface $input)
    {
        $this->coverFishHelper = new CoverFishHelper();

        $phpUnitConfigFile = $input->getArgument('phpunit-config');
        if (false === empty($phpUnitConfigFile) &&
            false === $this->coverFishHelper->checkFileOrPath($phpUnitConfigFile)) {
            throw new \Exception(sprintf('phpunit config file "%s" not found! please define your phpunit.xml config file to use (e.g. tests/phpunit.xml)', $phpUnitConfigFile));
        }

        $testPathOrFile = $input->getOption('raw-scan-path');
        if (false === empty($testPathOrFile) &&
            false === $this->coverFishHelper->checkFileOrPath($testPathOrFile)) {
            throw new \Exception(sprintf('test path/file "%s" not found! please define test file path (e.g. tests/)', $testPathOrFile));
        }
    }