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