Skip to content

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Jul 21, 2025

Fixes rectorphp/rector#9276

Make less noise by check non-native type for NeverType, for use on ExplicitReturnNullRector, as the SilentVoidResolver is used by strict typed rules as well, I added $withNativeNeverType flag that default to true and use as false on this to allow non-native @return never type use to avoid noise for addition returns.

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @calebdw

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit e329dbc into main Jul 21, 2025
47 checks passed
@samsonasik samsonasik deleted the skip-never-by-doc branch July 21, 2025 15:06
@TomasVotruba
Copy link
Member

Looks good 👍

@calebdw
Copy link
Contributor

calebdw commented Jul 21, 2025

Wow, y'all move soo fast! 🤯

samsonasik added a commit that referenced this pull request Jul 21, 2025
…llRector (#7078)

* [CodeQuality] Skip Never type by @return docblock on ExplicitReturnNullRector

* Fix
@github-actions
Copy link
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect behavior of ExplicitReturnNullRector

4 participants