Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php namespace Mbh\Collection\Traits; |
||
15 | trait Builder |
||
16 | { |
||
17 | /** |
||
18 | * @inheritDoc |
||
19 | */ |
||
20 | public static function empty() |
||
21 | { |
||
22 | return new static(new SplFixedArray(0)); |
||
|
|||
23 | } |
||
24 | |||
25 | /** |
||
26 | * @inheritDoc |
||
27 | */ |
||
28 | public static function fromArray(array $array) |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @inheritDoc |
||
35 | */ |
||
36 | public static function fromItems(Traversable $array) |
||
49 | } |
||
50 | |||
51 | abstract protected function checkCapacity(); |
||
52 | } |
||
53 |
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.