Code Duplication    Length = 8-10 lines in 3 locations

src/Arrayy.php 3 locations

@@ 3288-3295 (lines=8) @@
3285
     * @return static
3286
     *                <p>(Immutable)</p>
3287
     */
3288
    public function removeFirst(): self
3289
    {
3290
        $tmpArray = $this->getArray();
3291
3292
        \array_shift($tmpArray);
3293
3294
        return static::create(
3295
            $tmpArray,
3296
            $this->iteratorClass,
3297
            false
3298
        );
@@ 3307-3314 (lines=8) @@
3304
     * @return static
3305
     *                <p>(Immutable)</p>
3306
     */
3307
    public function removeLast(): self
3308
    {
3309
        $tmpArray = $this->getArray();
3310
3311
        \array_pop($tmpArray);
3312
3313
        return static::create(
3314
            $tmpArray,
3315
            $this->iteratorClass,
3316
            false
3317
        );
@@ 3501-3510 (lines=10) @@
3498
     * @return static
3499
     *                <p>(Immutable)</p>
3500
     */
3501
    public function rest(int $from = 1): self
3502
    {
3503
        $tmpArray = $this->getArray();
3504
3505
        return static::create(
3506
            \array_splice($tmpArray, $from),
3507
            $this->iteratorClass,
3508
            false
3509
        );
3510
    }
3511
3512
    /**
3513
     * Return the array in the reverse order.