mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix #1113 - treat class_alias as always global
This commit is contained in:
parent
2195caaeae
commit
cfcb65aaac
@ -615,10 +615,10 @@ class Scanner
|
||||
foreach ($file_storage->constants as $name => $type) {
|
||||
$this->codebase->addGlobalConstantType($name, $type);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($file_storage->classlike_aliases as $aliased_name => $unaliased_name) {
|
||||
$this->codebase->classlikes->addClassAlias($unaliased_name, $aliased_name);
|
||||
}
|
||||
foreach ($file_storage->classlike_aliases as $aliased_name => $unaliased_name) {
|
||||
$this->codebase->classlikes->addClassAlias($unaliased_name, $aliased_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -384,12 +384,10 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
|
||||
}
|
||||
|
||||
if ($first_arg_value && $second_arg_value) {
|
||||
if ($this->codebase->register_stub_files || $this->codebase->register_autoload_files) {
|
||||
$this->codebase->classlikes->addClassAlias(
|
||||
$first_arg_value,
|
||||
$second_arg_value
|
||||
);
|
||||
}
|
||||
$this->codebase->classlikes->addClassAlias(
|
||||
$first_arg_value,
|
||||
$second_arg_value
|
||||
);
|
||||
|
||||
$this->file_storage->classlike_aliases[strtolower($second_arg_value)] = $first_arg_value;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user