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

Universal/DisallowInlineTabs: handle more tokens #320

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 23, 2024

While likely to be edge cases, there are a couple more tokens in which inline, non-indentation tabs can exist:

  • T_START_HEREDOC and T_START_NOWDOC - between the <<< and the identifiers.
  • T_YIELD_FROM - between the yield and the from keywords.

This updates the sniff to also handle those tokens.

Includes additional unit tests.

Loosely related to upstream changes which start doing tab replacement in these tokens too. Note: this PR is not dependent on the upstream changes and does not warrant raising the minimum supported PHPCS version.

While likely to be edge cases, there are a couple more tokens in which inline, non-indentation tabs can exist:
* `T_START_HEREDOC` and `T_START_NOWDOC` - between the `<<<` and the identifiers.
* `T_YIELD_FROM` - between the `yield` and the `from` keywords.

This updates the sniff to also handle those tokens.

Includes additional unit tests.

Loosely related to upstream changes which start doing tab replacement in these tokens too.
Note: this PR is _not_ dependent on the upstream changes and does not warrant raising the minimum supported PHPCS version.
@jrfnl jrfnl added this to the 1.2.x Next milestone Oct 23, 2024
@jrfnl jrfnl merged commit 82c468b into develop Oct 23, 2024
43 checks passed
@jrfnl jrfnl deleted the feature/universal-disallowinlinetabs-handle-yield-from branch October 23, 2024 04:01
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