From 6732c5f5c2c0939563f0bc63d640b99ef205b0dc Mon Sep 17 00:00:00 2001 From: Brown Date: Tue, 30 Oct 2018 13:01:01 -0400 Subject: [PATCH] Add scanning of generic classes --- src/Psalm/Type/Atomic.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Psalm/Type/Atomic.php b/src/Psalm/Type/Atomic.php index f507e03ef..55b03ff40 100644 --- a/src/Psalm/Type/Atomic.php +++ b/src/Psalm/Type/Atomic.php @@ -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) {