1 | <?php |
||
8 | class Collection implements \ArrayAccess, \IteratorAggregate, \Countable |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | private $xs; |
||
14 | |||
15 | /** |
||
16 | * @param array $xs |
||
17 | */ |
||
18 | 5 | public function __construct(array $xs) |
|
22 | |||
23 | /** |
||
24 | * @param array $xs |
||
25 | * |
||
26 | * @return Collection |
||
27 | */ |
||
28 | 1 | public function concat($xs) |
|
32 | |||
33 | /** |
||
34 | * @param callable $fn |
||
35 | * |
||
36 | * @return Collection |
||
37 | */ |
||
38 | 1 | public function filter(callable $fn) |
|
42 | |||
43 | /** |
||
44 | * @param callable $fn |
||
45 | * |
||
46 | * @return Collection |
||
47 | */ |
||
48 | 1 | public function map(callable $fn) |
|
52 | |||
53 | /** |
||
54 | * @param callable $fn |
||
55 | * |
||
56 | * @return Collection |
||
57 | */ |
||
58 | 1 | public function each(callable $fn) |
|
62 | |||
63 | /** |
||
64 | * @param callable $fn |
||
65 | * |
||
66 | * @return mixed |
||
67 | */ |
||
68 | 1 | public function reduce(callable $fn) |
|
72 | |||
73 | /** |
||
74 | * @param mixed $value |
||
75 | * |
||
76 | * @return Collection |
||
77 | */ |
||
78 | 1 | public function prepend($value) |
|
82 | |||
83 | /** |
||
84 | * @param mixed $x |
||
85 | * |
||
86 | * @return Collection |
||
87 | */ |
||
88 | 1 | public function append($x) |
|
92 | |||
93 | /** |
||
94 | * @return int |
||
95 | */ |
||
96 | 1 | public function count() |
|
100 | |||
101 | /** |
||
102 | * @return \ArrayIterator |
||
103 | */ |
||
104 | 1 | public function getIterator() |
|
108 | |||
109 | /** |
||
110 | * @return array |
||
111 | */ |
||
112 | 2 | public function toArray() |
|
116 | |||
117 | /** |
||
118 | * @param mixed $offset |
||
119 | * |
||
120 | * @return bool |
||
121 | */ |
||
122 | 1 | public function offsetExists($offset) |
|
126 | |||
127 | /** |
||
128 | * @param mixed $offset |
||
129 | * |
||
130 | * @return mixed |
||
131 | */ |
||
132 | 1 | public function offsetGet($offset) |
|
136 | |||
137 | /** |
||
138 | * @param mixed $offset |
||
139 | * |
||
140 | * @param mixed $value |
||
|
|||
141 | */ |
||
142 | 1 | public function offsetSet($offset, $x) |
|
151 | |||
152 | /** |
||
153 | * @param mixed $offset |
||
154 | */ |
||
155 | 1 | public function offsetUnset($offset) |
|
161 | } |
||
162 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.