djoos / Symfony-coding-standard

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

Unary operators validation incorrect for array syntax, such as $a[0]++ #145

Closed finncolman closed 5 years ago

finncolman commented 6 years ago

Unary operators must be adjacent to variables but this was working incorrectly for arrays. For example $a[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.