Returns OutputInterface verbosity as parameter that can be used in cli command

@param OutputInterface $output
@return string
481312
public function getVerbosityAsParameter(OutputInterface $output)
    {
        switch ($output->getVerbosity()) {
            case OutputInterface::VERBOSITY_DEBUG:
                $verbosity = ' -vvv';
                break;
            case OutputInterface::VERBOSITY_VERY_VERBOSE:
                $verbosity = ' -vv';
                break;
            case OutputInterface::VERBOSITY_VERBOSE:
                $verbosity = ' -v';
                break;
            case OutputInterface::VERBOSITY_QUIET:
                $verbosity = ' -q';
                break;
            case OutputInterface::VERBOSITY_NORMAL:
            default:
                $verbosity = '';
        }
        return $verbosity;
    }
1261486
protected function newProgressBar(OutputInterface $output)
    {
        // If the console output is not decorated (i.e. it does not support
        // ANSI), use NullOutput to suppress the progress bar entirely.
        $progressOutput = $output->isDecorated() ? $output : new NullOutput();

        return new ProgressBar($progressOutput);
    }
685298
protected function process(OutputInterface $output, $class)
    {
        $reflection = new \ReflectionClass($class);
        if ($reflection->isAbstract()) {
            $output->writeln(sprintf(
                '<language>%s</language> is abstract, skipping...',
                $reflection->name
            ), OutputInterface::VERBOSITY_VERBOSE);
            return false;
        }

        if (!$reflection->isSubclassOf(Language::class)) {
            $output->writeln(sprintf(
                '<language>%s</language> is not Language, skipping...',
                $reflection->name
            ), OutputInterface::VERBOSITY_VERBOSE);
            return false;
        }

        if ($reflection->getMethod('getMetadata')->getDeclaringClass()->name !== $reflection->name) {
            $output->writeln(sprintf(
                '<language>%s</language>::<info>getAliases</info> is not declared, skipping...',
                $reflection->name
            ), OutputInterface::VERBOSITY_VERBOSE);
            return false;
        }

        $result = array_merge(
            [$reflection->name], // Class name
            array_replace(Language::getMetadata(), call_user_func([$reflection->name, 'getMetadata'])) // metadata with default values
        );
        $output->writeln(var_export($result, true), OutputInterface::VERBOSITY_VERBOSE);

        return $result;
    }
261780
public function getRepoURL(InputInterface $input, OutputInterface $output)
    {
        return 'git@github.com:' . $this->gitHubUsername($input,$output) . '/' . $this->repoName($input) . '.git';
    }
965643
protected function addOutputFormatterStyles(OutputInterface $output)
    {
        foreach ($this->getOutputFormatterStyles() as $name => $style) {
            $output->getFormatter()->setStyle($name, $style);
        }
    }
888110
protected function getGithubUserNameFromConfig(OutputInterface $output)
    {
        $username = $this->parser->getGitHubUsername();
        if (is_null($username)) {
            $this->showErrorRunLlumInitFirst($output,'username');
        }
        return $username;
    }
1340384
protected function outputFixMessage(OutputInterface $output)
    {
        $output->writeln('');
        $output->writeln("<error>    Oh dear \xF0\x9F\x98\xA2     </error>");
        $output->writeln('');
        $output->writeln("<info>Sadly, not all checks went well</info>");
        $output->writeln('<info>But this is no reason to give up!</info>');
        $output->writeln('<info>Remember: This check was to verifiy if Gerrie is working to avoid unnecessary problems.</info>');
        $output->writeln("<info>So get up, grab a \xE2\x98\x95  and try to fix the failing checks.</info>");
        $output->writeln('');
        $output->writeln('<info>If you don`t know how to solve this "problem(s)":</info>');
        $output->writeln('<info>  * have a look at the documentation</info>');
        $output->writeln('<info>  * or open an issue on GitHub</info>');
        $output->writeln('');
        $output->writeln('<info>Do not be afraid. You can execute this check whenever you want.</info>');
        $output->writeln('<info>It is for free and breaks nothing :)</info>');
        $output->writeln("<info>So keep \xF0\x9F\x8E\xB8  and cu next time \xF0\x9F\x91\x8B</info>");
        $output->writeln('');
    }
