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

#142 - Add new Isset sniff #236

Merged
merged 2 commits into from
Feb 3, 2021
Merged

#142 - Add new Isset sniff #236

merged 2 commits into from
Feb 3, 2021

Conversation

tfrommen
Copy link
Contributor

This PR adds a new sniff, HM.PHP.Isset that throws an error for isset calls with more than one argument, as per request in #142.

I wasn't sure if wanted to make this an error, or just a warning. Looking at existing warnings and errors, I think we are rather inconsistent. Some Layout and opinionated sniffs throw errors, while others just warn about stuff that makes perfect sense to follow.

Thoughts?

Do we want to make this a part of HM-Minimum?

@tfrommen tfrommen self-assigned this Oct 27, 2020
@rmccue
Copy link
Member

rmccue commented Oct 28, 2020

I wasn't sure if wanted to make this an error, or just a warning.

Right now, they're treated the same by most of our tooling, so it doesn't really matter. Generally though I'd say stylistic stuff would be a warning, if we do ever want to fix that in the future.

Do we want to make this a part of HM-Minimum?

No, as it's not required to build a secure/performant site.

@tfrommen
Copy link
Contributor Author

@rmccue @kadamwhite I just changed this to add a waning now, not an error.

Is this good to go in? 🙂

@tfrommen tfrommen merged commit 6ad1fc9 into master Feb 3, 2021
@tfrommen tfrommen deleted the isset-sniff branch February 3, 2021 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants