1 | <?php |
||
9 | class Cart implements ArrayAccess, IteratorAggregate |
||
10 | { |
||
11 | /** |
||
12 | * $items. |
||
13 | * |
||
14 | * @var \Illuminate\Support\Collection |
||
15 | */ |
||
16 | public $items; |
||
17 | |||
18 | /** |
||
19 | * |
||
20 | * @param \Recca0120\Cart\Storage $storage |
||
21 | */ |
||
22 | protected $storage; |
||
23 | |||
24 | /** |
||
25 | * __construct. |
||
26 | * |
||
27 | * @param \Recca0120\Cart\Storage $storage |
||
28 | */ |
||
29 | 1 | public function __construct(Storage $storage = null) |
|
34 | |||
35 | /** |
||
36 | * put. |
||
37 | * |
||
38 | * @param \Recca0120\Cart\Item $item |
||
39 | * @param int $quantity |
||
|
|||
40 | * @return $this |
||
41 | */ |
||
42 | 1 | public function put(Item $item) |
|
48 | |||
49 | /** |
||
50 | * get. |
||
51 | * |
||
52 | * @param \Recca0120\Cart\Item $item |
||
53 | * @param int $quantity |
||
54 | * @return $this |
||
55 | */ |
||
56 | public function get($itemId) |
||
60 | |||
61 | /** |
||
62 | * remove. |
||
63 | * |
||
64 | * @param string $id |
||
65 | * @return bool |
||
66 | */ |
||
67 | 1 | public function remove($item) |
|
71 | |||
72 | /** |
||
73 | * clear. |
||
74 | * |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function clear() |
||
85 | |||
86 | /** |
||
87 | * items. |
||
88 | * |
||
89 | * @return \Illuminate\Support\Collection |
||
90 | */ |
||
91 | 1 | public function items() |
|
95 | |||
96 | /** |
||
97 | * count. |
||
98 | * |
||
99 | * @return int |
||
100 | */ |
||
101 | 1 | public function count() |
|
105 | |||
106 | /** |
||
107 | * total. |
||
108 | * |
||
109 | * @return float |
||
110 | */ |
||
111 | 1 | public function total() |
|
117 | |||
118 | /** |
||
119 | * restore. |
||
120 | * |
||
121 | * @return $this |
||
122 | */ |
||
123 | 1 | public function restore() { |
|
128 | |||
129 | /** |
||
130 | * store. |
||
131 | * |
||
132 | * @return $this |
||
133 | */ |
||
134 | 1 | public function store() |
|
140 | |||
141 | /** |
||
142 | * toArray. |
||
143 | * |
||
144 | * @return array |
||
145 | */ |
||
146 | public function toArray() |
||
152 | |||
153 | /** |
||
154 | * toJson. |
||
155 | * |
||
156 | * @param int $option |
||
157 | * @return string |
||
158 | */ |
||
159 | public function toJson($option = 0) |
||
163 | |||
164 | /** |
||
165 | * __destruct. |
||
166 | */ |
||
167 | 1 | public function __destruct() |
|
171 | |||
172 | /** |
||
173 | * Determine if an item exists at an offset. |
||
174 | * |
||
175 | * @param mixed $key |
||
176 | * @return bool |
||
177 | */ |
||
178 | public function offsetExists($key) |
||
182 | |||
183 | /** |
||
184 | * Get an item at a given offset. |
||
185 | * |
||
186 | * @param mixed $key |
||
187 | * @return mixed |
||
188 | */ |
||
189 | public function offsetGet($key) |
||
193 | |||
194 | /** |
||
195 | * Set the item at a given offset. |
||
196 | * |
||
197 | * @param mixed $key |
||
198 | * @param mixed $value |
||
199 | * @return void |
||
200 | */ |
||
201 | public function offsetSet($key, $value) |
||
205 | |||
206 | /** |
||
207 | * Unset the item at a given offset. |
||
208 | * |
||
209 | * @param string $key |
||
210 | * @return void |
||
211 | */ |
||
212 | public function offsetUnset($key) |
||
216 | |||
217 | /** |
||
218 | * Get an iterator for the items. |
||
219 | * |
||
220 | * @return \ArrayIterator |
||
221 | */ |
||
222 | public function getIterator() |
||
226 | } |
||
227 |
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.