public function reset() { $this->finder = ParsedPhpFileFinder::deprecationFinder($this->finder->getParser(), $this->finder->getOutput()); }
/** * @param Configuration $configuration * @param OutputInterface $output * * @return DeprecationDetector */ public function create(Configuration $configuration, OutputInterface $output) { $this->symbolTable = new SymbolTable(); $deprecationProgressOutput = new VerboseProgressOutput(new ProgressBar($output), $configuration->isVerbose(), 'Deprecation detection'); $deprecationUsageParser = $this->getUsageParser($configuration); $deprecationUsageFinder = ParsedPhpFileFinder::usageFinder($deprecationUsageParser, $deprecationProgressOutput); $this->ancestorResolver = new AncestorResolver($deprecationUsageParser); $ruleSetProgressOutput = new VerboseProgressOutput(new ProgressBar($output), $configuration->isVerbose(), 'RuleSet generation'); $ruleSetDeprecationParser = $this->getDeprecationParser(); $ruleSetDeprecationFinder = ParsedPhpFileFinder::deprecationFinder($ruleSetDeprecationParser, $ruleSetProgressOutput); $deprecationDirectoryTraverser = new DirectoryTraverser($ruleSetDeprecationFinder); $violationDetector = $this->getViolationDetector($configuration); $renderer = $this->getRenderer($configuration, $output); $ruleSetLoader = $this->getRuleSetLoader($deprecationDirectoryTraverser, $configuration); $progressOutput = new DefaultProgressOutput($output, new Stopwatch()); return new DeprecationDetector($this->getPredefinedRuleSet(), $ruleSetLoader, $this->ancestorResolver, $deprecationUsageFinder, $violationDetector, $renderer, $progressOutput); }