Code Duplication    Length = 8-10 lines in 3 locations

src/Arrayy.php 3 locations

@@ 3911-3918 (lines=8) @@
3908
     * @return static
3909
     *                <p>(Immutable)</p>
3910
     */
3911
    public function removeFirst(): self
3912
    {
3913
        $tmpArray = $this->getArray();
3914
3915
        \array_shift($tmpArray);
3916
3917
        return static::create(
3918
            $tmpArray,
3919
            $this->iteratorClass,
3920
            false
3921
        );
@@ 3930-3937 (lines=8) @@
3927
     * @return static
3928
     *                <p>(Immutable)</p>
3929
     */
3930
    public function removeLast(): self
3931
    {
3932
        $tmpArray = $this->getArray();
3933
3934
        \array_pop($tmpArray);
3935
3936
        return static::create(
3937
            $tmpArray,
3938
            $this->iteratorClass,
3939
            false
3940
        );
@@ 4125-4134 (lines=10) @@
4122
     * @return static
4123
     *                <p>(Immutable)</p>
4124
     */
4125
    public function rest(int $from = 1): self
4126
    {
4127
        $tmpArray = $this->getArray();
4128
4129
        return static::create(
4130
            \array_splice($tmpArray, $from),
4131
            $this->iteratorClass,
4132
            false
4133
        );
4134
    }
4135
4136
    /**
4137
     * Return the array in the reverse order.