Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 5040-5045 (lines=6) @@
5037
            );
5038
        }
5039
5040
        if ($number === null) {
5041
            /** @noinspection NonSecureArrayRandUsageInspection */
5042
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
5043
5044
            return static::create(
5045
                $arrayRandValue,
5046
                $this->iteratorClass,
5047
                false
5048
            );
@@ 5157-5163 (lines=7) @@
5154
            );
5155
        }
5156
5157
        if ($number === null) {
5158
            /** @noinspection NonSecureArrayRandUsageInspection */
5159
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
5160
            $this->array = $arrayRandValue;
5161
5162
            return $this;
5163
        }
5164
5165
        /** @noinspection NonSecureShuffleUsageInspection */
5166
        \shuffle($this->array);