Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 5144-5149 (lines=6) @@
5141
            );
5142
        }
5143
5144
        if ($number === null) {
5145
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
5146
5147
            return static::create(
5148
                $arrayRandValue,
5149
                $this->iteratorClass,
5150
                false
5151
            );
5152
        }
@@ 5261-5267 (lines=7) @@
5258
            );
5259
        }
5260
5261
        if ($number === null) {
5262
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
5263
            $this->array = $arrayRandValue;
5264
5265
            return $this;
5266
        }
5267
5268
        \shuffle($this->array);
5269
5270
        return $this->firstsMutable($number);