protected function getGlobPathsFromStringOption($option, $rootDir, Path $file) { if (!is_string($option)) { throw new InvalidConfigurationException('coverage_clover XML file is not readable'); } $path = $file->toAbsolutePath($option, $rootDir); return $this->getGlobPaths($path); }
protected function execute(InputInterface $input, OutputInterface $output) { $stopwatch = new Stopwatch(); $stopwatch->start(__CLASS__); $file = new Path(); if ($input->getOption('root_dir') !== '.') { $this->rootDir = $file->toAbsolutePath($input->getOption('root_dir'), $this->rootDir); } $config = $this->loadConfiguration($input, $this->rootDir); $this->logger = $config->isVerbose() && !$config->isTestEnv() ? new ConsoleLogger($output) : new NullLogger(); $this->executeApi($config); $event = $stopwatch->stop(__CLASS__); $time = number_format($event->getDuration() / 1000, 3); $mem = number_format($event->getMemory() / (1024 * 1024), 2); $this->logger->info(sprintf('elapsed time: <info>%s</info> sec memory: <info>%s</info> MB', $time, $mem)); return 0; }