Code Duplication    Length = 11-11 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2892-2902 (lines=11) @@
2889
     * @return static
2890
     *                <p>(Mutable) Return this Arrayy object, with pushed elements to the end of array.</p>
2891
     */
2892
    public function push(/* variadic arguments allowed */): self
2893
    {
2894
        $this->generatorToArray();
2895
2896
        if (\func_num_args()) {
2897
            $args = \array_merge([&$this->array], \func_get_args());
2898
            \array_push(...$args);
2899
        }
2900
2901
        return $this;
2902
    }
2903
2904
    /**
2905
     * Get a random value from the current array.
@@ 4021-4031 (lines=11) @@
4018
     * @return static
4019
     *                <p>(Mutable) Return this Arrayy object, with prepended elements to the beginning of array.</p>
4020
     */
4021
    public function unshift(/* variadic arguments allowed */): self
4022
    {
4023
        $this->generatorToArray();
4024
4025
        if (\func_num_args()) {
4026
            $args = \array_merge([&$this->array], \func_get_args());
4027
            \array_unshift(...$args);
4028
        }
4029
4030
        return $this;
4031
    }
4032
4033
    /**
4034
     * Get all values from a array.