Skip to content

Commit

Permalink
Fix: Rename parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Dec 13, 2024
1 parent 4b2f92d commit 5eec667
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 @@ -92,14 +92,14 @@ public function processNode(
}, $parametersWithNullableTypeDeclaration);
}

private static function hasNullableTypeDeclaration(Node\Param $node): bool
private static function hasNullableTypeDeclaration(Node\Param $parameter): bool
{
if ($node->type instanceof Node\NullableType) {
if ($parameter->type instanceof Node\NullableType) {
return true;
}

if ($node->type instanceof Node\UnionType) {
foreach ($node->type->types as $type) {
if ($parameter->type instanceof Node\UnionType) {
foreach ($parameter->type->types as $type) {
if (!$type instanceof Node\Identifier) {
continue;
}
Expand Down

0 comments on commit 5eec667

Please sign in to comment.