@param InputInterface  $input
@param OutputInterface $output

@throws Exception
778769
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $bugId = $input->getArgument('bug-id');
        $reducer = $input->getArgument('reducer');
        $length = $input->getArgument('length');
        $from = $input->getArgument('from');
        $to = $input->getArgument('to');

        $this->setAnonymousToken();

        $pathReducer = $this->pathReducerManager->getPathReducer($reducer);
        $pathReducer->handle($bugId, $length, $from, $to);
    }
594086
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;

        try {
            return $this->fire();
        } catch (DomainException $e) {
            return 1;
        } catch (Exception $e) {
            $this->error($e->getMessage());
            $this->error('Abort!');
        }

        return;
    }
521780
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $configFilesOption = $input->getOption('config');
        $outputOption = $input->getOption('output');
        $formatOption = $input->getOption('format');

        '@phan-var string $configFilesOption';
        '@phan-var string $outputOption';
        '@phan-var string $formatOption';

        $configFiles       = $this->getPossibleConfigFiles($configFilesOption);
        $configuration     = $this->linterConfigurationLocator->loadConfiguration($configFiles);
        $paths             = $input->getArgument('paths') ?: $configuration->getPaths();
        $outputTarget      = $input->getOption('output');
        $exitWithExitCode  = $input->getOption('exit-code') || $input->getOption('fail-on-warnings');

        '@phan-var string[] $paths';

        if (false == $outputTarget) {
            throw new BadOutputFileException('Bad output file.');
        }

        if ($outputOption === '-') {
            $reportOutput = $output;
        } else {
            $fileHandle = fopen($outputOption, 'w');
            if ($fileHandle === false) {
                throw new \Exception("could not open file '${outputOption}' for writing");
            }

            $reportOutput = new StreamOutput($fileHandle);
        }

        $logger = $this->loggerBuilder->createLogger($formatOption, $reportOutput, $output);

        $report   = new Report();
        $patterns = $configuration->getFilePatterns();

        $files = $this->finder->getFilenames($paths, $patterns, new CallbackFinderObserver(function ($name) use ($logger) {
            $logger->notifyFileNotFound($name);
        }));
        $logger->notifyFiles($files);

        foreach ($files as $filename) {
            $logger->notifyFileStart($filename);
            $fileReport = $this->linter->lintFile($filename, $report, $configuration, $logger);
            $logger->notifyFileComplete($filename, $fileReport);
        }

        $logger->notifyRunComplete($report);

        $exitCode = 0;
        if ($report->countIssuesBySeverity(Issue::SEVERITY_ERROR) > 0) {
            $exitCode = 2;
        } else if ($exitWithExitCode && $report->countIssues() > 0) {
            $exitCode = 2;
        }

        $this->eventDispatcher->addListener(
            ConsoleEvents::TERMINATE,
            function (ConsoleTerminateEvent $event) use ($exitCode) {
                $event->setExitCode($exitCode);
            }
        );
    }
370118
public function run(InputInterface $input, OutputInterface $output): int
    {
        $command = (string) $input;
        $command = strtr($command, [
            ' -name' => ' -N',
            ' -type' => ' -T',
            ' -maxdepth' => ' -M',
            ' -delete' => ' -d true',
        ]);

        return parent::run(new StringInput($command), $output);
    }
966996
protected function execute(InputInterface $input, OutputInterface $output)
    {
        /** @var ConfigurationHelper $configurationHelper */
        $configurationHelper = $this->getHelper('phpdocumentor_configuration');

        $progress = $this->getProgressBar($input);
        if (! $progress) {
            $this->connectOutputToEvents($output);
        }

        // initialize transformer
        $transformer = $this->getTransformer();

        $target = (string) $configurationHelper->getOption($input, 'target', 'transformer/target');
        $fileSystem = new Filesystem();
        if (! $fileSystem->isAbsolutePath($target)) {
            $target = getcwd() . DIRECTORY_SEPARATOR . $target;
        }
        $transformer->setTarget($target);

        $source = realpath($configurationHelper->getOption($input, 'source', 'parser/target'));
        if (!file_exists($source) || !is_dir($source)) {
            throw new \Exception('Invalid source location provided, a path to an existing folder was expected');
        }

        $this->getCache()->getOptions()->setCacheDir($source);

        $projectDescriptor = $this->getBuilder()->getProjectDescriptor();
        $mapper = new ProjectDescriptorMapper($this->getCache());
        $output->writeTimedLog('Load cache', array($mapper, 'populate'), array($projectDescriptor));

        foreach ($this->getTemplates($input) as $template) {
            $output->writeTimedLog(
                'Preparing template "'. $template .'"',
                array($transformer->getTemplates(), 'load'),
                array($template, $transformer)
            );
        }
        $output->writeTimedLog(
            'Preparing ' . count($transformer->getTemplates()->getTransformations()) . ' transformations',
            array($this, 'loadTransformations'),
            array($transformer)
        );

        if ($progress) {
            $progress->start($output, count($transformer->getTemplates()->getTransformations()));
        }

        /** @var CompilerPassInterface $pass */
        foreach ($this->compiler as $pass) {
            $output->writeTimedLog($pass->getDescription(), array($pass, 'execute'), array($projectDescriptor));
        }

        if ($progress) {
            $progress->finish();
        }

        return 0;
    }
1215728
public function execute(InputInterface $input, OutputInterface $output)
    {
        $host = $input->getArgument('host');

        $valid = $this->hostFile->check($host);

        $msg = $valid ? 'Host was found in the host file.' : 'Host was not found in the host file.';

        $output->writeln($msg);

        if ($valid) {
            $output->writeLn($valid);
        }
    }
