Skip to content

Commit 165e0fa

Browse files
committed
fixed ProxyCallVisitor
1 parent daed055 commit 165e0fa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Aop/ProxyCallVisitor.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function leaveNode(Node $node)
133133
unset($stmts);
134134
return $node;
135135
break;
136-
case $node instanceof StaticPropertyFetch && $this->extends:
136+
case ($node instanceof StaticPropertyFetch || $node instanceof StaticCall) && $this->extends:
137137
// Rewrite parent::$staticProperty to ParentClass::$staticProperty.
138138
if ($node->class instanceof Node\Name && $node->class->toString() === 'parent') {
139139
$node->class = new Name($this->extends->toCodeString());

tests/AstTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function getId() : int
116116
$__function__ = __FUNCTION__;
117117
$__method__ = __METHOD__;
118118
return self::__proxyCall(Bar3::class, __FUNCTION__, self::getParamsMap(Bar3::class, __FUNCTION__, func_get_args()), function () use($__function__, $__method__) {
119-
return parent::getId();
119+
return Bar::getId();
120120
});
121121
}
122122
}', $code);

0 commit comments

Comments
 (0)