You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
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 includeT_INLINE_HTML
,T_HEREDOC
andT_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 usingPHP_CodeSniffer_Tokens::$textStringTokens
instead.These adjustments should only be pulled/merged when:
2.8.2 (or whatever else the next version will be called)2.9.02.8.22.9.0The text was updated successfully, but these errors were encountered: