Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

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