Code Duplication    Length = 10-12 lines in 2 locations

src/Arrayy.php 2 locations

@@ 660-669 (lines=10) @@
657
   *
658
   * @return Arrayy
659
   */
660
  public function at(\Closure $closure)
661
  {
662
    $array = $this->array;
663
664
    foreach ($array as $key => $value) {
665
      $closure($value, $key);
666
    }
667
668
    return static::create($array);
669
  }
670
671
  ////////////////////////////////////////////////////////////////////
672
  ////////////////////////////// ALTER ///////////////////////////////
@@ 941-952 (lines=12) @@
938
   *
939
   * @return Arrayy
940
   */
941
  public function reject(\Closure $closure)
942
  {
943
    $filtered = array();
944
945
    foreach ($this->array as $key => $value) {
946
      if (!$closure($value, $key)) {
947
        $filtered[$key] = $value;
948
      }
949
    }
950
951
    return static::create($filtered);
952
  }
953
954
  /**
955
   * Remove the first value from the current array.