Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3788-3793 (lines=6) @@
3785
            );
3786
        }
3787
3788
        if ($number === null) {
3789
            /** @noinspection NonSecureArrayRandUsageInspection */
3790
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3791
3792
            return static::create(
3793
                $arrayRandValue,
3794
                $this->iteratorClass,
3795
                false
3796
            );
@@ 3893-3899 (lines=7) @@
3890
            );
3891
        }
3892
3893
        if ($number === null) {
3894
            /** @noinspection NonSecureArrayRandUsageInspection */
3895
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3896
            $this->array = $arrayRandValue;
3897
3898
            return $this;
3899
        }
3900
3901
        /** @noinspection NonSecureShuffleUsageInspection */
3902
        \shuffle($this->array);