Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3278-3283 (lines=6) @@
3275
            );
3276
        }
3277
3278
        if ($number === null) {
3279
            /** @noinspection NonSecureArrayRandUsageInspection */
3280
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3281
3282
            return static::create(
3283
                $arrayRandValue,
3284
                $this->iteratorClass,
3285
                false
3286
            );
@@ 3374-3380 (lines=7) @@
3371
            );
3372
        }
3373
3374
        if ($number === null) {
3375
            /** @noinspection NonSecureArrayRandUsageInspection */
3376
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3377
            $this->array = $arrayRandValue;
3378
3379
            return $this;
3380
        }
3381
3382
        /** @noinspection NonSecureShuffleUsageInspection */
3383
        \shuffle($this->array);