mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix #2296 - use case insensitive closure ids
This commit is contained in:
parent
4bf632bc23
commit
1f42843d42
@ -10,7 +10,7 @@ class ClosureAnalyzer extends FunctionLikeAnalyzer
|
||||
{
|
||||
$codebase = $source->getCodebase();
|
||||
|
||||
$function_id = $source->getFilePath()
|
||||
$function_id = strtolower($source->getFilePath())
|
||||
. ':' . $function->getLine()
|
||||
. ':' . (int)$function->getAttribute('startFilePos')
|
||||
. ':-:closure';
|
||||
|
@ -1380,7 +1380,7 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer implements Statements
|
||||
return ($namespace ? strtolower($namespace) . '\\' : '') . strtolower($this->function->name->name);
|
||||
}
|
||||
|
||||
return $this->getFilePath()
|
||||
return strtolower($this->getFilePath())
|
||||
. ':' . $this->function->getLine()
|
||||
. ':' . (int)$this->function->getAttribute('startFilePos')
|
||||
. ':-:closure';
|
||||
|
@ -485,7 +485,7 @@ class CallAnalyzer
|
||||
|
||||
$template_result->generic_params = $replace_template_result->generic_params;
|
||||
|
||||
$closure_id = $statements_analyzer->getFilePath()
|
||||
$closure_id = strtolower($statements_analyzer->getFilePath())
|
||||
. ':' . $arg->value->getLine()
|
||||
. ':' . (int)$arg->value->getAttribute('startFilePos')
|
||||
. ':-:closure';
|
||||
|
@ -1701,7 +1701,7 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
|
||||
$storage->visibility = ClassLikeAnalyzer::VISIBILITY_PUBLIC;
|
||||
}
|
||||
} else {
|
||||
$function_id = $cased_function_id = $this->file_path
|
||||
$function_id = $cased_function_id = strtolower($this->file_path)
|
||||
. ':' . $stmt->getLine()
|
||||
. ':' . (int) $stmt->getAttribute('startFilePos') . ':-:closure';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user