We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 132c297 commit d235876Copy full SHA for d235876
src/support/src/Traits/Tappable.php
@@ -0,0 +1,22 @@
1
+<?php
2
+
3
+declare(strict_types=1);
4
5
+namespace Hypervel\Support\Traits;
6
7
+use function Hyperf\Tappable\tap;
8
9
+trait Tappable
10
+{
11
+ /**
12
+ * Call the given Closure with this instance then return the instance.
13
+ *
14
+ * @param null|(callable($this): mixed) $callback
15
+ * @param null|mixed $callback
16
+ * @return ($callback is null ? \Hyperf\Tappable\HigherOrderTapProxy : $this)
17
+ */
18
+ public function tap($callback = null)
19
+ {
20
+ return tap($this, $callback);
21
+ }
22
+}
0 commit comments