Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2924-2929 (lines=6) @@
2921
            );
2922
        }
2923
2924
        if ($number === null) {
2925
            /** @noinspection NonSecureArrayRandUsageInspection */
2926
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
2927
2928
            return static::create(
2929
                $arrayRandValue,
2930
                $this->iteratorClass,
2931
                false
2932
            );
@@ 3020-3026 (lines=7) @@
3017
            );
3018
        }
3019
3020
        if ($number === null) {
3021
            /** @noinspection NonSecureArrayRandUsageInspection */
3022
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3023
            $this->array = $arrayRandValue;
3024
3025
            return $this;
3026
        }
3027
3028
        /** @noinspection NonSecureShuffleUsageInspection */
3029
        \shuffle($this->array);