You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Squiz/DisallowMultipleAssignments: bug fix - dynamic property assignment on object stored in array
The sniff would try to find whether the first "relevant" variable found matches the start of the statement and if not, throw an error, but in the case of dynamic property access on objects stored in an array, the first "relevant" variable determination was off and would get stuck on the `]` close bracket of the array access.
Fixed now. Includes ample tests.
This should also make the sniff slightly more efficient for property access code snippets which the sniff already handled correctly.
Fixes 598
0 commit comments