Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3730-3735 (lines=6) @@
3727
            );
3728
        }
3729
3730
        if ($number === null) {
3731
            /** @noinspection NonSecureArrayRandUsageInspection */
3732
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3733
3734
            return static::create(
3735
                $arrayRandValue,
3736
                $this->iteratorClass,
3737
                false
3738
            );
@@ 3834-3840 (lines=7) @@
3831
            );
3832
        }
3833
3834
        if ($number === null) {
3835
            /** @noinspection NonSecureArrayRandUsageInspection */
3836
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3837
            $this->array = $arrayRandValue;
3838
3839
            return $this;
3840
        }
3841
3842
        /** @noinspection NonSecureShuffleUsageInspection */
3843
        \shuffle($this->array);