1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Scan configured global types

This commit is contained in:
Tinjo Schöni 2023-05-03 16:46:05 +02:00
parent 595388b7d7
commit 8c9b0eebf4
No known key found for this signature in database

View File

@ -238,6 +238,12 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements FileSour
$var_id = '$' . $var->name;
$functionlike_node_scanner->storage->global_variables[$var_id] = true;
if (isset($this->codebase->config->globals[$var_id])) {
$var_type = Type::parseString($this->codebase->config->globals[$var_id]);
/** @psalm-suppress UnusedMethodCall */
$var_type->queueClassLikesForScanning($this->codebase, $this->file_storage);
}
}
}
}