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.
2 parents 6906357 + e43f9a2 commit d4e71e5Copy full SHA for d4e71e5
cli/includes/helpers.php
@@ -108,18 +108,20 @@ function should_be_sudo()
108
}
109
110
111
-/**
112
- * Tap the given value.
113
- *
114
- * @param mixed $value
115
- * @param callable $callback
116
- * @return mixed
117
- */
118
-function tap($value, callable $callback)
119
-{
120
- $callback($value);
121
-
122
- return $value;
+if (! function_exists('tap')) {
+ /**
+ * Tap the given value.
+ *
+ * @param mixed $value
+ * @param callable $callback
+ * @return mixed
+ */
+ function tap($value, callable $callback)
+ {
+ $callback($value);
+
123
+ return $value;
124
+ }
125
126
127
/**
0 commit comments