The call to Loader::getSource() has too many arguments starting with $this->packagePath.
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.
Loading history...
54
}
55
56
/**
57
* Set the default package path.
58
*
59
* @param string $packagePath
60
*/
61
public function setPackagePath($packagePath)
62
{
63
$this->packagePath = $packagePath;
64
}
65
66
/**
67
* Get the source directory to publish.
68
*
69
* @param string $packagePath
70
*
71
* @return string
72
*
73
* @throws \InvalidArgumentException
74
*/
75
abstract protected function getSource($packagePath);
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.