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

describeSet() private method

private describeSet ( Symfony\Component\Console\Output\OutputInterface $output, string $name )
$output Symfony\Component\Console\Output\OutputInterface
$name string
    private function describeSet(OutputInterface $output, $name)
    {
        if (!in_array($name, $this->getSetNames(), true)) {
            throw new DescribeNameNotFoundException($name, 'set');
        }
        $ruleSet = new RuleSet(array($name => true));
        $rules = $ruleSet->getRules();
        ksort($rules);
        $fixers = $this->getFixers();
        $output->writeln(sprintf('<info>Description of</info> %s <info>set.</info>', $name));
        $output->writeln('');
        $help = '';
        foreach ($rules as $rule => $config) {
            /** @var FixerDefinitionInterface $definition */
            $definition = $fixers[$rule]->getDefinition();
            $help .= sprintf(" * <info>%s</info>%s\n   | %s\n%s\n", $rule, $fixers[$rule]->isRisky() ? ' <error>risky</error>' : '', $definition->getSummary(), true !== $config ? sprintf("   <comment>| Configuration: %s</comment>\n", $this->arrayToText($config)) : '');
        }
        $output->write($help);
    }