The trait Idable provides a method equalsId that in turn relies on the
method getId(). If this method does not exist on a class mixing in this
trait, the method will fail.
Adding the getId() as an abstract method to the trait will make sure it
is available.
The call to CommonMutableContainerTrait::__construct() has too many arguments starting with $value.
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.
The trait Idable provides a method equalsId that in turn relies on the
method getId(). If this method does not exist on a class mixing in this
trait, the method will fail.
Adding the getId() as an abstract method to the trait will make sure it
is available.
Loading history...
31
}
32
1
}
33
34
2
/**
35
* {@inheritdoc}
36
*/
37
3
public function values()
38
3
{
39
1
return new ArrayList($this);
40
1
}
41
1
42
1
public function keys()
43
{
44
1
return new ArrayList(new LazyKeysIterable($this));
45
}
46
47
/**
48
* {@inheritDoc}
49
*/
50
17
public function concat($iterable)
51
{
52
17
if ($iterable instanceof Iterable) {
53
17
$iterable = $iterable->toArray();
54
16
}
55
6
56
6
return new static(array_merge_recursive($this->toArray(), $iterable));
The trait Idable provides a method equalsId that in turn relies on the
method getId(). If this method does not exist on a class mixing in this
trait, the method will fail.
Adding the getId() as an abstract method to the trait will make sure it
is available.
The call to CommonMutableContainerTrait::__construct() has too many arguments starting with array_merge_recursive($t...->toArray(), $iterable).
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.
This check looks for methods that are used by a trait but not required by it.
To illustrate, let’s look at the following code example
The trait
Idable
provides a methodequalsId
that in turn relies on the methodgetId()
. If this method does not exist on a class mixing in this trait, the method will fail.Adding the
getId()
as an abstract method to the trait will make sure it is available.