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
encoding functions returns non-empty-string #1664
Conversation
9fc3872
to
c19840c
Compare
the error in composer is valid and it was there before this PR:
since the error message changed because generics are involved now, the already existing ignore-line no longer mutes it |
stubs/core.stub
Outdated
/** | ||
* @template T as string | ||
* @param T $string | ||
* @return (T is non-empty-string ? non-empty-string : string) |
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.
You don't need generics for this, ($string is non-empty-string ? non-empty-string : string)
should work just as well. Please edit all of these fuctions.
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.
good catch, fixed.
917d380
to
51632fa
Compare
Thank you! |
analog vimeo/psalm#8431
fixes https://phpstan.org/r/3a8a8430-1d4c-4bb9-99a8-f3838932f1e6