mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Always hoist constants if in config
This commit is contained in:
parent
033bf3db16
commit
8107587929
@ -426,7 +426,7 @@ class DependencyFinderVisitor extends PhpParser\NodeVisitorAbstract implements P
|
||||
?: Type::getMixed();
|
||||
$const_name = $first_arg_value->value;
|
||||
|
||||
if ($this->functionlike_storages) {
|
||||
if ($this->functionlike_storages && !$this->config->hoist_constants) {
|
||||
$functionlike_storage =
|
||||
$this->functionlike_storages[count($this->functionlike_storages) - 1];
|
||||
$functionlike_storage->defined_constants[$const_name] = $const_type;
|
||||
|
Loading…
x
Reference in New Issue
Block a user