Skip to content

Commit 85fd1a4

Browse files
committed
isFinal can be asked outside of $constructor instanceof PhpMethodReflection
1 parent 8d619a6 commit 85fd1a4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Rules/Classes/NewStaticRule.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ public function processNode(Node $node, Scope $scope): array
7474
}
7575
}
7676

77-
if ($constructor instanceof PhpMethodReflection) {
78-
if ($constructor->isFinal()->yes()) {
79-
return [];
80-
}
77+
if ($constructor->isFinal()->yes()) {
78+
return [];
79+
}
8180

81+
if ($constructor instanceof PhpMethodReflection) {
8282
$prototype = $constructor->getPrototype();
8383
if ($prototype->isAbstract()) {
8484
return [];

0 commit comments

Comments
 (0)