Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5823a57

Browse filesBrowse files
committed
Update ScopedPropertyAccessExpressionParser.php
1 parent 2be5b0c commit 5823a57
Copy full SHA for 5823a57

File tree

1 file changed

+6
-0
lines changed
Filter options

1 file changed

+6
-0
lines changed

‎app/Parsers/ScopedPropertyAccessExpressionParser.php

Copy file name to clipboardExpand all lines: 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.