24071
protected function execute(InputInterface $input, OutputInterface $output) : void
    {
        $io     = $this->getIO($input, $output);
        $config = $this->getConfig($input->getOption('configuration'));

        $configurator = new Creator($io, $config);
        $configurator->force($input->getOption('force'))
                     ->extend($input->getOption('extend'))
                     ->advanced($input->getOption('advanced'))
                     ->run();
    }
1164678
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $this->version = $this->getApplication()->getVersion();

        /**
         * Check for ancilliary options
         */
        if ($input->getOption('rollback')) {
            $this->rollback();

            return;
        }

        if ($input->getOption('check')) {
            $this->printAvailableUpdates();

            return;
        }

        $this->updateToDevelopmentBuild();
    }
972897
protected function initialize(InputInterface $input, OutputInterface $output)
    {
        parent::initialize($input, $output);
        $this->permissionResolver->setCurrentUserReference(
            $this->userService->loadUserByLogin($input->getOption('user'))
        );
    }
413362
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $actions = new Finder(APP_PATH, 'One\\Context\\Contracts\\Action', 'php');

        foreach ($actions as $action) {
            $this->output('Action', 'info', $action->getBasename('.php'), '');
        }
    }
491177
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if (!Uuid::isValid($input->getArgument('uuid'))) {
            throw new Exception('Invalid UUID (' . $input->getArgument('uuid') . ')');
        }

        $uuid = Uuid::fromString($input->getArgument('uuid'));

        $table = $this->getHelperSet()->get('table');
        $table->setLayout(TableHelper::LAYOUT_BORDERLESS);

        $table->addRows(array(
            array('encode:', 'STR:', (string) $uuid),
            array('',        'INT:', (string) $uuid->getInteger()),
        ));

        if ($uuid->getVariant() != Uuid::RFC_4122) {
            $table->addRows(array(
                array('decode:', 'variant:', 'Not an RFC 4122 UUID'),
            ));

            $table->render($output);

            return;
        }

        switch ($uuid->getVersion()) {
            case 1:
                $version = '1 (time and node based)';
                break;
            case 2:
                $version = '2 (DCE security based)';
                break;
            case 3:
                $version = '3 (name based, MD5)';
                break;
            case 4:
                $version = '4 (random data based)';
                break;
            case 5:
                $version = '5 (name based, SHA-1)';
                break;
        }

        $table->addRows(array(
            array('decode:', 'variant:', 'RFC 4122'),
            array('',        'version:', $version),
        ));

        if ($uuid->getVersion() == 1) {
            $table->addRows(array(
                array('', 'content:', 'time:  ' . $uuid->getDateTime()->format('c')),
                array('', '', 'clock: ' . $uuid->getClockSequence() . ' (usually random)'),
                array('', '', 'node:  ' . substr(chunk_split($uuid->getNodeHex(), 2, ':'), 0, -1)),
            ));
        }

        if ($uuid->getVersion() == 4) {
            $table->addRows(array(
                array('', 'content:', substr(chunk_split($uuid->getHex(), 2, ':'), 0, -1)),
                array('', '', '(no semantics: random data only)'),
            ));
        }

        if ($uuid->getVersion() == 3 || $uuid->getVersion() == 5) {
            $table->addRows(array(
                array('', 'content:', substr(chunk_split($uuid->getHex(), 2, ':'), 0, -1)),
                array('', '', '(not decipherable: MD5 message digest only)'),
            ));
        }

        $table->render($output);
    }
1369877
protected function execute(InputInterface $input, OutputInterface $output)
    {
        if ($this->getApplication() instanceof Application) {
            $this->createFileTemplate($input, $output, $this->getApplication()->endpointPath());
        }
    }
185737
protected function interact(InputInterface $input, OutputInterface $output)
    {
        if (!$input->getArgument('bundle')) {
            $bundle = $this->getHelper('dialog')->askAndValidate(
                $output,
                'Please give the bundle:',
                function($bundle)
                {
                    if (empty($bundle)) {
                        throw new \Exception('Bundle can not be empty');
                    }

                    return $bundle;
                }
            );
            $input->setArgument('bundle', $bundle);
        }
    }
343390
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $sitemaps = $this->builder->build();
        foreach ($sitemaps as $sitemap) {
            $output->writeln($sitemap);
        }
    }
1109651
protected function initialize(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;
        $this->formatter = $this->getHelper('formatter');
        $this->fs = new Filesystem();
    }
946925
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $errOutput = $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output;
        $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
        $errOutput->setVerbosity(OutputInterface::VERBOSITY_NORMAL);

        $context = json_decode($input->getOption('context') ?: '{}', true);
        $context['tenant_id'] = (string)$input->getOption('tenant-id');

        $nodeRef = NodeRef::fromString($input->getArgument('node-ref'));
        $consistent = $input->getOption('consistent') ? true : false;

        try {
            $node = $this->ncr->getNode($nodeRef, $consistent, $context);
            echo json_encode($node, $input->getOption('pretty') ? JSON_PRETTY_PRINT : 0) . PHP_EOL;
        } catch (\Throwable $e) {
            $errOutput->writeln($e->getMessage());
        }
    }
997560
protected function execute(InputInterface $input, OutputInterface $output) {
		if (!file_exists(\Skeleton\Database\Migration\Config::$migration_directory)) {
			throw new \Exception('Config::$migration_directory is not set to a valid directory');
		}

		$name = $input->getArgument('name');

		if (strpos($name, "\\") !== false) {
			$name = str_replace('\\', '/', $name);
		}

		if (strpos($name, '/') === false) {
			$path = $this->create_project_migration($name);
		} else {
			$path = $this->create_package_migration($name);
		}

		$output->writeln('New migration template created at ' . $path );
	}