Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4346-4351 (lines=6) @@
4343
            );
4344
        }
4345
4346
        if ($number === null) {
4347
            /** @noinspection NonSecureArrayRandUsageInspection */
4348
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4349
4350
            return static::create(
4351
                $arrayRandValue,
4352
                $this->iteratorClass,
4353
                false
4354
            );
@@ 4450-4456 (lines=7) @@
4447
            );
4448
        }
4449
4450
        if ($number === null) {
4451
            /** @noinspection NonSecureArrayRandUsageInspection */
4452
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4453
            $this->array = $arrayRandValue;
4454
4455
            return $this;
4456
        }
4457
4458
        /** @noinspection NonSecureShuffleUsageInspection */
4459
        \shuffle($this->array);