[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.
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.
1.1 is float, but 1 . 1 is concat;
There was a problem hiding this comment.
Oh wow. didn‘t realize whitespace is significant in this case. Makes sense
There was a problem hiding this comment.
Seems suprising enough, that we should have a separate unit case for it?
There was a problem hiding this comment.
I think not needed, 1.1 is exactly Dnumber :), 1 . 1 is Concat
…xprRector to be string (#3435) Co-authored-by: GitHub Action <actions@github.com>
direct return concat will always be string, ref https://3v4l.org/mfs5l unless defined.