@@ 236-246 (lines=11) @@ | ||
233 | * @return $this |
|
234 | * @throws \InvalidArgumentException |
|
235 | */ |
|
236 | public function increment($step = 1) |
|
237 | { |
|
238 | if (is_int($step)) { |
|
239 | $this->fetched = true; |
|
240 | $this->data += $step; |
|
241 | } else { |
|
242 | throw new \InvalidArgumentException('$step must be numeric.'); |
|
243 | } |
|
244 | ||
245 | return $this; |
|
246 | } |
|
247 | ||
248 | /** |
|
249 | * @param int $step |
|
@@ 253-263 (lines=11) @@ | ||
250 | * @return $this |
|
251 | * @throws \InvalidArgumentException |
|
252 | */ |
|
253 | public function decrement($step = 1) |
|
254 | { |
|
255 | if (is_int($step)) { |
|
256 | $this->fetched = true; |
|
257 | $this->data -= $step; |
|
258 | } else { |
|
259 | throw new \InvalidArgumentException('$step must be numeric.'); |
|
260 | } |
|
261 | ||
262 | return $this; |
|
263 | } |
|
264 | ||
265 | /** |
|
266 | * @param array|string $data |