blob: 9d75d26fb33e413fcac5f7615fb6a33848602099 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Tightenco\Collect\Support\Traits;
4
5trait Tappable
6{
7 /**
8 * Call the given Closure with this instance then return the instance.
9 *
10 * @param callable|null $callback
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010011 * @return $this|\Tightenco\Collect\Support\HigherOrderTapProxy
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +020012 */
13 public function tap($callback = null)
14 {
15 return tap($this, $callback);
16 }
17}