-
Notifications
You must be signed in to change notification settings - Fork 129
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
Fix closure indent issue and add tests #218
Conversation
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. |
Nice if you're up for that would be really good to not have to maintain it ourselves :P |
@wilsonge see squizlabs/PHP_CodeSniffer#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.