Code Duplication    Length = 10-12 lines in 2 locations

src/Arrayy.php 2 locations

@@ 597-606 (lines=10) @@
594
   *
595
   * @return Arrayy
596
   */
597
  public function at(\Closure $closure)
598
  {
599
    $array = $this->array;
600
601
    foreach ($array as $key => $value) {
602
      $closure($value, $key);
603
    }
604
605
    return static::create($array);
606
  }
607
608
  ////////////////////////////////////////////////////////////////////
609
  ////////////////////////////// ALTER ///////////////////////////////
@@ 905-916 (lines=12) @@
902
   *
903
   * @return Arrayy
904
   */
905
  public function reject(\Closure $closure)
906
  {
907
    $filtered = array();
908
909
    foreach ($this->array as $key => $value) {
910
      if (!$closure($value, $key)) {
911
        $filtered[$key] = $value;
912
      }
913
    }
914
915
    return static::create($filtered);
916
  }
917
918
  /**
919
   * Remove the first value from an array.