-
Notifications
You must be signed in to change notification settings - Fork 24
chore: remove occurrences of empty()
#374
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
c55c870
to
53e4757
Compare
May i ask why those bool casts are favored instead of replacing I just try to understand the pro and con of this variant 🤔 |
I'm in favor of removing |
Aaah, good reminder, didn't catch that we're using it that often already 😬 I'm in favor of using explicit checks over implicit bool casts as well - at least for errors. And I'm afraid that with merging #369 I created some conflict here |
53e4757
to
d78db53
Compare
Alright! Explicit checks added on arrays |
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.
only make cs
and we're good to go - thanks @alexandre-daubois! :)
d78db53
to
4f31d04
Compare
Ah yes of course, done 🙂 |
empty()
is used less and less in favor of bool casts on arrays. Symfony, for example, banned it from its codebase. I suggest we remove them from here as well.