Пример #1
0
 /**
  * Take a pass over all functions verifying various
  * states.
  *
  * @return null
  */
 public static function analyzeFunctions(CodeBase $code_base)
 {
     $function_count = count($code_base->getFunctionAndMethodSet());
     $i = 0;
     foreach ($code_base->getFunctionAndMethodSet() as $function_or_method) {
         CLI::progress('method', ++$i / $function_count);
         if ($function_or_method->isInternal()) {
             continue;
         }
         DuplicateFunctionAnalyzer::analyzeDuplicateFunction($code_base, $function_or_method);
         ParameterTypesAnalyzer::analyzeParameterTypes($code_base, $function_or_method);
     }
 }
Пример #2
0
 /**
  * Take a pass over all functions verifying various
  * states.
  *
  * @return null
  */
 public static function analyzeFunctions(CodeBase $code_base)
 {
     $function_count = count($code_base->getFunctionAndMethodSet());
     $i = 0;
     foreach ($code_base->getFunctionAndMethodSet() as $function_or_method) {
         CLI::progress('method', ++$i / $function_count);
         if ($function_or_method->isInternal()) {
             continue;
         }
         DuplicateFunctionAnalyzer::analyzeDuplicateFunction($code_base, $function_or_method);
         ParameterTypesAnalyzer::analyzeParameterTypes($code_base, $function_or_method);
         // Let any plugins analyze the methods or functions
         if ($function_or_method instanceof Func) {
             ConfigPluginSet::instance()->analyzeFunction($code_base, $function_or_method);
         } else {
             if ($function_or_method instanceof Method) {
                 ConfigPluginSet::instance()->analyzeMethod($code_base, $function_or_method);
             }
         }
     }
 }
Пример #3
0
 /**
  * Take a pass over all functions verifying various
  * states.
  *
  * @return null
  */
 public static function analyzeFunctions(CodeBase $code_base)
 {
     $function_count = count($code_base->getMethodMap(), COUNT_RECURSIVE);
     $i = 0;
     foreach ($code_base->getMethodMap() as $fqsen_string => $method_map) {
         foreach ($method_map as $name => $method) {
             CLI::progress('method', ++$i / $function_count);
             if ($method->isInternal()) {
                 continue;
             }
             DuplicateFunctionAnalyzer::analyzeDuplicateFunction($code_base, $method);
             ParameterTypesAnalyzer::analyzeParameterTypes($code_base, $method);
         }
     }
 }