| @@ 152-162 (lines=11) @@ | ||
| 149 | * @return $this |
|
| 150 | * @throws \InvalidArgumentException |
|
| 151 | */ |
|
| 152 | public function increment($step = 1) |
|
| 153 | { |
|
| 154 | if (is_int($step)) { |
|
| 155 | $this->fetched = true; |
|
| 156 | $this->data += $step; |
|
| 157 | } else { |
|
| 158 | throw new \InvalidArgumentException('$step must be numeric.'); |
|
| 159 | } |
|
| 160 | ||
| 161 | return $this; |
|
| 162 | } |
|
| 163 | ||
| 164 | /** |
|
| 165 | * @param int $step |
|
| @@ 169-179 (lines=11) @@ | ||
| 166 | * @return $this |
|
| 167 | * @throws \InvalidArgumentException |
|
| 168 | */ |
|
| 169 | public function decrement($step = 1) |
|
| 170 | { |
|
| 171 | if (is_int($step)) { |
|
| 172 | $this->fetched = true; |
|
| 173 | $this->data -= $step; |
|
| 174 | } else { |
|
| 175 | throw new \InvalidArgumentException('$step must be numeric.'); |
|
| 176 | } |
|
| 177 | ||
| 178 | return $this; |
|
| 179 | } |
|
| 180 | ||
| 181 | /** |
|
| 182 | * @param array|string $data |
|