1 | <?php namespace Anomaly\Streams\Platform\Support; |
||
10 | class Collection extends \Illuminate\Support\Collection |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * Alias for pluck. |
||
15 | * |
||
16 | * @deprecated in 3.1. Will remove in 3.2 |
||
17 | * |
||
18 | * @param string $value |
||
19 | * @param string $key |
||
20 | * |
||
21 | * @return $this |
||
22 | */ |
||
23 | public function lists($value, $key = null) |
||
27 | |||
28 | /** |
||
29 | * Pad to the specified size with a value. |
||
30 | * |
||
31 | * @param $size |
||
32 | * @param null $value |
||
33 | * @return $this |
||
34 | */ |
||
35 | public function pad($size, $value = null) |
||
43 | |||
44 | /** |
||
45 | * An alias for slice. |
||
46 | * |
||
47 | * @param $offset |
||
48 | * @return $this |
||
49 | */ |
||
50 | public function skip($offset) |
||
54 | |||
55 | /** |
||
56 | * Return undecorated items. |
||
57 | * |
||
58 | * @return static|$this |
||
59 | */ |
||
60 | public function undecorate() |
||
64 | |||
65 | /** |
||
66 | * Map to get. |
||
67 | * |
||
68 | * @param $name |
||
69 | * @return mixed |
||
70 | */ |
||
71 | public function __get($name) |
||
79 | |||
80 | /** |
||
81 | * Map to get. |
||
82 | * |
||
83 | * @param string $method |
||
84 | * @param array $parameters |
||
85 | */ |
||
86 | public function __call($method, $parameters) |
||
90 | } |
||
91 |
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.