Skip to content

Commit 776e845

Browse files
committed
fixup! Replace error-prone instanceof in Rules classes
1 parent f9c0e13 commit 776e845

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Rules/TooWideTypehints/TooWideMethodReturnTypehintRule.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ public function processNode(Node $node, Scope $scope): array
8282

8383
$returnType = TypeCombinator::union(...$returnTypes);
8484
if (
85-
!$isFirstDeclaration
86-
&& !$method->isPrivate()
85+
!$method->isPrivate()
8786
&& ($returnType->isNull()->yes() || $returnType->isTrue()->yes() || $returnType->isFalse()->yes())
87+
&& !$isFirstDeclaration
8888
) {
8989
return [];
9090
}

0 commit comments

Comments
 (0)