Closed wilsonge closed 5 years ago
@wilsonge I would suggest looking at what gsherwood said in my PR for moving this sniff to the Core.
"There is no need for an indent property in this sniff if you are just trying to align the opening brace under the IF statement. PHPCS provides 'column' indexes in the tokens array so you know where to align things."
So maybe partially rewriting the sniff to use the column index
and not the indent property
would help in resolving the issue. (or maybe not)
Removing that makes sense. Merging this now as we've migrated the CMS onto codesniffer and this doesn't cause any issues there. I'll try and work on removing all the space checking from this sniff however too.
Case https://github.com/joomla/coding-standards/pull/242 missed a case - where we have a closure combined with a chained function call. This is the unit test to reproduce. Unfortunately currently struggling for the fix - hence the open PR
As always tagging @photodude just in case he has any great ideas :D