Skip to content

Commit 33363d4

Browse files
committed
PreviousConnectingVisitor: Ignore Node\Arg
Update UnresolvableQueryFunctionRuleTest.php Update UnresolvableQueryFunctionRuleTest.php Update UnresolvableQueryFunctionRuleTest.php
1 parent 525a9fa commit 33363d4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Ast/PreviousConnectingVisitor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public function enterNode(Node $node)
3838
&& ! $this->previous instanceof Node\FunctionLike
3939
&& ! $this->previous instanceof Node\Stmt\ClassLike
4040
&& ! $this->previous instanceof VirtualNode
41+
&& ! $this->previous instanceof Node\Arg
42+
&& ! $this->previous instanceof Node\Name
4143
) {
4244
$node->setAttribute(self::ATTRIBUTE_PREVIOUS, \WeakReference::create($this->previous));
4345
}

tests/rules/UnresolvableQueryFunctionRuleTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public function testSyntaxErrorInQueryRule(): void
4747
UnresolvableQueryMixedTypeException::getTip(),
4848
],
4949
[
50-
'Unresolvable Query: Cannot simulate parameter value for type: mixed.',
50+
'Unresolvable Query: Cannot resolve query with variable type: non-falsy-string.',
5151
15,
52-
UnresolvableQueryMixedTypeException::getTip(),
52+
UnresolvableQueryStringTypeException::getTip(),
5353
],
5454
[
5555
'Unresolvable Query: Cannot resolve query with variable type: string.',

0 commit comments

Comments
 (0)