Skip to content

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
Development

Successfully merging this pull request may close these issues.

1 participant