PhpCsFixer\Console\Command\DescribeCommand::describeList PHP Method

describeList() private method

private describeList ( Symfony\Component\Console\Output\OutputInterface $output, string $type )
$output Symfony\Component\Console\Output\OutputInterface
$type string 'rule'|'set'
    private function describeList(OutputInterface $output, $type)
    {
        if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE) {
            $describe = array('set' => $this->getSetNames(), 'rules' => $this->getFixers());
        } elseif ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
            $describe = 'set' === $type ? array('set' => $this->getSetNames()) : array('rules' => $this->getFixers());
        } else {
            return;
        }
        /** @var string[] $items */
        foreach ($describe as $list => $items) {
            $output->writeln(sprintf('<comment>Defined %s:</comment>', $list));
            foreach ($items as $name => $item) {
                $output->writeln(sprintf('* <info>%s</info>', is_string($name) ? $name : $item));
            }
        }
    }