-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
refactor: fix phpstan
only boolean allowed
#9302
refactor: fix phpstan
only boolean allowed
#9302
Conversation
👋 Hi, @neznaika0! |
f6bb767
to
37a924d
Compare
0bf76f5
to
f3a85de
Compare
f3a85de
to
c31d553
Compare
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.
Why is null
typed into a string so many times? In many cases it is not necessary. I was just looking at the code, I don't know if phpstan forces such typing? In many places it is very strange.
See comment @paulbalandan
Short code for check null or empty string. Empty string is incorrect to pass in the parameter. |
@neznaika0 It would be easier if you could respond under the code you're referring to. Okay, for |
If the value can be |
This is not a general conversation about |
c31d553
to
0b85e5c
Compare
0b85e5c
to
26f3fb6
Compare
@michalsn revert comparison with |
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.
Thank you!
Thank you, @neznaika0 |
Description
Fixed all errors like
I tried to apply the typing adequately during the checks. For a more accurate fix, you need to update the code instead of phpdoc.
It is possible to additionally check for
null, false, <empty-string>
somewhereFixed 92 errors out of 3925
Checklist: