Skip to content
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

Modern code/Extra: Add checks for USE declarations #1164

Closed
wants to merge 1 commit into from

Conversation

GaryJones
Copy link
Member

Adds checks for:

  • Single space after use keyword.
  • One use keyword per declaration.
  • use declarations must go after first namespace declaration.
  • One blank line after last use statement.

https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php

@jrfnl
Copy link
Member

jrfnl commented Sep 23, 2017

I'd like to ask to hold off on this one for a little as I'm working on a few far more comprehensive sniffs which will cover what was discussed in #1071. Had to focus on something else for a while, but am getting back to those.
You can see one of the (finished) sniffs already in https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/tree/feature/1071-use-statement-order-sniff, but as the sniffs are related, my intention was to pull them round the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants