@@ 171-181 (lines=11) @@ | ||
168 | /** |
|
169 | * @inheritDoc |
|
170 | */ |
|
171 | public function pop() |
|
172 | { |
|
173 | if ($this->isEmpty()) { |
|
174 | throw new UnderflowException(); |
|
175 | } |
|
176 | ||
177 | $value = array_pop($this->internal); |
|
178 | $this->adjustCapacity(); |
|
179 | ||
180 | return $value; |
|
181 | } |
|
182 | ||
183 | private function pushAll($values) |
|
184 | { |
|
@@ 293-303 (lines=11) @@ | ||
290 | /** |
|
291 | * @inheritDoc |
|
292 | */ |
|
293 | public function shift() |
|
294 | { |
|
295 | if ($this->isEmpty()) { |
|
296 | throw new UnderflowException(); |
|
297 | } |
|
298 | ||
299 | $value = array_shift($this->internal); |
|
300 | $this->adjustCapacity(); |
|
301 | ||
302 | return $value; |
|
303 | } |
|
304 | ||
305 | /** |
|
306 | * @inheritDoc |