diff --git a/src/Rules/Variables/DefinedVariableRule.php b/src/Rules/Variables/DefinedVariableRule.php index 662c806e0e..2fe965c4ba 100644 --- a/src/Rules/Variables/DefinedVariableRule.php +++ b/src/Rules/Variables/DefinedVariableRule.php @@ -57,6 +57,10 @@ public function processNode(Node $node, Scope $scope): array ->identifier('variable.undefined') ->metadata([ 'variableName' => $node->name, + 'statementDepth' => $node->getAttribute('statementDepth'), + 'statementOrder' => $node->getAttribute('statementOrder'), + 'depth' => $node->getAttribute('expressionDepth'), + 'order' => $node->getAttribute('expressionOrder'), ]) ->build(), ]; @@ -69,6 +73,10 @@ public function processNode(Node $node, Scope $scope): array ->identifier('variable.maybeUndefined') ->metadata([ 'variableName' => $node->name, + 'statementDepth' => $node->getAttribute('statementDepth'), + 'statementOrder' => $node->getAttribute('statementOrder'), + 'depth' => $node->getAttribute('expressionDepth'), + 'order' => $node->getAttribute('expressionOrder'), ]) ->build(), ];