Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f78306a

Browse files
committedFeb 11, 2025
check child parent not node parent
1 parent 009c486 commit f78306a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎app/Parsers/MemberAccessExpressionParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function parse(MemberAccessExpression $node)
3030

3131
if ($child instanceof Variable) {
3232
if ($child->getName() === 'this') {
33-
if ($node->getParent() instanceof CallExpression) {
33+
if ($child->getParent()->getParent() instanceof CallExpression) {
3434
// They are calling a method on the current class
3535
$result = $this->context->nearestClassDefinition();
3636

0 commit comments

Comments
 (0)
Please sign in to comment.