| 1 | <?php |
| 2 | |
| 3 | namespace Illuminate\Support\Traits; |
| 4 | |
| 5 | trait Tappable |
| 6 | { |
| 7 | /** |
| 8 | * Call the given Closure with this instance then return the instance. |
| 9 | * |
| 10 | * @param (callable($this): mixed)|null $callback |
| 11 | * @return ($callback is null ? \Illuminate\Support\HigherOrderTapProxy : $this) |
| 12 | */ |
| 13 | public function tap($callback = null) |
| 14 | { |
| 15 | return tap($this, $callback); |
| 16 | } |
| 17 | } |