Code Duplication    Length = 6-7 lines in 2 locations

src/Arrayy.php 2 locations

@@ 4263-4268 (lines=6) @@
4260
            );
4261
        }
4262
4263
        if ($number === null) {
4264
            /** @noinspection NonSecureArrayRandUsageInspection */
4265
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4266
4267
            return static::create(
4268
                $arrayRandValue,
4269
                $this->iteratorClass,
4270
                false
4271
            );
@@ 4367-4373 (lines=7) @@
4364
            );
4365
        }
4366
4367
        if ($number === null) {
4368
            /** @noinspection NonSecureArrayRandUsageInspection */
4369
            $arrayRandValue = [$this->array[\array_rand($this->array)]];
4370
            $this->array = $arrayRandValue;
4371
4372
            return $this;
4373
        }
4374
4375
        /** @noinspection NonSecureShuffleUsageInspection */
4376
        \shuffle($this->array);