Skip to content

Commit

Permalink
[9.x] Use correct collection class (laravel#40651)
Browse files Browse the repository at this point in the history
* Use correct collection class

* Improve argument name
  • Loading branch information
JosephSilber authored Jan 26, 2022
1 parent 9667047 commit 36e9511
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Illuminate/Collections/Traits/EnumeratesValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -724,14 +724,14 @@ public function pipeInto($class)
/**
* Pass the collection through a series of callable pipes and return the result.
*
* @param array<callable> $pipes
* @param array<callable> $callbacks
* @return mixed
*/
public function pipeThrough($pipes)
public function pipeThrough($callbacks)
{
return static::make($pipes)->reduce(
function ($carry, $pipe) {
return $pipe($carry);
return Collection::make($callbacks)->reduce(
function ($carry, $callback) {
return $callback($carry);
},
$this,
);
Expand Down

0 comments on commit 36e9511

Please sign in to comment.