Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading