analyzeDuplicateFunction() public static method

Check to see if the given Clazz is a duplicate
public static analyzeDuplicateFunction ( CodeBase $code_base, Phan\Language\Element\FunctionInterface $method ) : null
$code_base Phan\CodeBase
$method Phan\Language\Element\FunctionInterface
return null
コード例 #1
0
ファイル: Analysis.php プロジェクト: ablyler/phan
 /**
  * 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
ファイル: Analysis.php プロジェクト: etsy/phan
 /**
  * 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
ファイル: Analysis.php プロジェクト: black-silence/phan
 /**
  * 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);
         }
     }
 }