-
Notifications
You must be signed in to change notification settings - Fork 538
strtr
returns non-empty-string
#1963
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
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.
tbh, I don't know why this test got more precise with this change :)
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.
Because preg_replace is impacted by your changes. By using selectFromArgs, conditional return type is resolved.
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.
results before this PR:
https://phpstan.org/r/8833f01d-4202-4163-bf72-982f9729c3c9
This pull request has been marked as ready for review. |
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.
since strtr
has multiple signatures, I had to use selectFromArgs()
here.
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.
Because preg_replace is impacted by your changes. By using selectFromArgs, conditional return type is resolved.
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.
Looking at the extension, could we replace it with stubs with conditional return types instead?
I think we could, but it would be a rather complicated conditional, which needs to cover for |
Thank you. |
No description provided.