@@ 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 | /** |
|
184 | * @inheritDoc |
|
@@ 287-297 (lines=11) @@ | ||
284 | /** |
|
285 | * @inheritDoc |
|
286 | */ |
|
287 | public function shift() |
|
288 | { |
|
289 | if ($this->isEmpty()) { |
|
290 | throw new UnderflowException(); |
|
291 | } |
|
292 | ||
293 | $value = array_shift($this->internal); |
|
294 | $this->adjustCapacity(); |
|
295 | ||
296 | return $value; |
|
297 | } |
|
298 | ||
299 | /** |
|
300 | * @inheritDoc |