PHPCSStandards / PHPCSUtils

A suite of utility functions for use with PHP_CodeSniffer
https://phpcsutils.com/
GNU Lesser General Public License v3.0
53 stars 7 forks source link

IsReferenceTest: fix invalid test case #574

Closed jrfnl closed 5 months ago

jrfnl commented 5 months ago

Sister-PR to PHPCSStandards/PHP_CodeSniffer#426

Closures use clauses only take plain variables, not complex variables, like properties or array keys.

In other words, this test case as-is, was a parse error.

For the purposes of this test, it makes no difference what type of variable is passed, so let's fix the test.