Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3471-3476 (lines=6) @@
3468
            );
3469
        }
3470
3471
        if ($number === null) {
3472
            /** @noinspection NonSecureArrayRandUsageInspection */
3473
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3474
3475
            return static::create(
3476
                $arrayRandValue,
3477
                $this->iteratorClass,
3478
                false
3479
            );
@@ 3567-3573 (lines=7) @@
3564
            );
3565
        }
3566
3567
        if ($number === null) {
3568
            /** @noinspection NonSecureArrayRandUsageInspection */
3569
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3570
            $this->array = $arrayRandValue;
3571
3572
            return $this;
3573
        }
3574
3575
        /** @noinspection NonSecureShuffleUsageInspection */
3576
        \shuffle($this->array);