Code Duplication    Length = 8-10 lines in 3 locations

src/Arrayy.php 3 locations

@@ 3267-3274 (lines=8) @@
3264
     * @return static
3265
     *                <p>(Immutable)</p>
3266
     */
3267
    public function removeFirst(): self
3268
    {
3269
        $tmpArray = $this->getArray();
3270
3271
        \array_shift($tmpArray);
3272
3273
        return static::create(
3274
            $tmpArray,
3275
            $this->iteratorClass,
3276
            false
3277
        );
@@ 3286-3293 (lines=8) @@
3283
     * @return static
3284
     *                <p>(Immutable)</p>
3285
     */
3286
    public function removeLast(): self
3287
    {
3288
        $tmpArray = $this->getArray();
3289
3290
        \array_pop($tmpArray);
3291
3292
        return static::create(
3293
            $tmpArray,
3294
            $this->iteratorClass,
3295
            false
3296
        );
@@ 3480-3489 (lines=10) @@
3477
     * @return static
3478
     *                <p>(Immutable)</p>
3479
     */
3480
    public function rest(int $from = 1): self
3481
    {
3482
        $tmpArray = $this->getArray();
3483
3484
        return static::create(
3485
            \array_splice($tmpArray, $from),
3486
            $this->iteratorClass,
3487
            false
3488
        );
3489
    }
3490
3491
    /**
3492
     * Return the array in the reverse order.