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
PHPCSUtils lists util, already has support for detecting this so we need to examine where lists are used in WPCS, add examples and modify the sniffs to use Utils for this.
From a quick look prefix all globals sniff could be affected by this change so we need to take a look at it.
Since PHP 7.3 it's possible to use reference assignment with
list()
.Code like
Won't throw
Fatal error: [] and list() assignments cannot be by reference
. That means you'd be able to do something like this:And the resulting
$array
would be[1, 4]
.PHPCSUtils lists util, already has support for detecting this so we need to examine where lists are used in WPCS, add examples and modify the sniffs to use Utils for this.
From a quick look prefix all globals sniff could be affected by this change so we need to take a look at it.
Refs:
Related to #764
The text was updated successfully, but these errors were encountered: