Skip to content

Commit

Permalink
Simplify the times() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Sep 6, 2019
1 parent 3546cfa commit 6d8014b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
use drupol\collection\Transformation\Implode;
use drupol\collection\Transformation\Last;
use drupol\collection\Transformation\Reduce;
use drupol\collection\Transformation\Run;

/**
* Class Collection.
Expand Down Expand Up @@ -447,7 +446,7 @@ static function () use ($number) {
}
);

return null === $callback ? $instance : new Collection((new Run(new Walk($callback)))->on($instance));
return null === $callback ? $instance : new Collection($instance->run(new Walk($callback)));
}

/**
Expand Down

0 comments on commit 6d8014b

Please sign in to comment.