Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4454-4459 (lines=6) @@
4451
            );
4452
        }
4453
4454
        if ($number === null) {
4455
            /** @noinspection NonSecureArrayRandUsageInspection */
4456
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4457
4458
            return static::create(
4459
                $arrayRandValue,
4460
                $this->iteratorClass,
4461
                false
4462
            );
@@ 4558-4564 (lines=7) @@
4555
            );
4556
        }
4557
4558
        if ($number === null) {
4559
            /** @noinspection NonSecureArrayRandUsageInspection */
4560
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4561
            $this->array = $arrayRandValue;
4562
4563
            return $this;
4564
        }
4565
4566
        /** @noinspection NonSecureShuffleUsageInspection */
4567
        \shuffle($this->array);