phpcs-variable-analysis icon indicating copy to clipboard operation
phpcs-variable-analysis copied to clipboard

Constants::getPassByReferenceFunctions(): contains methods

Open jrfnl opened this issue 5 years ago • 0 comments

The array in Constants::getPassByReferenceFunctions() includes a number of methods, but no indication that:

  1. These are methods and should only be recognized as the function when called as a method.
  2. What class these methods come from.

This means that, for example, if someone would currently define a global function addTask() which doesn't use pass by reference, the sniff may have a false negative as parameter 3 would not be checked.

The same goes, of course, for userland classes defining a function of the same name as one of these, as well as namespaced functions.

jrfnl avatar Feb 18 '20 00:02 jrfnl