Skip to content

Commit 783ff15

Browse files
ArshidArshid
authored andcommitted
Support Param nodes in makeNonFinal()
1 parent b4564da commit 783ff15

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function refactor(Node $node): null
9292
continue;
9393
}
9494

95-
$this->makeNonFinal($param);
95+
$this->visibilityManipulator->makeNonFinal($param);
9696

9797
$this->addPhpDocTag($param);
9898

@@ -101,20 +101,6 @@ public function refactor(Node $node): null
101101
return null;
102102
}
103103

104-
public function makeNonFinal(Param $node): void
105-
{
106-
if (! $this->isFinal($node)) {
107-
return;
108-
}
109-
110-
$node->flags -= Modifiers::FINAL;
111-
}
112-
113-
private function isFinal(Param $node): bool
114-
{
115-
return (bool) ($node->flags & Modifiers::FINAL);
116-
}
117-
118104
private function addPhpDocTag(Property|Param $node): bool
119105
{
120106
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node);

0 commit comments

Comments
 (0)