Closed mwic closed 11 years ago
@mwic Could you copy/paste the exact snippet into a gist or somewhere that preserves formatting?
But yeah, I think that the WordPress.WhiteSpace.ControlStructureSpacing
sniff needs to be tweaked to be a little smarter about the control-structure formatting.
I make frequent use of comments on else control structures , so that I don't have to scroll around to see what condition is being else'd. e.g. if ( $parrotIsAlive ) { [snip] } else { //parrot has ceased to be [snip] }
With your standard I get a misleading message on this attempt. "Blank line found at start of control structure" Whether or not the comment is allowed, the message needs to be fixed
Full writeup: http://mwic.org/wp/index.php/blank-line-found-at-start-of-control-structure-when-there-isnt-a-blank-line-there