SebastianBergmann\PHPLOC\CLI\Command::executeSingle PHP Method

executeSingle() private method

private executeSingle ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : null | integer
$input Symfony\Component\Console\Input\InputInterface An InputInterface instance
$output Symfony\Component\Console\Output\OutputInterface An OutputInterface instance
return null | integer null or 0 if everything went fine, or an error code
    private function executeSingle(InputInterface $input, OutputInterface $output)
    {
        $count = $this->count($input->getArgument('values'), $input->getOption('exclude'), $this->handleCSVOption($input, 'names'), $this->handleCSVOption($input, 'names-exclude'), $input->getOption('count-tests'));
        if (!$count) {
            $output->writeln('No files found to scan');
            exit(1);
        }
        $printer = new Text();
        $printer->printResult($output, $count, $input->getOption('count-tests'));
        if ($input->getOption('log-csv')) {
            $printer = new Single();
            $printer->printResult($input->getOption('log-csv'), $count);
        }
        if ($input->getOption('log-xml')) {
            $printer = new XML();
            $printer->printResult($input->getOption('log-xml'), $count);
        }
    }