Skip to content

Commit 5823a57

Browse files
committed
Update ScopedPropertyAccessExpressionParser.php
1 parent 2be5b0c commit 5823a57

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/Parsers/ScopedPropertyAccessExpressionParser.php

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Contexts\AbstractContext;
66
use App\Contexts\Argument;
7+
use App\Contexts\ArrayItem;
78
use App\Contexts\AssignmentValue;
89
use App\Contexts\MethodCall;
910
use Microsoft\PhpParser\Node\Expression\MemberAccessExpression;
@@ -22,6 +23,10 @@ public function parse(ScopedPropertyAccessExpression $node)
2223
$this->context->methodName = $node->memberName->getFullText($node->getRoot()->getFullText());
2324
$this->context->className = $this->resolveClassName($node);
2425

26+
if ($this->context->methodName === 'class') {
27+
$this->context->methodName = null;
28+
}
29+
2530
return $this->context;
2631
}
2732

@@ -59,6 +64,7 @@ public function initNewContext(): ?AbstractContext
5964
if (
6065
$this->context instanceof Argument
6166
|| $this->context instanceof AssignmentValue
67+
|| $this->context instanceof ArrayItem
6268
) {
6369
return new MethodCall;
6470
}

0 commit comments

Comments
 (0)