Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 5092-5097 (lines=6) @@
5089
            );
5090
        }
5091
5092
        if ($number === null) {
5093
            /** @noinspection NonSecureArrayRandUsageInspection */
5094
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
5095
5096
            return static::create(
5097
                $arrayRandValue,
5098
                $this->iteratorClass,
5099
                false
5100
            );
@@ 5209-5215 (lines=7) @@
5206
            );
5207
        }
5208
5209
        if ($number === null) {
5210
            /** @noinspection NonSecureArrayRandUsageInspection */
5211
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
5212
            $this->array = $arrayRandValue;
5213
5214
            return $this;
5215
        }
5216
5217
        /** @noinspection NonSecureShuffleUsageInspection */
5218
        \shuffle($this->array);