Code Duplication    Length = 5-6 lines in 2 locations

src/Arrayy.php 2 locations

@@ 2889-2893 (lines=5) @@
2886
      return static::create();
2887
    }
2888
2889
    if ($number === null) {
2890
      /** @noinspection NonSecureArrayRandUsageInspection */
2891
      $arrayRandValue = [$this->array[\array_rand($this->array)]];
2892
2893
      return static::create($arrayRandValue);
2894
    }
2895
2896
    $arrayTmp = $this->array;
@@ 2962-2967 (lines=6) @@
2959
      return static::create();
2960
    }
2961
2962
    if ($number === null) {
2963
      /** @noinspection NonSecureArrayRandUsageInspection */
2964
      $arrayRandValue = [$this->array[\array_rand($this->array)]];
2965
      $this->array = $arrayRandValue;
2966
2967
      return $this;
2968
    }
2969
2970
    /** @noinspection NonSecureShuffleUsageInspection */