-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
minor: NativeFunctionTypeDeclarationCasingFixer - Add null
and false
support
#6427
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
Conversation
null
and false
sup…null
and false
support
7c760b1
to
3af0201
Compare
rebased on latest, no other changes |
Can we support also |
yeah sure @Wirone , thanks for pointing it out! If you have time and want to take a try at it please send a PR to my fork :) |
@SpacePossum I'll be glad if you do fast-forward merge and include my commits in this PR 😉 I think you should do the rebase in order to use #6558, I'll do rebase of SpacePossum#1 then too. |
ed3b948
to
68a1f8a
Compare
sprintf('<?php class T { public function Foo(%s $A): %1$s {return %1$s;}}', $type), | ||
sprintf('<?php class T { public function Foo(%s $A): %1$s {return %1$s;}}', strtoupper($type)), |
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.
IMHO:
- it's not readable enough, would be better with explicit
null
return null;
is not required here becausenull
here is not a type, it's a scalar value. And that's why tests are failing becauseNativeFunctionTypeDeclarationCasingFixer
is related to types so it's not its responsibility to fix values' casing.
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.
thanks updated 👍
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.
if you want, feel free to take over this PR, I'm juggling to many PR's already 😅 and I think you know more about this change in PHP8.2
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.
Ok, I can do it, but how to do it technically? Should I take this branch to my fork and open new MR?
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.
Yeah, or on your fork make a new branch from latest, than cherrypick the one commit from here (I already squashed the commits), than make a new PR and we should be good :)
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.
@SpacePossum OK, I've created #6623 🙂
c1fa861
to
bc2eb76
Compare
will be finalized in #6623 , thanks all reviewers 👍 |
Add missing support for
null
andfalse