Skip to content

Sniff: Add new isShortList() utility function#635

Merged
wimg merged 1 commit intomasterfrom
feature/is-short-list-utility-function
Jun 10, 2018
Merged

Sniff: Add new isShortList() utility function#635
wimg merged 1 commit intomasterfrom
feature/is-short-list-utility-function

Conversation

@jrfnl
Copy link
Copy Markdown
Member

@jrfnl jrfnl commented Apr 1, 2018

... to determine whether a short array is in actual fact a short list syntax.

The utility method also accounts for two different PHPCS tokenizer bugs, one which affects PHPCS 1.5.x and the other which affects PHPCS 2.0 - 2.7.x.
There may be more tokenizer bugs we need to account for, but these are the ones I've found so far.

Includes dedicated unit tests.

This new utility function is needed for three five new sniffs + one existing sniff, which all deal with, or at least have to be able to recognize, short list constructs.

... to determine whether a short array is a short list syntax.

Includes unit tests.
@wimg wimg merged commit 05dd5a1 into master Jun 10, 2018
@jrfnl jrfnl deleted the feature/is-short-list-utility-function branch June 10, 2018 16:03
@jrfnl jrfnl modified the milestones: Future release, 8.2.0 Jun 11, 2018
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