Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3219-3224 (lines=6) @@
3216
            );
3217
        }
3218
3219
        if ($number === null) {
3220
            /** @noinspection NonSecureArrayRandUsageInspection */
3221
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3222
3223
            return static::create(
3224
                $arrayRandValue,
3225
                $this->iteratorClass,
3226
                false
3227
            );
@@ 3315-3321 (lines=7) @@
3312
            );
3313
        }
3314
3315
        if ($number === null) {
3316
            /** @noinspection NonSecureArrayRandUsageInspection */
3317
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
3318
            $this->array = $arrayRandValue;
3319
3320
            return $this;
3321
        }
3322
3323
        /** @noinspection NonSecureShuffleUsageInspection */
3324
        \shuffle($this->array);