Esempio n. 1
0
 /**
  * This method performs the analysing process of the parsed source files. It
  * creates the required analyzers for the registered listeners and then
  * applies them to the source tree.
  *
  * @return void
  */
 private function performAnalyzeProcess()
 {
     $analyzerLoader = $this->createAnalyzerLoader($this->options);
     $collection = PHP_Depend_Code_Filter_Collection::getInstance();
     $this->fireStartAnalyzeProcess();
     ini_set('xdebug.max_nesting_level', $this->configuration->parser->nesting);
     foreach ($analyzerLoader as $analyzer) {
         // Add filters if this analyzer is filter aware
         if ($analyzer instanceof PHP_Depend_Metrics_FilterAwareI) {
             $collection->setFilter($this->codeFilter);
         }
         $analyzer->analyze($this->builder->getPackages());
         // Remove filters if this analyzer is filter aware
         $collection->setFilter();
         foreach ($this->loggers as $logger) {
             $logger->log($analyzer);
         }
     }
     ini_restore('xdebug.max_nesting_level');
     $this->fireEndAnalyzeProcess();
 }
Esempio n. 2
0
 /**
  * This method performs the analysing process of the parsed source files. It
  * creates the required analyzers for the registered listeners and then
  * applies them to the source tree.
  *
  * @return void
  */
 private function _performAnalyzeProcess()
 {
     $analyzerLoader = $this->_createAnalyzerLoader($this->_options);
     $collection = PHP_Depend_Code_Filter_Collection::getInstance();
     $this->fireStartAnalyzeProcess();
     foreach ($analyzerLoader as $analyzer) {
         // Add filters if this analyzer is filter aware
         if ($analyzer instanceof PHP_Depend_Metrics_FilterAwareI) {
             $collection->addFilter($this->_codeFilter);
         }
         $analyzer->analyze($this->_builder->getPackages());
         // Remove filters if this analyzer is filter aware
         if ($analyzer instanceof PHP_Depend_Metrics_FilterAwareI) {
             $collection->removeFilter($this->_codeFilter);
         }
         foreach ($this->_loggers as $logger) {
             $logger->log($analyzer);
         }
     }
     $this->fireEndAnalyzeProcess();
 }