Skip to content

Universal/DisallowInlineTabs: handle more tokens#320

Merged
jrfnl merged 1 commit intodevelopfrom
feature/universal-disallowinlinetabs-handle-yield-from
Oct 23, 2024
Merged

Universal/DisallowInlineTabs: handle more tokens#320
jrfnl merged 1 commit intodevelopfrom
feature/universal-disallowinlinetabs-handle-yield-from

Conversation

@jrfnl
Copy link
Copy Markdown
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
@jrfnl jrfnl deleted the feature/universal-disallowinlinetabs-handle-yield-from branch October 23, 2024 04:01
@jrfnl jrfnl modified the milestones: 1.2.x Next, 1.3.0 Apr 20, 2025
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