Code Duplication    Length = 11-11 lines in 2 locations

src/Arrayy.php 2 locations

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