You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With PHP_CodeSniffer version 2.7.0 and the PSR2 standard this reports:
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
16 | ERROR | [x] Line indented incorrectly; expected at least 12 spaces,
| | found 8 (Generic.WhiteSpace.ScopeIndent.Incorrect)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
If there's only one function, the error isn't reported.
The text was updated successfully, but these errors were encountered:
gsherwood
changed the title
Anonymous functions break ScopeIndent
Indented function call with multiple closure arguments can cause scope indent error
Nov 24, 2016
I've fixed this case now. Closures themselves don't cause problems, but when you've also indented the function call and put a second one in there without any sort of line breaks, it got confused because it didn't process the closing parenthesis after the } and so didn't reset the indent. It does now.
With PHP_CodeSniffer version 2.7.0 and the PSR2 standard this reports:
If there's only one function, the error isn't reported.
The text was updated successfully, but these errors were encountered: