Code Duplication    Length = 8-10 lines in 3 locations

src/Arrayy.php 3 locations

@@ 3838-3845 (lines=8) @@
3835
     * @return static
3836
     *                <p>(Immutable)</p>
3837
     */
3838
    public function removeFirst(): self
3839
    {
3840
        $tmpArray = $this->getArray();
3841
3842
        \array_shift($tmpArray);
3843
3844
        return static::create(
3845
            $tmpArray,
3846
            $this->iteratorClass,
3847
            false
3848
        );
@@ 3857-3864 (lines=8) @@
3854
     * @return static
3855
     *                <p>(Immutable)</p>
3856
     */
3857
    public function removeLast(): self
3858
    {
3859
        $tmpArray = $this->getArray();
3860
3861
        \array_pop($tmpArray);
3862
3863
        return static::create(
3864
            $tmpArray,
3865
            $this->iteratorClass,
3866
            false
3867
        );
@@ 4046-4055 (lines=10) @@
4043
     * @return static
4044
     *                <p>(Immutable)</p>
4045
     */
4046
    public function rest(int $from = 1): self
4047
    {
4048
        $tmpArray = $this->getArray();
4049
4050
        return static::create(
4051
            \array_splice($tmpArray, $from),
4052
            $this->iteratorClass,
4053
            false
4054
        );
4055
    }
4056
4057
    /**
4058
     * Return the array in the reverse order.