Closed earthiverse closed 3 months ago
@earthiverse The issue you have identified is due to a long-time known design-flaw (one error hiding behind another) in the sniff and will not be fixed. Instead, new, more configurable sniffs will be made available to eventually replace the Squiz.Arrays.ArrayDeclaration
sniff.
In the mean time, I'd like to suggest the Universal.WhiteSpace.CommaSpacing
sniff as a way to still check the spacing around the comma, even when you have the Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned
eror silenced.
Universal.WhiteSpace.CommaSpacing works, thanks!
Is your feature request related to a problem?
Right now, the following code is correctly sniffed with
Squiz.Arrays.ArrayDeclaration.SpaceBeforeComma
However, if you have different "length" keys (in this example,
aa
is two characters), it no longer warnsDescribe the solution you'd like
I would like the ability to enable this sniff even if keys are of different "lengths"
Additional context (optional)