From 5b924c4c396cf62355886b59989461039cd01f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=A3=E8=A8=80=E5=B0=B1=E6=98=AFSiam?= <59419979@qq.com> Date: Mon, 30 Dec 2024 12:18:27 +0800 Subject: [PATCH] Update SafeCaller.php (#819) --- src/Util/SafeCaller.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Util/SafeCaller.php b/src/Util/SafeCaller.php index 5314b17..fa8ed54 100644 --- a/src/Util/SafeCaller.php +++ b/src/Util/SafeCaller.php @@ -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 {