Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4578-4583 (lines=6) @@
4575
            );
4576
        }
4577
4578
        if ($number === null) {
4579
            /** @noinspection NonSecureArrayRandUsageInspection */
4580
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4581
4582
            return static::create(
4583
                $arrayRandValue,
4584
                $this->iteratorClass,
4585
                false
4586
            );
@@ 4682-4688 (lines=7) @@
4679
            );
4680
        }
4681
4682
        if ($number === null) {
4683
            /** @noinspection NonSecureArrayRandUsageInspection */
4684
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4685
            $this->array = $arrayRandValue;
4686
4687
            return $this;
4688
        }
4689
4690
        /** @noinspection NonSecureShuffleUsageInspection */
4691
        \shuffle($this->array);