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

Todo: PHPCS 2.9.0: adjust some register() functions #128

Closed
jrfnl opened this issue Apr 4, 2017 · 1 comment
Closed

Todo: PHPCS 2.9.0: adjust some register() functions #128

jrfnl opened this issue Apr 4, 2017 · 1 comment

Comments

@jrfnl
Copy link

jrfnl commented Apr 4, 2017

I've pulled a PR upstream in PHPCS which has just been merged, which will add a new PHP_CodeSniffer_Tokens::$textStringTokens array.

In contrast to the PHP_CodeSniffer_Tokens::$stringTokens array - which contains the tokens for typical PHP string variables, this new array will contain also include T_INLINE_HTML, T_HEREDOC and T_NOWDOC.

Up to now, we often would use PHP_CodeSniffer_Tokens::$stringTokens and add the other three for sniffs examining text, now this can be replaced by using PHP_CodeSniffer_Tokens::$textStringTokens instead.

These adjustments should only be pulled/merged when:

  • PHPCS has released version 2.8.2 (or whatever else the next version will be called) 2.9.0
  • WPCS has upped the minimum requirement to PHPCS 2.8.2 2.9.0
  • TRTCS has merged the "current" (future) version of WPCS containing the above change back in
@jrfnl jrfnl self-assigned this Apr 4, 2017
@jrfnl
Copy link
Author

jrfnl commented Apr 4, 2017

I've prepared the PR for this: https://github.com/WPTRT/WordPress-Coding-Standards/tree/feature/issue-128-use-new-token-array

As we need to wait for the next PHPCS release and WPCS upgrading, this PR can not be pulled yet.

When ready, newly merged sniffs (merged between now and when the prerequisites for this PR have been met) will need to be reviewed & potentially adjusted for the same.

@jrfnl jrfnl changed the title Todo: PHPCS 2.8.2: adjust some register() functions Todo: PHPCS 2.9.0: adjust some register() functions Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant