protected function execute(InputInterface $input, OutputInterface $output) { $parser = new CFGParser((new ParserFactory())->create(ParserFactory::PREFER_PHP7)); $graphs = $this->getGraphsFromFiles($input->getArgument('files'), $input->getOption("exclude"), $parser); return $this->analyzeGraphs($graphs); }
protected function execute(InputInterface $input, OutputInterface $output) { $state = parent::execute($input, $output); $image = $input->getOption("image"); if ($image) { $parts = explode('.', $image); (new Printer\GraphViz())->printCfg($state->blocks)->export(end($parts), $image); } else { echo (new Printer\Text())->printCfg($state->blocks); } }