Code Duplication    Length = 11-11 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2979-2989 (lines=11) @@
2976
     * @return static
2977
     *                <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p>
2978
     */
2979
    public function push(/* variadic arguments allowed */): self
2980
    {
2981
        $this->generatorToArray();
2982
2983
        if (\func_num_args()) {
2984
            $args = \func_get_args();
2985
            \array_push(...[&$this->array], ...$args);
2986
        }
2987
2988
        return $this;
2989
    }
2990
2991
    /**
2992
     * Get a random value from the current array.
@@ 4233-4243 (lines=11) @@
4230
     * @return static
4231
     *                <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p>
4232
     */
4233
    public function unshift(/* variadic arguments allowed */): self
4234
    {
4235
        $this->generatorToArray();
4236
4237
        if (\func_num_args()) {
4238
            $args = \func_get_args();
4239
            \array_unshift(...[&$this->array], ...$args);
4240
        }
4241
4242
        return $this;
4243
    }
4244
4245
    /**
4246
     * Get all values from a array.