Code Duplication    Length = 11-11 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2912-2922 (lines=11) @@
2909
     * @return static
2910
     *                <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p>
2911
     */
2912
    public function push(/* variadic arguments allowed */): self
2913
    {
2914
        $this->generatorToArray();
2915
2916
        if (\func_num_args()) {
2917
            $args = \array_merge([&$this->array], \func_get_args());
2918
            \array_push(...$args);
2919
        }
2920
2921
        return $this;
2922
    }
2923
2924
    /**
2925
     * Get a random value from the current array.
@@ 4041-4051 (lines=11) @@
4038
     * @return static
4039
     *                <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p>
4040
     */
4041
    public function unshift(/* variadic arguments allowed */): self
4042
    {
4043
        $this->generatorToArray();
4044
4045
        if (\func_num_args()) {
4046
            $args = \array_merge([&$this->array], \func_get_args());
4047
            \array_unshift(...$args);
4048
        }
4049
4050
        return $this;
4051
    }
4052
4053
    /**
4054
     * Get all values from a array.