The call to NullStringControllerModel::__construct() has too many arguments starting with ''.
This check compares calls to functions or methods with their respective definitions.
If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the
check may pick up the wrong definition and report false positives. One codebase
where this has been known to happen is Wordpress.
In this case you can add the @ignorePhpDoc
annotation to the duplicate definition and it will be ignored.
70% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have
checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that
someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.
Loading history...
38
$this->assertInternalType('array', (new NullStringControllerModel())->__invoke('', new Request()));
39
$this->assertSame([], (new NullStringControllerModel())->__invoke('', new Request()));
40
$this->assertSame(0, count((new NullStringControllerModel())->__invoke('', new Request())));
41
$this->assertEmpty((new NullStringControllerModel())->__invoke('', new Request()));
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.