463414
protected function getWriter(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
    {
        $outputFile = $input->getOption('output');
        if ($input->getOption('edit')) {
            if ($outputFile !== $this->getDefinition()->getOption('output')->getDefault()) {
                throw new \InvalidArgumentException("You cannot specify both --edit (-e) and --output (-f)");
            }
            $outputFile = $input->getOption('edit');
        }

        $writer = Writer\Factory::createWriter($input->getOption('output-format') ?: $input->getOption('input-format') ?: 'json');
        if (null === $outputFile && $output instanceof Console\Output\StreamOutput) {
            $writer->setOutput($output->getStream());
        } else {
            $writer->setOutput(fopen($outputFile ?: 'php://stdout', 'w'));
        }
        return $writer;
    }
868808
private function getPasswordQuestionValidator(OutputInterface $output)
    {
        return function ($value) use ($output) {
            /**
             * @var ConstraintViolationListInterface
             */
            $errors = $this->get('validator')->validate($value, [new NotBlank()]);
            foreach ($errors as $error) {
                throw new \DomainException($error->getMessage());
            }

            return $value;
        };
    }
1149124
private function isTtyTerminal(StreamOutput $output)
    {
        $tty = function_exists('posix_isatty') && @posix_isatty($output->getStream());
        if ($tty) {
            putenv("PERIDOT_TTY=1");
        }
        return $tty;
    }
13054
protected function getProgramOptions(
        InputInterface $input,
        OutputInterface $output
    ) {
        $opts = array();

        foreach ($this->getDefinition()->getOptions() as $o) {
            $name = $o->getName();
            if (! array_key_exists($name, $this->programOptions )) {
                continue;
            }
            $value = $input->getOption($name);
            if ($o->acceptValue() && $value !== null) {
                $opts[$this->programOptions[$name]] = $value;
            } else if (! $o->acceptValue() && $value === true) {
                $opts[] = $this->programOptions[$name];
            }
        }

        return array_merge(
            $opts,
            $this->getVerbosityOptions($output->getVerbosity())
        );
    }
1122622
public function describe(OutputInterface $output, $object, array $options = [])
	{
		$this->output = $output;

		switch (true)
		{
			case $object instanceof Application:
				$this->describeJoomlaApplication($object, $options);

				break;

			case $object instanceof AbstractCommand:
				$this->describeConsoleCommand($object, $options);

				break;

			default:
				parent::describe($output, $object, $options);
		}
	}
993510
public function output ($output)
    {
        $request = Craft::$app->getRequest();

        if ( $request->isCpRequest || $request->isLivePreview || $request->getAcceptsJson() ) {
            return $output;
        }

        return $this->generateAndAttachLinkHeaders($output);
    }
382069
public function create(OutputInterface $output) : LoggerInterface
    {
        $logger        = new Logger('browscap');
        $consoleLogger = new ConsoleLogger($output);
        $psrHandler    = new PsrHandler($consoleLogger);

        $logger->pushHandler($psrHandler);
        $logger->pushHandler(new ErrorLogHandler(ErrorLogHandler::OPERATING_SYSTEM, Logger::NOTICE));

        ErrorHandler::register($logger);

        return $logger;
    }
337733
public function parseLogOutput($output, array $arguments = array())
    {
        if (!isset($arguments['--pretty=']) || Git::PRETTY_FORMAT !== $arguments['--pretty=']) {
            // non pretty results are not supported
            return $output;
        }

        $xml = '<log>' . $output . '</log>';

        $sxml = simplexml_load_string($xml);

        $retval = array();
        foreach ($sxml->logentry as $entry) {
            $revision = (string) $entry->commit;
            $date     = (string) $entry->date;
            $author   = (string) $entry->author;
            $message  = (string) $entry->msg;

            $retval[] = new Commit($revision, new \DateTime($date), $author, trim($message));
        }

        return $retval;
    }
67445
private function output(OutputInterface $output, array $response)
    {
        $this->printList($output,
            ['Name', 'Key', 'Type', 'Public', 'Outdated', 'Updated At', 'Bad Licenses', 'Unknown Licenses'],
            ['name', 'id', 'project_type', 'public', 'out_number', 'updated_at', 'licenses_red', 'licenses_unknown'],
            $response,
            function ($key, $value) use ($output) {
                if (in_array($key, ['Outdated', 'Bad Licenses', 'Unknown Licenses'], true)) {
                    return $this->printBoolean($output, $value === 0 ? 'No' : $value, $value, !$value, false);
                }

                return $value;
            }
        );

        $this->printTable($output,
            ['Name', 'Stable', 'Outdated', 'Current', 'Requested', 'Licenses', 'Vulnerabilities'],
            ['name', 'stable', 'outdated', 'version_current', 'version_requested', 'licenses', 'security_vulnerabilities'],
            $response['dependencies'],
            function ($key, $value) use ($output) {
                if ('licenses' === $key) {
                    return implode(', ', array_column($value, 'name'));
                }
                if ('stable' === $key) {
                    return $this->printBoolean($output, 'Yes', 'No', $value, false);
                }
                if ('outdated' === $key) {
                    return $this->printBoolean($output, 'No', 'Yes', !$value, false);
                }

                if ('security_vulnerabilities' === $key) {
                    if (is_array($value)) {
                        return $this->printBoolean($output, 'No', implode(', ', array_column($value, 'cve')), count($value) === 0, false);
                    }

                    return $this->printBoolean($output, 'No', 'Yes', true, false);
                }

                return $value;
            }
        );
    }
629749
public function sayWelcome(OutputInterface $output)
    {
        $breakline = '';
        $output = $this->createBlockTitle($output);
        $title = $this->formatAsTitle('RCHCapistranoBundle - Continuous Deployment');

        $welcome = array(
            $breakline,
            $title,
            $breakline,
            'This bundle provides continuous deployment for Symfony2+ using <comment>Capistrano</comment>',
            'Created by Robin Chalas - github.com/chalasr',
            $breakline,
        );

        $output->writeln($welcome);
    }