Consider using a different name than the imported variable $validationRule, or did you forget to import by reference?
It seems like you are assigning to a variable which was imported through a use
statement which was not imported by reference.
For clarity, we suggest to use a different name or import by reference depending
on whether you would like to have the change visibile in outer-scope.
Change not visible in outer-scope
$x=1;$callable=function()use($x){$x=2;// Not visible in outer scope. If you would like this, how// about using a different variable name than $x?};$callable();var_dump($x);// integer(1)
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.