Check to see if the given Clazz is a duplicate
public static analyzeDuplicateFunction ( |
||
$code_base | ||
$method | Phan\Language\Element\FunctionInterface | |
return | null |
/** * 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); } }
/** * 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); } } } }
/** * 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); } } }