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
Unexpected „binary error“ #2899
Comments
PHPStan could implement DateFunctionDynamicReturnTypeExtension so it would understand that for some But you should understand that arithmetic operations between strings and numbers should be penalized, and that's what PHPStan is doing. Consider doing something like |
This is now trivial to implemented because PHPStan can now represent an intersection of StringType and AccessoryNumericStringType which is basically a numeric string: phpstan/phpstan-src@1d27c61 |
Implemented: phpstan/phpstan-src@1053ee7 |
love it, thx! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I dont expect this error
https://phpstan.org/r/737b904c-0630-4e1b-9245-893427a584ba
(Or maybe the phpstan error sounds too much like an error and is more a warning)
As the code works as expected https://3v4l.org/tifuR
The text was updated successfully, but these errors were encountered: