Mmoreram\PHPFormatter\Command\UseSortCommand::printConfigUsed PHP Method

printConfigUsed() private method

Print the configuration used by the command.
private printConfigUsed ( Symfony\Component\Console\Output\OutputInterface $output, array $options ) : UseSortCommand
$output Symfony\Component\Console\Output\OutputInterface Output
$options array Options used by the command
return UseSortCommand self Object
    private function printConfigUsed(OutputInterface $output, array $options)
    {
        $verbose = $output->getVerbosity();
        /*
         * If verbose level is higher or equal than -vv, we print the config
         * file data, if is not empty.
         */
        if ($verbose >= OutputInterface::VERBOSITY_VERBOSE) {
            $output->writeln('# Executing process with this configuration');
            if (!empty($options['group'])) {
                foreach ($options['group'] as $group) {
                    $output->writeln('#   --group="' . $group . '"');
                }
            }
            if (!empty($options['group-type'])) {
                $output->writeln('#   --group-type="' . $options['group-type'] . '"');
            }
            if (!empty($options['group-skip-empty'])) {
                $output->writeln('#   --group-skip-empty="' . $options['group-skip-empty'] . '"');
            }
            if (!empty($options['sort-type'])) {
                $output->writeln('#   --sort-type="' . $options['sort-type'] . '"');
            }
            if (!empty($options['sort-direction'])) {
                $output->writeln('#   --sort-direction="' . $options['sort-direction'] . '"');
            }
        }
        $output->writeln('#');
        return $this;
    }