Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | namespace Tightenco\Collect\Support\Traits; |
| 4 | |
| 5 | trait Tappable |
| 6 | { |
| 7 | /** |
| 8 | * Call the given Closure with this instance then return the instance. |
| 9 | * |
| 10 | * @param callable|null $callback |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 11 | * @return $this|\Tightenco\Collect\Support\HigherOrderTapProxy |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 12 | */ |
| 13 | public function tap($callback = null) |
| 14 | { |
| 15 | return tap($this, $callback); |
| 16 | } |
| 17 | } |