Code Duplication    Length = 11-11 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2970-2980 (lines=11) @@
2967
     * @return static
2968
     *                <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p>
2969
     */
2970
    public function push(/* variadic arguments allowed */): self
2971
    {
2972
        $this->generatorToArray();
2973
2974
        if (\func_num_args()) {
2975
            $args = \func_get_args();
2976
            \array_push(...[&$this->array], ...$args);
2977
        }
2978
2979
        return $this;
2980
    }
2981
2982
    /**
2983
     * Get a random value from the current array.
@@ 4224-4234 (lines=11) @@
4221
     * @return static
4222
     *                <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p>
4223
     */
4224
    public function unshift(/* variadic arguments allowed */): self
4225
    {
4226
        $this->generatorToArray();
4227
4228
        if (\func_num_args()) {
4229
            $args = \func_get_args();
4230
            \array_unshift(...[&$this->array], ...$args);
4231
        }
4232
4233
        return $this;
4234
    }
4235
4236
    /**
4237
     * Get all values from a array.