Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TypeDeclaration] Introducing ClosureReturnTypeRector to handle closure types separately #6106

Merged
merged 8 commits into from
Jul 3, 2024

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Jul 3, 2024

Closes rectorphp/rector#8678

At the moment we have single AddArrowFunctionReturnTypeRector to handle these cases. I think it makes sense, as in the wild there is hundreds of methods/functions, but much less callbacks/arrow functions. So it's easier to review these cases without granulation.

This rule ClosureReturnTypeRector will handle all closure cases. It will keep ClassMethod and Fuction_ rules separated and granulated, and easier to add types to closures in a separete Rector run :)

@TomasVotruba TomasVotruba changed the title tv single closure [TypeDeclaratoin] Introducing ClosureReturnTypeRector to handle closure types separately Jul 3, 2024
@TomasVotruba TomasVotruba changed the title [TypeDeclaratoin] Introducing ClosureReturnTypeRector to handle closure types separately [TypeDeclaration] Introducing ClosureReturnTypeRector to handle closure types separately Jul 3, 2024
@TomasVotruba
Copy link
Member Author

Let's 🚢 it 👍

@TomasVotruba TomasVotruba merged commit fd5f15c into main Jul 3, 2024
33 checks passed
@TomasVotruba TomasVotruba deleted the tv-single-closure branch July 3, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DX] Allow more granulated return type completion, to separate from closures and makes easier to review
2 participants