Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 17, 2025

Description

While the check for a double colon works correctly when there is no whitespace/comments between the tokens, there could still be unnecessary token walking if there was (whitespace/comments).

Fixed now.

Includes some extra tests (which would previously already pass, but now more efficiently).

Follow up to squizlabs/PHP_CodeSniffer#155

Suggested changelog entry

N/A

While the check for a double colon works correctly when there is no whitespace/comments between the tokens, there could still be unnecessary token walking if there was (whitespace/comments).

Fixed now.

Includes some extra tests (which would previously already pass, but now more efficiently).

Follow up to squizlabs/PHP_CodeSniffer 155
@jrfnl jrfnl merged commit 7ac171c into 4.x Apr 17, 2025
62 checks passed
@jrfnl jrfnl deleted the phpcs-4.0/feature/185-tokenizer-php-goto-label-minor-tweak branch April 17, 2025 15:37
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.

2 participants