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

force blank line above multiple catch, elseif, else #14

Open
ofbeaton opened this issue Jul 27, 2015 · 0 comments
Open

force blank line above multiple catch, elseif, else #14

ofbeaton opened this issue Jul 27, 2015 · 0 comments

Comments

@ofbeaton
Copy link
Owner

Large catch/elseif/else blocks are hard to read. Let's enforce a blank line above them.

if (blah) {
  somecode();

} elseif (bleh) {
  someothercode();
}

We would need to implement our own sniff for this.

It may possibly trigger warnings in other sniffs (Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose) if we do it. So we'll need to look at those as well.

It should be able to auto-correct using phpcbf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant