diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php index ca71f4a4..dfdce36b 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php @@ -112,9 +112,12 @@ private function processParams(ClassMethod|Function_|Closure $node): ?Node } /** + * @template TNode of Closure|ClassMethod|Function_ + * @param TNode $node * @param ClosureUse[]|Param[] $array + * @return TNode|null */ - private function cleanTrailingComma(Closure|ClassMethod|Function_ $node, array $array): ?Node + private function cleanTrailingComma(Closure|ClassMethod|Function_ $node, array $array): Closure|ClassMethod|Function_|null { $lastPosition = array_key_last($array); diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php index f6d7b1ea..f4c6dbf3 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php @@ -92,9 +92,12 @@ public function refactor(Node $node): ?Node } /** + * @template TNode of MethodCall|StaticCall|New_|FuncCall + * @param TNode $node * @param Arg[] $args + * @return TNode|null */ - private function removeNamedArguments(MethodCall|StaticCall|New_|FuncCall $node, array $args): ?Node + private function removeNamedArguments(MethodCall|StaticCall|New_|FuncCall $node, array $args): FuncCall|MethodCall|New_|StaticCall|null { if ($node instanceof New_) { $functionLikeReflection = $this->reflectionResolver->resolveMethodReflectionFromNew($node);