We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 55d2ea8 + f193040 commit f8e8b5fCopy full SHA for f8e8b5f
src/TypedLocalVariableChecker.php
@@ -70,7 +70,13 @@ private static function filterStatementsVar(array $stmts): \Generator
70
continue;
71
}
72
73
- yield $expr->expr->var->name => ['expr' => $expr->expr] + $expr->expr->getAttribute(self::CONTEXT_ATTRIBUTE_KEY);
+ /** @var array{context_var: Union, statements_source: StatementsSource}|null $assign_variable_context */
74
+ $assign_variable_context = $expr->expr->getAttribute(self::CONTEXT_ATTRIBUTE_KEY);
75
+ if ($assign_variable_context === null) {
76
+ continue;
77
+ }
78
+
79
+ yield $expr->expr->var->name => ['expr' => $expr->expr] + $assign_variable_context;
80
81
82
0 commit comments