/** * {@inheritDoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $graph = new Digraph(); $logger = new NullLogger(); $compil = new Linking(new Builder(), new GraphBuilder($this->fineTuning, $graph, $logger)); $output->writeln(sprintf("Parsing %d files...", $this->phpfinder->count())); $compil->run($this->phpfinder->getIterator()); $output->writeln(sprintf("Processing digraph with %d vertices and %d edges...", count($graph->getVertexSet()), count($graph->getEdgeSet()))); $processed = $this->processGraph($graph, $output); $ff = new Factory(); $dumper = $ff->create($processed, $this->reportFormat); file_put_contents($this->reportName, $dumper->export()); $output->writeln("Report {$this->reportName} created"); if ($output->getVerbosity() == OutputInterface::VERBOSITY_VERBOSE) { $output->writeln(sprintf("<comment>%.0f MB used</comment>", memory_get_peak_usage() / 1000000.0)); } }