Skip to content

Commit 063154a

Browse files
authored
[9.x] Pass collection instance into tap directly, not a clone (#36220)
* Pass instance into `tap` directly * Use `tap` instead of `pipe` in test
1 parent f142da5 commit 063154a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Traits/EnumeratesValues.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ public function reject($callback = true)
764764
*/
765765
public function tap(callable $callback)
766766
{
767-
$callback(clone $this);
767+
$callback($this);
768768

769769
return $this;
770770
}

0 commit comments

Comments
 (0)