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.
1 parent 84a67bb commit f48c3c3Copy full SHA for f48c3c3
rules/Symfony73/GetMethodToAsTwigAttributeTransformer.php
@@ -58,6 +58,8 @@ public function transformClassGetMethodToAttributeMarker(
58
return false;
59
}
60
61
+ $originalMethod = clone $getMethod;
62
+
63
$hasChanged = false;
64
foreach ((array) $getMethod->stmts as $stmt) {
65
// handle return array simple case
@@ -94,7 +96,8 @@ public function transformClassGetMethodToAttributeMarker(
94
96
if ($this->isLocalCallable($secondArg->value)) {
95
97
$localMethodName = $this->localArrayMethodCallableMatcher->match($secondArg->value, $objectType);
98
if (! is_string($localMethodName)) {
- continue;
99
+ $getMethod = $originalMethod;
100
+ return false;
101
102
103
$localMethod = $class->getMethod($localMethodName);
0 commit comments