Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3581-3586 (lines=6) @@
3578
            );
3579
        }
3580
3581
        if ($number === null) {
3582
            /** @noinspection NonSecureArrayRandUsageInspection */
3583
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3584
3585
            return static::create(
3586
                $arrayRandValue,
3587
                $this->iteratorClass,
3588
                false
3589
            );
@@ 3681-3687 (lines=7) @@
3678
            );
3679
        }
3680
3681
        if ($number === null) {
3682
            /** @noinspection NonSecureArrayRandUsageInspection */
3683
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3684
            $this->array = $arrayRandValue;
3685
3686
            return $this;
3687
        }
3688
3689
        /** @noinspection NonSecureShuffleUsageInspection */
3690
        \shuffle($this->array);