Skip to content

Commit 9e40328

Browse files
Try
1 parent 7eccdaf commit 9e40328

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Rules/Classes/NewStaticRule.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,8 @@ public function processNode(Node $node, Scope $scope): array
8989
&& $scope->isInTrait()
9090
) {
9191
$traitReflection = $scope->getTraitReflection();
92-
if ($traitReflection->hasConstructor()) {
93-
$traitConstructor = $traitReflection->getConstructor();
94-
95-
if ($traitConstructor instanceof PhpMethodReflection && $traitConstructor->isAbstract()) {
96-
return [];
97-
}
92+
if ($traitReflection->hasConstructor() && $traitReflection->getConstructor()->isAbstract()) {
93+
return [];
9894
}
9995
}
10096

0 commit comments

Comments
 (0)