@@ 216-226 (lines=11) @@ | ||
213 | * @return $this |
|
214 | * @throws \InvalidArgumentException |
|
215 | */ |
|
216 | public function increment($step = 1) |
|
217 | { |
|
218 | if (is_int($step)) { |
|
219 | $this->fetched = true; |
|
220 | $this->data += $step; |
|
221 | } else { |
|
222 | throw new \InvalidArgumentException('$step must be numeric.'); |
|
223 | } |
|
224 | ||
225 | return $this; |
|
226 | } |
|
227 | ||
228 | /** |
|
229 | * @param int $step |
|
@@ 233-243 (lines=11) @@ | ||
230 | * @return $this |
|
231 | * @throws \InvalidArgumentException |
|
232 | */ |
|
233 | public function decrement($step = 1) |
|
234 | { |
|
235 | if (is_int($step)) { |
|
236 | $this->fetched = true; |
|
237 | $this->data -= $step; |
|
238 | } else { |
|
239 | throw new \InvalidArgumentException('$step must be numeric.'); |
|
240 | } |
|
241 | ||
242 | return $this; |
|
243 | } |
|
244 | ||
245 | /** |
|
246 | * @param array|string $data |