Skip to content

Commit 2808dfa

Browse files
herndlmondrejmirtes
authored andcommitted
Avoid additional irrelevant constructor-related checks in UnusedPrivatePropertyRule
1 parent eac5b1c commit 2808dfa

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Rules/DeadCode/UnusedPrivatePropertyRule.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,7 @@ public function processNode(Node $node, Scope $scope): array
158158
}
159159
}
160160

161-
$constructors = [];
162-
$classReflection = $scope->getClassReflection();
163-
if ($classReflection->hasConstructor()) {
164-
$constructors[] = $classReflection->getConstructor()->getName();
165-
}
166-
167-
[$uninitializedProperties] = $node->getUninitializedProperties($scope, $constructors, $this->extensionProvider->getExtensions());
161+
[$uninitializedProperties] = $node->getUninitializedProperties($scope, [], $this->extensionProvider->getExtensions());
168162

169163
$errors = [];
170164
foreach ($properties as $name => $data) {

0 commit comments

Comments
 (0)