1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00

Adding a function_exists conditional around the tap method to reduce conflict with the illuminate/support library

This commit is contained in:
Nate Ritter
2016-06-09 01:17:17 -07:00
parent 65b93aa013
commit e43f9a2eb9

View File

@@ -108,18 +108,20 @@ function should_be_sudo()
}
}
/**
* Tap the given value.
*
* @param mixed $value
* @param callable $callback
* @return mixed
*/
function tap($value, callable $callback)
{
$callback($value);
if (! function_exists('tap')) {
/**
* Tap the given value.
*
* @param mixed $value
* @param callable $callback
* @return mixed
*/
function tap($value, callable $callback)
{
$callback($value);
return $value;
return $value;
}
}
/**