Code Duplication    Length = 10-12 lines in 2 locations

src/Arrayy.php 2 locations

@@ 646-655 (lines=10) @@
643
   *
644
   * @return Arrayy
645
   */
646
  public function at(\Closure $closure)
647
  {
648
    $array = $this->array;
649
650
    foreach ($array as $key => $value) {
651
      $closure($value, $key);
652
    }
653
654
    return static::create($array);
655
  }
656
657
  ////////////////////////////////////////////////////////////////////
658
  ////////////////////////////// ALTER ///////////////////////////////
@@ 954-965 (lines=12) @@
951
   *
952
   * @return Arrayy
953
   */
954
  public function reject(\Closure $closure)
955
  {
956
    $filtered = array();
957
958
    foreach ($this->array as $key => $value) {
959
      if (!$closure($value, $key)) {
960
        $filtered[$key] = $value;
961
      }
962
    }
963
964
    return static::create($filtered);
965
  }
966
967
  /**
968
   * Remove the first value from the current array.