Skip to content

Commit 79326d6

Browse files
staabmondrejmirtes
authored andcommitted
Simplify *StatementWithoutImpurePointsRule
1 parent e3fd45f commit 79326d6

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

src/Rules/DeadCode/CallToMethodStatementWithoutImpurePointsRule.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ public function processNode(Node $node, Scope $scope): array
3030
foreach ($node->get(MethodWithoutImpurePointsCollector::class) as $collected) {
3131
foreach ($collected as [$className, $methodName, $classDisplayName]) {
3232
$className = strtolower($className);
33-
34-
if (!array_key_exists($className, $methods)) {
35-
$methods[$className] = [];
36-
}
3733
$methods[$className][strtolower($methodName)] = $classDisplayName . '::' . $methodName;
3834
}
3935
}

src/Rules/DeadCode/CallToStaticMethodStatementWithoutImpurePointsRule.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ public function processNode(Node $node, Scope $scope): array
3030
foreach ($node->get(MethodWithoutImpurePointsCollector::class) as $collected) {
3131
foreach ($collected as [$className, $methodName, $classDisplayName]) {
3232
$lowerClassName = strtolower($className);
33-
34-
if (!array_key_exists($lowerClassName, $methods)) {
35-
$methods[$lowerClassName] = [];
36-
}
3733
$methods[$lowerClassName][strtolower($methodName)] = $classDisplayName . '::' . $methodName;
3834
}
3935
}

0 commit comments

Comments
 (0)