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. Please note the @ignore annotation hint above.
Loading history...
27
}
28
29
public function hasMore()
30
{
31
return $this->url !== null;
32
}
33
34
protected function collectionFromResult($result)
35
{
36
// If we have one result which is not an assoc array, make it the first element of an array for the
37
// collectionFromResult function so we always return a collection from filter
38
if ((bool) count(array_filter(array_keys($result), 'is_string'))) {
39
$result = [ $result ];
40
}
41
42
$class = $this->class;
43
$collection = [];
44
45
foreach ($result as $r) {
46
$collection[] = new $class($this->connection, $r);
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. Please note the @ignore annotation hint above.