Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2865-2870 (lines=6) @@
2862
            );
2863
        }
2864
2865
        if ($number === null) {
2866
            /** @noinspection NonSecureArrayRandUsageInspection */
2867
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
2868
2869
            return static::create(
2870
                $arrayRandValue,
2871
                $this->iteratorClass,
2872
                false
2873
            );
@@ 2961-2967 (lines=7) @@
2958
            );
2959
        }
2960
2961
        if ($number === null) {
2962
            /** @noinspection NonSecureArrayRandUsageInspection */
2963
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
2964
            $this->array = $arrayRandValue;
2965
2966
            return $this;
2967
        }
2968
2969
        /** @noinspection NonSecureShuffleUsageInspection */
2970
        \shuffle($this->array);