Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4131-4136 (lines=6) @@
4128
            );
4129
        }
4130
4131
        if ($number === null) {
4132
            /** @noinspection NonSecureArrayRandUsageInspection */
4133
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4134
4135
            return static::create(
4136
                $arrayRandValue,
4137
                $this->iteratorClass,
4138
                false
4139
            );
@@ 4235-4241 (lines=7) @@
4232
            );
4233
        }
4234
4235
        if ($number === null) {
4236
            /** @noinspection NonSecureArrayRandUsageInspection */
4237
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4238
            $this->array = $arrayRandValue;
4239
4240
            return $this;
4241
        }
4242
4243
        /** @noinspection NonSecureShuffleUsageInspection */
4244
        \shuffle($this->array);