The call to Collection::__construct() has too many arguments starting with $this.
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...
43
}
44
45
/**
46
* Returns an array representation of the collection.
47
*
48
* The format of the returned array is implementation-dependent. Some
49
* implementations may throw an exception if an array representation
50
* could not be created (for example when object are used as keys).
51
*
52
* @return array
53
*/
54
abstract public function toArray(): array;
55
56
/**
57
* Invoked when calling var_dump.
58
*
59
* @return array
60
*/
61
29
public function __debugInfo()
62
{
63
29
return $this->toArray();
64
}
65
66
/**
67
* Returns a string representation of the collection, which is invoked when
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
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.