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

Arrays::isShortArray()/Lists::isShortList(): bugfix for tokenizer issue icw short open tag #271

Merged
merged 1 commit into from
May 20, 2021

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented May 20, 2021

The tokenizer issue as tested for in the BC1 and BC2 test case files and described in squizlabs/PHP_CodeSniffer#1971, where a short array bracket is tokenized as a square bracket, also happens when the PHP short open echo tag is used to open PHP.

This commit accounts for this tokenizer bug in the Arrays::isShortArray() and the Lists::isShortList() methods and adds additional tests to safeguard the correct handling of this in the Arrays::isShortArray() and the Lists::isShortList() methods.

…ue icw short open tag

The tokenizer issue as tested for in the BC1 and BC2 test case files and described in squizlabs/php_codesniffer 1971, where a short array bracket is tokenized as a square bracket, also happens when the PHP short open echo tag is used to open PHP.

This commit accounts for this tokenizer bug in the `Arrays::isShortArray()` and the `Lists::isShortList()` methods and adds additional tests to safeguard the correct handling of this in the `Arrays::isShortArray()` and the `Lists::isShortList()` methods.
@jrfnl jrfnl force-pushed the arrays-lists/extra-fix-for-tokenizer-bug branch from f22f8e0 to b15bae4 Compare May 20, 2021 09:36
@jrfnl jrfnl merged commit 995ce07 into develop May 20, 2021
@jrfnl jrfnl deleted the arrays-lists/extra-fix-for-tokenizer-bug branch May 20, 2021 09:56
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