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

PHPCSDebug/TokenList: visualize whitespace in PHP 7.3+ heredoc/nowdoc closers #110

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jul 29, 2022

Since PHP 7.3, heredoc/nowdoc closers may be indented.
This indent can use either tabs or spaces and the indent is included in the T_END_HEREDOC/T_END_NOWDOC token contents.

This commit adds whitespace visualization for these tokens.

No tests included as the tests would only work on PHP 7.3 and would break the pre-existing tests for PHP < 7.3 (due to the token stream being broken for flexible heredocs/nowdocs in PHP < 7.3).

Related: squizlabs/PHP_CodeSniffer#3639

… closers

Since PHP 7.3, heredoc/nowdoc closers may be indented.
This indent can use either tabs or spaces and the indent is included in the `T_END_HEREDOC`/`T_END_NOWDOC` token contents.

This commit adds whitespace visualization for these tokens.

No tests included as the tests would only work on PHP 7.3 and would break the pre-existing tests for PHP < 7.3 (due to the token stream being broken for flexible heredocs/nowdocs in PHP < 7.3).
@jrfnl jrfnl added this to the 2.0.0 milestone Jul 29, 2022
@jrfnl jrfnl merged commit 29f6a5e into develop Jul 29, 2022
@jrfnl jrfnl deleted the phpcsdebug/tokenlist-visualize-whitespace-flexible-heredoc-nowdoc branch July 29, 2022 15:47
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.

1 participant