Skip to content

Commit

Permalink
Fix: Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Dec 13, 2024
1 parent 246ebcb commit 4b302a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Methods/NoParameterWithNullableTypeDeclarationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public function processNode(
return [];
}

$params = \array_filter($node->params, static function (Node\Param $node): bool {
$parametersWithNullableTypeDeclaration = \array_filter($node->params, static function (Node\Param $node): bool {
return self::isNullable($node);
});

if (0 === \count($params)) {
if (0 === \count($parametersWithNullableTypeDeclaration)) {
return [];
}

Expand All @@ -67,7 +67,7 @@ public function processNode(
return Rules\RuleErrorBuilder::message($message)
->identifier(ErrorIdentifier::noParameterWithContainerTypeDeclaration()->toString())
->build();
}, $params));
}, $parametersWithNullableTypeDeclaration));
}

$className = $classReflection->getName();
Expand All @@ -89,7 +89,7 @@ public function processNode(
return Rules\RuleErrorBuilder::message($message)
->identifier(ErrorIdentifier::noParameterWithContainerTypeDeclaration()->toString())
->build();
}, $params));
}, $parametersWithNullableTypeDeclaration));
}

private static function isNullable(Node\Param $node): bool
Expand Down

0 comments on commit 4b302a2

Please sign in to comment.