1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Fix Psalm errors

This commit is contained in:
shvlv 2023-01-25 11:32:41 +02:00
parent 6227943bfb
commit eca7079982
No known key found for this signature in database
GPG Key ID: 2062C18B717CE98A

View File

@ -64,10 +64,12 @@ class PhpStormMetaScanner
} elseif ($array_item->value instanceof PhpParser\Node\Scalar\String_) {
$map[$array_item->key->value] = $array_item->value->value;
}
} elseif ($array_item->key instanceof PhpParser\Node\Expr\ClassConstFetch
} elseif ($array_item
&& $array_item->key instanceof PhpParser\Node\Expr\ClassConstFetch
&& $array_item->key->class instanceof PhpParser\Node\Name\FullyQualified
&& $array_item->key->name instanceof PhpParser\Node\Identifier
) {
/** @var string|null $resolved_name */
$resolved_name = $array_item->key->class->getAttribute('resolvedName');
if (!$resolved_name) {
continue;