Skip to content

Conversation

VasekPurchart
Copy link
Contributor

Since T_OPEN_SQUARE_BRACKET is replaced with T_OPEN_SHORT_ARRAY during tokenization this should be also being detected.

Also there was previously (afaik) no test for normal array() (but this worked thanks to the long array using T_OPEN_PARENTHESIS).

@gsherwood gsherwood merged commit d50aa4b into squizlabs:master Apr 24, 2015
@gsherwood
Copy link
Member

Thanks a lot for this fix. I also applied one to the Squiz.Formatting.OperatorBracket sniff at the same time.

@gsherwood gsherwood changed the title Squiz.WhiteSpace.OperatorSpacing - minus sign (negative number) in short array should not be reported Squiz.WhiteSpace.OperatorSpacing reports negative number in short array Apr 24, 2015
@VasekPurchart VasekPurchart deleted the operator-spacing-vs-arrays branch April 24, 2015 07:34
jrfnl added a commit to jrfnl/PHP_CodeSniffer that referenced this pull request Jul 29, 2024
…ting-add-section-on-finding-issues-to-work-on CONTRIBUTING GUIDE: add section about finding issues to work on for code contributions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants