-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squiz/DisallowMultipleAssignments: bug fix - dynamic property assignm…
…ent 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
- Loading branch information
Showing
2 changed files
with
29 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters