Skip to content

Commit bfa7a6c

Browse files
committed
fix 8.3
1 parent ca118cf commit bfa7a6c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Rules/Properties/PropertyInClassRule.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ public function processNode(Node $node, Scope $scope): array
3232
return [];
3333
}
3434

35+
if (
36+
$node->isFinal()
37+
&& !$this->phpVersion->supportsFinalProperties()
38+
) {
39+
return [
40+
RuleErrorBuilder::message('Property cannot be final.')
41+
->nonIgnorable()
42+
->identifier('property.final')
43+
->build(),
44+
];
45+
}
46+
3547
if (!$this->phpVersion->supportsPropertyHooks()) {
3648
if ($node->hasHooks()) {
3749
return [
@@ -81,18 +93,6 @@ public function processNode(Node $node, Scope $scope): array
8193
];
8294
}
8395

84-
if (
85-
$node->isFinal()
86-
&& !$this->phpVersion->supportsFinalProperties()
87-
) {
88-
return [
89-
RuleErrorBuilder::message('Property cannot be final.')
90-
->nonIgnorable()
91-
->identifier('property.final')
92-
->build(),
93-
];
94-
}
95-
9696
if ($node->isPrivate()) {
9797
if ($node->isFinal()) {
9898
return [

0 commit comments

Comments
 (0)