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