Skip to content

Commit a68383b

Browse files
authored
Update FinalPropertyPromotionRector.php
1 parent 1834fbf commit a68383b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

rules/Php85/Rector/Class_/FinalPropertyPromotionRector.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ public function getNodeTypes(): array
6767
*/
6868
public function refactor(Node $node): ?Node
6969
{
70-
$constructClassMethod = $node->getMethod(MethodName::CONSTRUCT);
71-
72-
if (! $constructClassMethod instanceof ClassMethod) {
70+
if ($node->isFinal()) {
7371
return null;
7472
}
73+
74+
$constructClassMethod = $node->getMethod(MethodName::CONSTRUCT);
7575

76-
if ($node->isFinal()) {
76+
if (! $constructClassMethod instanceof ClassMethod) {
7777
return null;
7878
}
7979

0 commit comments

Comments
 (0)