Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PrefixAllGlobals: update method signature for compatibility with WPCS…
… 2.2.0 WPCS 2.2.0 changes the method signature of the `PrefixAllGlobalsSniff::process_variable_assignment()` method, adding a new `$in_list` parameter. This means that the method signature for the method as overloaded in WPTRTCS needs to be updated to prevent the following PHP warning `Declaration of WPThemeReview\Sniffs\CoreFunctionality\PrefixAllGlobalsSniff::process_variable_assignment($stackPtr) should be compatible with WordPressCS\WordPress\Sniffs\NamingConventions\PrefixAllGlobalsSniff::process_variable_assignment($stackPtr, $in_list = false)`. It it safe to add this new parameter to WPThemeReview already, even though WPCS 2.2.0 hasn't been released yet, as passing _too many_ parameters to a function and/or adding an additional parameter to an overloaded method in a child class does not cause issues in PHP, while having _too few_ parameters will as the above warning demonstrates. Refs: * WordPress/WordPress-Coding-Standards#1783
- Loading branch information