Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4807-4812 (lines=6) @@
4804
            );
4805
        }
4806
4807
        if ($number === null) {
4808
            /** @noinspection NonSecureArrayRandUsageInspection */
4809
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4810
4811
            return static::create(
4812
                $arrayRandValue,
4813
                $this->iteratorClass,
4814
                false
4815
            );
@@ 4924-4930 (lines=7) @@
4921
            );
4922
        }
4923
4924
        if ($number === null) {
4925
            /** @noinspection NonSecureArrayRandUsageInspection */
4926
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4927
            $this->array = $arrayRandValue;
4928
4929
            return $this;
4930
        }
4931
4932
        /** @noinspection NonSecureShuffleUsageInspection */
4933
        \shuffle($this->array);