Code Duplication    Length = 11-11 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2836-2846 (lines=11) @@
2833
     * @return static
2834
     *                <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p>
2835
     */
2836
    public function push(/* variadic arguments allowed */): self
2837
    {
2838
        $this->generatorToArray();
2839
2840
        if (\func_num_args()) {
2841
            $args = \array_merge([&$this->array], \func_get_args());
2842
            \array_push(...$args);
2843
        }
2844
2845
        return $this;
2846
    }
2847
2848
    /**
2849
     * Get a random value from the current array.
@@ 3960-3970 (lines=11) @@
3957
     * @return static
3958
     *                <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p>
3959
     */
3960
    public function unshift(/* variadic arguments allowed */): self
3961
    {
3962
        $this->generatorToArray();
3963
3964
        if (\func_num_args()) {
3965
            $args = \array_merge([&$this->array], \func_get_args());
3966
            \array_unshift(...$args);
3967
        }
3968
3969
        return $this;
3970
    }
3971
3972
    /**
3973
     * Get all values from a array.