diff --git a/src/Psalm/Internal/Codebase/Scanner.php b/src/Psalm/Internal/Codebase/Scanner.php index 7c3fd979d47..82b9a19234e 100644 --- a/src/Psalm/Internal/Codebase/Scanner.php +++ b/src/Psalm/Internal/Codebase/Scanner.php @@ -320,10 +320,12 @@ public function queueClassLikeForScanning( $public_mapped_properties = PropertyMap::getPropertyMap()[$fq_classlike_name_lc]; foreach ($public_mapped_properties as $public_mapped_property) { - if (strtolower($public_mapped_property) !== $fq_classlike_name_lc) { - $property_type = \Psalm\Type::parseString($public_mapped_property); - $property_type->queueClassLikesForScanning($this->codebase); - } + $property_type = \Psalm\Type::parseString($public_mapped_property); + $property_type->queueClassLikesForScanning( + $this->codebase, + null, + [$fq_classlike_name_lc => true] + ); } } }