Code Duplication    Length = 10-10 lines in 2 locations

src/Traits/GenericSequence.php 2 locations

@@ 166-175 (lines=10) @@
163
    /**
164
     * @inheritDoc
165
     */
166
    public function pop()
167
    {
168
        if ($this->isEmpty()) {
169
            throw new UnderflowException();
170
        }
171
172
        $value = array_pop($this->array);
173
        $this->adjustCapacity();
174
        return $value;
175
    }
176
177
    /**
178
     * Pushes all values of either an array or traversable object.
@@ 273-282 (lines=10) @@
270
    /**
271
     * @inheritDoc
272
     */
273
    public function shift()
274
    {
275
        if ($this->isEmpty()) {
276
            throw new UnderflowException();
277
        }
278
279
        $value = array_shift($this->array);
280
        $this->adjustCapacity();
281
        return $value;
282
    }
283
284
    /**
285
     * @inheritDoc