Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 5085-5090 (lines=6) @@
5082
            );
5083
        }
5084
5085
        if ($number === null) {
5086
            /** @noinspection NonSecureArrayRandUsageInspection */
5087
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
5088
5089
            return static::create(
5090
                $arrayRandValue,
5091
                $this->iteratorClass,
5092
                false
5093
            );
@@ 5202-5208 (lines=7) @@
5199
            );
5200
        }
5201
5202
        if ($number === null) {
5203
            /** @noinspection NonSecureArrayRandUsageInspection */
5204
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
5205
            $this->array = $arrayRandValue;
5206
5207
            return $this;
5208
        }
5209
5210
        /** @noinspection NonSecureShuffleUsageInspection */
5211
        \shuffle($this->array);