| @@ 256-266 (lines=11) @@ | ||
| 253 | * @return $this |
|
| 254 | * @throws \InvalidArgumentException |
|
| 255 | */ |
|
| 256 | public function increment($step = 1) |
|
| 257 | { |
|
| 258 | if (is_int($step)) { |
|
| 259 | $this->fetched = true; |
|
| 260 | $this->data += $step; |
|
| 261 | } else { |
|
| 262 | throw new \InvalidArgumentException('$step must be numeric.'); |
|
| 263 | } |
|
| 264 | ||
| 265 | return $this; |
|
| 266 | } |
|
| 267 | ||
| 268 | /** |
|
| 269 | * @param int $step |
|
| @@ 273-283 (lines=11) @@ | ||
| 270 | * @return $this |
|
| 271 | * @throws \InvalidArgumentException |
|
| 272 | */ |
|
| 273 | public function decrement($step = 1) |
|
| 274 | { |
|
| 275 | if (is_int($step)) { |
|
| 276 | $this->fetched = true; |
|
| 277 | $this->data -= $step; |
|
| 278 | } else { |
|
| 279 | throw new \InvalidArgumentException('$step must be numeric.'); |
|
| 280 | } |
|
| 281 | ||
| 282 | return $this; |
|
| 283 | } |
|
| 284 | ||
| 285 | /** |
|
| 286 | * @param array|string $data |
|