Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert validUnusedVariableNames to array late
Previously the property was converted to an array when the Sniff was registered. This could cause issues if the property was changed (I know it's unlikely but it can happen in tests pretty easily) after registration. Furthermore, it was convered to an array and then used to replace the original string property, which introduces risk by both mutating a property during an object lifecycle and even changing its type. With this change, we never change the property from a string, and instead we convert it to an array just before it is used.
- Loading branch information