Skip to content

Commit

Permalink
Update SafeCaller.php (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanyanwow authored Dec 30, 2024
1 parent 2355ad5 commit 58715ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sentry/src/Util/SafeCaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ class SafeCaller
{
/**
* Example
* $data['scores'] = FriendsOfHyperf\Sentry\Util\SafeCaller::call(fn () => di(ScoresInterface::class)->get(), 'default');.
* $data['scores'] = di(FriendsOfHyperf\Sentry\Util\SafeCaller::class)->call(fn () => time(), 'default');.
*
* @template TReturn
*
* @param Closure(): TReturn $closure
* @return TReturn|mixed
*/
public function call(Closure $closure, mixed $default = null, ?Closure $exceptionHandler = null): mixed
{
Expand Down

0 comments on commit 58715ab

Please sign in to comment.