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
I'm going to close this one as it should be handled in VIPCS by our switching to an external version of VariableAnalysis, and I know that work is under way (by @sirbrillig) there to make use of PHPCSUtils (by @jrfnl) which includes utility methods which better identifies a short list from a short array.
Now that #449 is completed to use VariableAnalysis proper, I've confirmed that the provided example above doesn't give an error with the develop version of WordPress-VIP-Go, so this is now fixed for VIPCS 2.2.0.
Bug Description
Variables assigned using short
list()
syntax are reported as undefined.Minimal Code Snippet
Error Code
Variable $foo is undefined. (WordPressVIPMinimum.Variables.VariableAnalysis.UndefinedVariable)
Environment
Additional Context
This syntax was added in PHP 7.1: https://www.php.net/manual/en/migration71.new-features.php#migration71.new-features.symmetric-array-destructuring
Tested Against
master
branch?master
branch of VIPCS.The text was updated successfully, but these errors were encountered: