diff --git a/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php b/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php index 2f256dcb..26d08ffe 100644 --- a/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php +++ b/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php @@ -237,6 +237,11 @@ private function isEqualScope(Match_ $match, ?Scope $containerScope): bool return $matchScope->getParentScope() === $containerScope->getParentScope(); } + /** + * @template TNode of Arg|FuncCall|Assign|Expression|Return_ + * @param TNode $containerArrowFunction + * @return TNode|null + */ private function refactorInArrowFunction( Arg|FuncCall|Assign|Expression|Return_ $containerArrowFunction, ArrowFunction $arrowFunction, diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php index 7090be30..7c9033b5 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php @@ -146,6 +146,11 @@ private function isParamSkipped(Param $param): bool return $param->type instanceof IntersectionType; } + /** + * @template TFunctionLike of ClassMethod|Closure|Function_ + * @param TFunctionLike $functionLike + * @return TFunctionLike + */ private function replaceNewInParams(ClassMethod|Closure|Function_ $functionLike): ClassMethod|Closure|Function_ { $isConstructor = $functionLike instanceof ClassMethod && $this->isName($functionLike, MethodName::CONSTRUCT); diff --git a/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php b/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php index 8717f092..82c1ce14 100644 --- a/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php +++ b/rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php @@ -81,6 +81,11 @@ public function refactor(Node $node): ?Node return $this->processClassLike($node); } + /** + * @template TFunctionLike of ClassMethod|Function_|Closure|ArrowFunction + * @param TFunctionLike $functionLike + * @return TFunctionLike|null + */ private function processFunctionLike( ClassMethod|Function_|Closure|ArrowFunction $functionLike ): null|ClassMethod|Function_|Closure|ArrowFunction {