-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
ReturnUnionTypeRector now skips nullable types, to prepare space for new nullable rule as off PHP 7.1+ #6105
Conversation
062625f
to
ef2f75c
Compare
@@ -26,7 +26,7 @@ namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnUnionTypeRector\ | |||
final class FalseBoolDocblock | |||
{ | |||
/** | |||
* @return array|false some description | |||
* @return array|bool some description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new rule to update sub type by docblock seems needed, to ensure not introduce phpstan notice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docblock changes are out of our scope since Rector 0.15. This will have to be dealt manualy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will ok for 1 or 2 files, but for many files, imo, that's worth it, I think coding-style
or code-quality
set will match that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's beyond our scope. I'd leave that for manual review or custom set 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this seems rather rare case.
Ref rectorphp/rector#8707