Code Duplication    Length = 11-11 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2714-2724 (lines=11) @@
2711
     * @return static
2712
     *                <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p>
2713
     */
2714
    public function push(/* variadic arguments allowed */): self
2715
    {
2716
        $this->generatorToArray();
2717
2718
        if (\func_num_args()) {
2719
            $args = \array_merge([&$this->array], \func_get_args());
2720
            \array_push(...$args);
2721
        }
2722
2723
        return $this;
2724
    }
2725
2726
    /**
2727
     * Get a random value from the current array.
@@ 3750-3760 (lines=11) @@
3747
     * @return static
3748
     *                <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p>
3749
     */
3750
    public function unshift(/* variadic arguments allowed */): self
3751
    {
3752
        $this->generatorToArray();
3753
3754
        if (\func_num_args()) {
3755
            $args = \array_merge([&$this->array], \func_get_args());
3756
            \array_unshift(...$args);
3757
        }
3758
3759
        return $this;
3760
    }
3761
3762
    /**
3763
     * Get all values from a array.