We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cf4239 commit 4a1ff4eCopy full SHA for 4a1ff4e
src/Parser/NewAssignedToPropertyVisitor.php
@@ -13,7 +13,10 @@ final class NewAssignedToPropertyVisitor extends NodeVisitorAbstract
13
public function enterNode(Node $node): ?Node
14
{
15
if ($node instanceof Node\Expr\Assign || $node instanceof Node\Expr\AssignRef) {
16
- if ($node->var instanceof Node\Expr\PropertyFetch && $node->expr instanceof Node\Expr\New_) {
+ if (
17
+ ($node->var instanceof Node\Expr\PropertyFetch || $node->var instanceof Node\Expr\StaticPropertyFetch)
18
+ && $node->expr instanceof Node\Expr\New_
19
+ ) {
20
$node->expr->setAttribute(self::ATTRIBUTE_NAME, $node->var);
21
}
22
0 commit comments