Code Duplication    Length = 11-11 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3221-3231 (lines=11) @@
3218
     * @return static
3219
     *                <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p>
3220
     */
3221
    public function push(/* variadic arguments allowed */): self
3222
    {
3223
        $this->generatorToArray();
3224
3225
        if (\func_num_args()) {
3226
            $args = \func_get_args();
3227
            \array_push(...[&$this->array], ...$args);
3228
        }
3229
3230
        return $this;
3231
    }
3232
3233
    /**
3234
     * Get a random value from the current array.
@@ 4475-4485 (lines=11) @@
4472
     * @return static
4473
     *                <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p>
4474
     */
4475
    public function unshift(/* variadic arguments allowed */): self
4476
    {
4477
        $this->generatorToArray();
4478
4479
        if (\func_num_args()) {
4480
            $args = \func_get_args();
4481
            \array_unshift(...[&$this->array], ...$args);
4482
        }
4483
4484
        return $this;
4485
    }
4486
4487
    /**
4488
     * Get all values from a array.