Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4941-4946 (lines=6) @@
4938
            );
4939
        }
4940
4941
        if ($number === null) {
4942
            /** @noinspection NonSecureArrayRandUsageInspection */
4943
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4944
4945
            return static::create(
4946
                $arrayRandValue,
4947
                $this->iteratorClass,
4948
                false
4949
            );
@@ 5058-5064 (lines=7) @@
5055
            );
5056
        }
5057
5058
        if ($number === null) {
5059
            /** @noinspection NonSecureArrayRandUsageInspection */
5060
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
5061
            $this->array = $arrayRandValue;
5062
5063
            return $this;
5064
        }
5065
5066
        /** @noinspection NonSecureShuffleUsageInspection */
5067
        \shuffle($this->array);