Skip to content

Commit

Permalink
DefinedVariableRule - more metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 18, 2020
1 parent 5329639 commit b2b305e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Rules/Variables/DefinedVariableRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
];
Expand All @@ -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(),
];
Expand Down

0 comments on commit b2b305e

Please sign in to comment.