Skip to content

Commit

Permalink
PreviousConnectingVisitor: Ignore Node\Arg
Browse files Browse the repository at this point in the history
Update UnresolvableQueryFunctionRuleTest.php

Update UnresolvableQueryFunctionRuleTest.php

Update UnresolvableQueryFunctionRuleTest.php
  • Loading branch information
staabm committed Dec 31, 2024
1 parent 525a9fa commit 33363d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/Ast/PreviousConnectingVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public function enterNode(Node $node)
&& ! $this->previous instanceof Node\FunctionLike
&& ! $this->previous instanceof Node\Stmt\ClassLike
&& ! $this->previous instanceof VirtualNode
&& ! $this->previous instanceof Node\Arg
&& ! $this->previous instanceof Node\Name
) {
$node->setAttribute(self::ATTRIBUTE_PREVIOUS, \WeakReference::create($this->previous));
}
Expand Down
4 changes: 2 additions & 2 deletions tests/rules/UnresolvableQueryFunctionRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public function testSyntaxErrorInQueryRule(): void
UnresolvableQueryMixedTypeException::getTip(),
],
[
'Unresolvable Query: Cannot simulate parameter value for type: mixed.',
'Unresolvable Query: Cannot resolve query with variable type: non-falsy-string.',
15,
UnresolvableQueryMixedTypeException::getTip(),
UnresolvableQueryStringTypeException::getTip(),
],
[
'Unresolvable Query: Cannot resolve query with variable type: string.',
Expand Down

0 comments on commit 33363d4

Please sign in to comment.