Skip to content

Commit 022a3c4

Browse files
committed
Change isFinal return type
1 parent 3cda6fc commit 022a3c4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Reflection/Php/PhpPropertyReflection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ public function isReadOnlyByPhpDoc(): bool
9999
return $this->isReadOnlyByPhpDoc;
100100
}
101101

102-
public function isFinal(): bool
102+
public function isFinal(): TrinaryLogic
103103
{
104-
return $this->isFinal;
104+
return TrinaryLogic::createFromBoolean($this->isFinal);
105105
}
106106

107107
public function getReadableType(): Type

src/Rules/Properties/OverridingPropertyRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function processNode(Node $node, Scope $scope): array
145145
))->identifier('property.parentPropertyFinal')
146146
->nonIgnorable()
147147
->build();
148-
} elseif ($prototype->isFinal()) {
148+
} elseif ($prototype->isFinal()->yes()) {
149149
$errors[] = RuleErrorBuilder::message(sprintf(
150150
'Property %s::$%s overrides @final property %s::$%s.',
151151
$classReflection->getDisplayName(),

src/Rules/Variables/UnsetRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function processNode(Node $node, Scope $scope): array
8181
} elseif ($this->phpVersion->supportsPropertyHooks()) {
8282
if (
8383
!$propertyReflection->isPrivate()
84-
&& !$propertyReflection->isFinal()
84+
&& !$propertyReflection->isFinal()->yes()
8585
&& !$propertyReflection->getDeclaringClass()->isFinal()
8686
) {
8787
$errors[] = RuleErrorBuilder::message(

0 commit comments

Comments
 (0)