Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 5124-5129 (lines=6) @@
5121
            );
5122
        }
5123
5124
        if ($number === null) {
5125
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
5126
5127
            return static::create(
5128
                $arrayRandValue,
5129
                $this->iteratorClass,
5130
                false
5131
            );
5132
        }
@@ 5241-5247 (lines=7) @@
5238
            );
5239
        }
5240
5241
        if ($number === null) {
5242
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
5243
            $this->array = $arrayRandValue;
5244
5245
            return $this;
5246
        }
5247
5248
        \shuffle($this->array);
5249
5250
        return $this->firstsMutable($number);