Skip to content
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

Add rule to block use of isset with multiple arguments #142

Closed
rmccue opened this issue May 23, 2019 · 3 comments
Closed

Add rule to block use of isset with multiple arguments #142

rmccue opened this issue May 23, 2019 · 3 comments
Assignees
Labels

Comments

@rmccue
Copy link
Member

rmccue commented May 23, 2019

IMO, isset( $a, $b ) is unclear, and there's no good reason to use it instead of the more explicit isset( $a ) && isset( $b )

Anyone have strong thoughts either way on this?

@pdewouters
Copy link
Contributor

I don't see it used that often, I don't think most people even know you can do that. But I don't think it unclear.

@fklein-lu
Copy link

I do prefer the isset( $a ) && isset( $b ) version, as it contains the logical operators, which isset( $a, $b ) does not. Or said differently the first version is clear, even if your understanding of PHP is moderate, the second one requires you to understand what this particular function does in detail.

@tfrommen tfrommen self-assigned this Oct 27, 2020
tfrommen added a commit that referenced this issue Feb 3, 2021
@tfrommen
Copy link
Contributor

tfrommen commented Feb 9, 2021

Closed as per 6ad1fc9.

@tfrommen tfrommen closed this as completed Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants