1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Add scanning of generic classes

This commit is contained in:
Brown 2018-10-30 13:01:01 -04:00
parent aef9fecaa3
commit 6732c5f5c2

View File

@ -288,18 +288,19 @@ abstract class Atomic
FileStorage $file_storage = null,
array $phantom_classes = []
) {
if ($this instanceof TNamedObject && !isset($phantom_classes[strtolower($this->value)])) {
$codebase->scanner->queueClassLikeForScanning(
$this->value,
$file_storage ? $file_storage->file_path : null,
false,
!$this->from_docblock
);
if ($file_storage) {
$file_storage->referenced_classlikes[] = $this->value;
}
if ($this instanceof TNamedObject) {
if (!isset($phantom_classes[strtolower($this->value)])) {
$codebase->scanner->queueClassLikeForScanning(
$this->value,
$file_storage ? $file_storage->file_path : null,
false,
!$this->from_docblock
);
return;
if ($file_storage) {
$file_storage->referenced_classlikes[] = $this->value;
}
}
}
if ($this instanceof TScalarClassConstant) {