Skip to content

Commit 80b1e19

Browse files
committed
fix
1 parent 725022f commit 80b1e19

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

rules/Renaming/Rector/PropertyFetch/RenamePropertyRector.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ private function refactorPropertyFetch(PropertyFetch|StaticPropertyFetch $proper
124124
continue;
125125
}
126126

127-
$propertyFetch->name->name = $renamedProperty->getNewProperty();
127+
$propertyFetch->name = $propertyFetch instanceof PropertyFetch
128+
? new Identifier($renamedProperty->getNewProperty())
129+
: new VarLikeIdentifier($renamedProperty->getNewProperty());
128130
return $propertyFetch;
129131
}
130132

0 commit comments

Comments
 (0)