-
-
Notifications
You must be signed in to change notification settings - Fork 374
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] Add concat support on ReturnTypeFromStrictScalarReturnExprRector to be string #3435
Conversation
…xprRector to be string
For combine of integer type, I think that need to be skipped as possibly used as float. |
d621c90
to
e76a1dd
Compare
cf5b05e
to
7596dca
Compare
All checks have passed 🎉 @TomasVotruba it is ready for review. |
After some check, concat actually always be string, even object concated:
|
All checks have passed 🎉 @TomasVotruba I think it is ready. |
Thank you 👍 |
{ | ||
public function run() | ||
{ | ||
return 1 . 1; |
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.
this could also be float 1.1
(meaning the .
is not a concat op, but a decimal separator )
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.
1.1 is float, but 1 . 1 is concat;
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.
Oh wow. didn‘t realize whitespace is significant in this case. Makes sense
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.
Seems suprising enough, that we should have a separate unit case for it?
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.
I think not needed, 1.1 is exactly Dnumber :), 1 . 1 is Concat
…xprRector to be string (#3435) Co-authored-by: GitHub Action <[email protected]>
direct return concat will always be string, ref https://3v4l.org/mfs5l unless defined.