Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3270-3275 (lines=6) @@
3267
            );
3268
        }
3269
3270
        if ($number === null) {
3271
            /** @noinspection NonSecureArrayRandUsageInspection */
3272
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3273
3274
            return static::create(
3275
                $arrayRandValue,
3276
                $this->iteratorClass,
3277
                false
3278
            );
@@ 3366-3372 (lines=7) @@
3363
            );
3364
        }
3365
3366
        if ($number === null) {
3367
            /** @noinspection NonSecureArrayRandUsageInspection */
3368
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3369
            $this->array = $arrayRandValue;
3370
3371
            return $this;
3372
        }
3373
3374
        /** @noinspection NonSecureShuffleUsageInspection */
3375
        \shuffle($this->array);