Code Duplication    Length = 11-11 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3238-3248 (lines=11) @@
3235
     * @return static
3236
     *                <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p>
3237
     */
3238
    public function push(/* variadic arguments allowed */): self
3239
    {
3240
        $this->generatorToArray();
3241
3242
        if (\func_num_args()) {
3243
            $args = \func_get_args();
3244
            \array_push(...[&$this->array], ...$args);
3245
        }
3246
3247
        return $this;
3248
    }
3249
3250
    /**
3251
     * Get a random value from the current array.
@@ 4491-4501 (lines=11) @@
4488
     * @return static
4489
     *                <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p>
4490
     */
4491
    public function unshift(/* variadic arguments allowed */): self
4492
    {
4493
        $this->generatorToArray();
4494
4495
        if (\func_num_args()) {
4496
            $args = \func_get_args();
4497
            \array_unshift(...[&$this->array], ...$args);
4498
        }
4499
4500
        return $this;
4501
    }
4502
4503
    /**
4504
     * Get all values from a array.