Skip to content

Commit

Permalink
Update ScopedPropertyAccessExpressionParser.php
Browse files Browse the repository at this point in the history
  • Loading branch information
joetannenbaum committed Feb 19, 2025
1 parent 2be5b0c commit 5823a57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Parsers/ScopedPropertyAccessExpressionParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use App\Contexts\AbstractContext;
use App\Contexts\Argument;
use App\Contexts\ArrayItem;
use App\Contexts\AssignmentValue;
use App\Contexts\MethodCall;
use Microsoft\PhpParser\Node\Expression\MemberAccessExpression;
Expand All @@ -22,6 +23,10 @@ public function parse(ScopedPropertyAccessExpression $node)
$this->context->methodName = $node->memberName->getFullText($node->getRoot()->getFullText());
$this->context->className = $this->resolveClassName($node);

if ($this->context->methodName === 'class') {
$this->context->methodName = null;
}

return $this->context;
}

Expand Down Expand Up @@ -59,6 +64,7 @@ public function initNewContext(): ?AbstractContext
if (
$this->context instanceof Argument
|| $this->context instanceof AssignmentValue
|| $this->context instanceof ArrayItem
) {
return new MethodCall;
}
Expand Down

0 comments on commit 5823a57

Please sign in to comment.