djoos / Symfony-coding-standard

Development repository for the Symfony coding standard
MIT License
401 stars 102 forks source link

Update Unary operator spacing sniff for arrays #156

Closed mmoll closed 5 years ago

mmoll commented 5 years ago

Unary operators must be adjacent to variables but this was working incorrectly for arrays. For example [0]++ should be fine but this was raising a warning because of the array syntax causing the '++' to not be right next to the variable.

closes GH-145 closes GH-146

mmoll commented 5 years ago

Rebased version of GH-145, @djoos, what do you think? :)

djoos commented 5 years ago

Thanks for your contribution @mmoll!