Closed photodude closed 6 years ago
@mbabker @wilsonge, This now solves the closure issue and works with anonymous classes
Nice one!
Thanks, I couldn't have done it if the PHPCS owner hadn't pointed me to the right function to figure out when we were in a closure so we could add more to the indent. I don't want to think about how many hours I spent over the past 20 vacation days to figure this out. I'm just glad it's done and we can move forward with preparing a stable release.
On a side note: PHPCS said they would consider a PR to add this control structure brackets sniff to the General standard since it's a common thing to put brackets on their own line.
On a side note: PHPCS said they would consider a PR to add this control structure brackets sniff to the General standard since it's a common thing to put brackets on their own line.
Nice if you're up for that would be really good to not have to maintain it ourselves :P
@wilsonge see https://github.com/squizlabs/PHP_CodeSniffer/pull/1847 for the PR
This adds tests and fixes the closure indent issue in #206
Simple solution to check if the current token has a condition of being inside of a closure or anonymous class.