@@ 163-173 (lines=11) @@ | ||
160 | /** |
|
161 | * @inheritDoc |
|
162 | */ |
|
163 | public function pop() |
|
164 | { |
|
165 | if ($this->isEmpty()) { |
|
166 | throw new UnderflowException(); |
|
167 | } |
|
168 | ||
169 | $value = array_pop($this->internal); |
|
170 | $this->adjustCapacity(); |
|
171 | ||
172 | return $value; |
|
173 | } |
|
174 | ||
175 | /** |
|
176 | * @inheritDoc |
|
@@ 260-270 (lines=11) @@ | ||
257 | /** |
|
258 | * @inheritDoc |
|
259 | */ |
|
260 | public function shift() |
|
261 | { |
|
262 | if ($this->isEmpty()) { |
|
263 | throw new UnderflowException(); |
|
264 | } |
|
265 | ||
266 | $value = array_shift($this->internal); |
|
267 | $this->adjustCapacity(); |
|
268 | ||
269 | return $value; |
|
270 | } |
|
271 | ||
272 | /** |
|
273 | * @inheritDoc |