Skip to content

Commit

Permalink
Fix: Reset keys
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Nov 30, 2024
1 parent 295d81c commit bf6bddc
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/Closures/NoParameterWithNullDefaultValueRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function processNode(
return [];
}

return \array_map(static function (Node\Param $node): Rules\RuleError {
return \array_values(\array_map(static function (Node\Param $node): Rules\RuleError {
/** @var Node\Expr\Variable $variable */
$variable = $node->var;

Expand All @@ -70,6 +70,6 @@ public function processNode(
));

return $ruleErrorBuilder->identifier(ErrorIdentifier::noParameterWithNullDefaultValue()->toString())->build();
}, $params);
}, $params));
}
}
4 changes: 2 additions & 2 deletions src/Closures/NoParameterWithNullableTypeDeclarationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function processNode(
return [];
}

return \array_map(static function (Node\Param $node): Rules\RuleError {
return \array_values(\array_map(static function (Node\Param $node): Rules\RuleError {
/** @var Node\Expr\Variable $variable */
$variable = $node->var;

Expand All @@ -66,7 +66,7 @@ public function processNode(
));

return $ruleErrorBuilder->identifier(ErrorIdentifier::noParameterWithNullableTypeDeclaration()->toString())->build();
}, $params);
}, $params));
}

private static function isNullable(Node\Param $node): bool
Expand Down
4 changes: 2 additions & 2 deletions src/Functions/NoParameterWithNullDefaultValueRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function processNode(

$functionName = $node->namespacedName;

return \array_map(static function (Node\Param $node) use ($functionName): Rules\RuleError {
return \array_values(\array_map(static function (Node\Param $node) use ($functionName): Rules\RuleError {
/** @var Node\Expr\Variable $variable */
$variable = $node->var;

Expand All @@ -73,6 +73,6 @@ public function processNode(
));

return $ruleErrorBuilder->identifier(ErrorIdentifier::noParameterWithNullDefaultValue()->toString())->build();
}, $params);
}, $params));
}
}
4 changes: 2 additions & 2 deletions src/Functions/NoParameterWithNullableTypeDeclarationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function processNode(

$functionName = $node->namespacedName;

return \array_map(static function (Node\Param $node) use ($functionName): Rules\RuleError {
return \array_values(\array_map(static function (Node\Param $node) use ($functionName): Rules\RuleError {
/** @var Node\Expr\Variable $variable */
$variable = $node->var;

Expand All @@ -69,7 +69,7 @@ public function processNode(
));

return $ruleErrorBuilder->identifier(ErrorIdentifier::noParameterWithNullableTypeDeclaration()->toString())->build();
}, $params);
}, $params));
}

private static function isNullable(Node\Param $node): bool
Expand Down
8 changes: 4 additions & 4 deletions src/Methods/NoConstructorParameterWithDefaultValueRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function processNode(
$classReflection = $scope->getClassReflection();

if ($classReflection->isAnonymous()) {
return \array_map(static function (Node\Param $node): Rules\RuleError {
return \array_values(\array_map(static function (Node\Param $node): Rules\RuleError {
/** @var Node\Expr\Variable $variable */
$variable = $node->var;

Expand All @@ -75,12 +75,12 @@ public function processNode(
));

return $ruleErrorBuilder->identifier(ErrorIdentifier::noConstructorParameterWithDefaultValue()->toString())->build();
}, $params);
}, $params));
}

$className = $classReflection->getName();

return \array_map(static function (Node\Param $node) use ($className): string {
return \array_values(\array_map(static function (Node\Param $node) use ($className): string {
/** @var Node\Expr\Variable $variable */
$variable = $node->var;

Expand All @@ -92,6 +92,6 @@ public function processNode(
$className,
$parameterName,
);
}, $params);
}, $params));
}
}
4 changes: 2 additions & 2 deletions src/Methods/NoParameterWithNullDefaultValueRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function processNode(
$classReflection = $scope->getClassReflection();

if ($classReflection->isAnonymous()) {
return \array_map(static function (Node\Param $node) use ($methodName): Rules\RuleError {
return \array_values(\array_map(static function (Node\Param $node) use ($methodName): Rules\RuleError {
/** @var Node\Expr\Variable $variable */
$variable = $node->var;

Expand All @@ -78,7 +78,7 @@ public function processNode(
));

return $ruleErrorBuilder->identifier(ErrorIdentifier::noParameterWithNullDefaultValue()->toString())->build();
}, $params);
}, $params));
}

$className = $classReflection->getName();
Expand Down

0 comments on commit bf6bddc

Please sign in to comment.