mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
allow assertion to work on $var::class
This commit is contained in:
parent
5282e4728b
commit
834d831915
@ -2565,7 +2565,9 @@ class AssertionFinder
|
||||
$this_class_name,
|
||||
$source
|
||||
);
|
||||
} elseif ($getclass_expr instanceof PhpParser\Node\Expr\ClassConstFetch) {
|
||||
} elseif ($getclass_expr instanceof PhpParser\Node\Expr\ClassConstFetch
|
||||
&& $getclass_expr->class instanceof PhpParser\Node\Expr
|
||||
) {
|
||||
$var_name = ExpressionIdentifier::getArrayVarId(
|
||||
$getclass_expr->class,
|
||||
$this_class_name,
|
||||
@ -3268,7 +3270,9 @@ class AssertionFinder
|
||||
$this_class_name,
|
||||
$source
|
||||
);
|
||||
} elseif ($getclass_expr instanceof PhpParser\Node\Expr\ClassConstFetch) {
|
||||
} elseif ($getclass_expr instanceof PhpParser\Node\Expr\ClassConstFetch
|
||||
&& $getclass_expr->class instanceof PhpParser\Node\Expr
|
||||
) {
|
||||
$var_name = ExpressionIdentifier::getArrayVarId(
|
||||
$getclass_expr->class,
|
||||
$this_class_name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user