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

Add more dobclocks types for scanning

Fixes #2907
This commit is contained in:
Matthew Brown 2020-03-05 00:58:23 -05:00
parent 0644f5ab3a
commit 8a1067e4e6

View File

@ -1387,6 +1387,12 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
$extended_union_type->setFromDocblock();
$extended_union_type->queueClassLikesForScanning(
$this->codebase,
$this->file_storage,
$storage->template_types ?: []
);
foreach ($extended_union_type->getAtomicTypes() as $atomic_type) {
if (!$atomic_type instanceof Type\Atomic\TGenericObject) {
if (IssueBuffer::accepts(
@ -1494,6 +1500,12 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
$implemented_union_type->setFromDocblock();
$implemented_union_type->queueClassLikesForScanning(
$this->codebase,
$this->file_storage,
$storage->template_types ?: []
);
foreach ($implemented_union_type->getAtomicTypes() as $atomic_type) {
if (!$atomic_type instanceof Type\Atomic\TGenericObject) {
if (IssueBuffer::accepts(
@ -1601,6 +1613,12 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
$used_union_type->setFromDocblock();
$used_union_type->queueClassLikesForScanning(
$this->codebase,
$this->file_storage,
$storage->template_types ?: []
);
foreach ($used_union_type->getAtomicTypes() as $atomic_type) {
if (!$atomic_type instanceof Type\Atomic\TGenericObject) {
if (IssueBuffer::accepts(