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

[CodeQuality] Skip posible return array + response on ResponseReturnTypeControllerActionRector #660

Merged
merged 5 commits into from
Aug 12, 2024

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Aug 12, 2024

ref rectorphp/rector-src#6200 (review)

it currently got incorrect return:

-    public function editAction(Request $request, $id = null)
+    public function editAction(Request $request, $id = null): ?array

Applied rules:
 * ResponseReturnTypeControllerActionRector

This PR fix it.

@samsonasik
Copy link
Member Author

Fixed 🎉

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I think it is ready.

@samsonasik
Copy link
Member Author

@TomasVotruba I am merging it to have faster feedback to test ;)

@samsonasik samsonasik merged commit 54b6049 into main Aug 12, 2024
6 checks passed
@samsonasik samsonasik deleted the skip-possible-array branch August 12, 2024 18:50
@samsonasik
Copy link
Member Author

I found another many use cases that it got invalid ?array if the Response return is from custom method non-native return, I will add only return when natively

@TomasVotruba
Copy link
Member

Looks good 👍

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.

2 participants