Code Duplication    Length = 11-11 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2949-2959 (lines=11) @@
2946
     * @return static
2947
     *                <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p>
2948
     */
2949
    public function push(/* variadic arguments allowed */): self
2950
    {
2951
        $this->generatorToArray();
2952
2953
        if (\func_num_args()) {
2954
            $args = \func_get_args();
2955
            \array_push(...[&$this->array], ...$args);
2956
        }
2957
2958
        return $this;
2959
    }
2960
2961
    /**
2962
     * Get a random value from the current array.
@@ 4203-4213 (lines=11) @@
4200
     * @return static
4201
     *                <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p>
4202
     */
4203
    public function unshift(/* variadic arguments allowed */): self
4204
    {
4205
        $this->generatorToArray();
4206
4207
        if (\func_num_args()) {
4208
            $args = \func_get_args();
4209
            \array_unshift(...[&$this->array], ...$args);
4210
        }
4211
4212
        return $this;
4213
    }
4214
4215
    /**
4216
     * Get all values from a array.