Skip to content

Commit b92f017

Browse files
committed
fix: 更新多个文件中的回调参数类型注释以提高类型准确性
1 parent bb85b40 commit b92f017

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Function.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function startTransaction(TransactionContext $transactionContext, array $customS
4848
*
4949
* @template T
5050
*
51-
* @param callable(Scope):T $trace
51+
* @param (callable(Scope):T) $trace
5252
* @return T
5353
*/
5454
function trace(callable $trace, SpanContext $context)

src/Tracing/Tracer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function startTransaction(TransactionContext $transactionContext, array $
6464
*
6565
* @template T
6666
*
67-
* @param callable(Scope):T $trace
67+
* @param (callable(Scope):T) $trace
6868
* @return T
6969
*/
7070
public function trace(callable $trace, SpanContext $context)

src/Util/SafeCaller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ class SafeCaller
2626
* @template TReturn
2727
* @template TDefault
2828
*
29-
* @param Closure(): TReturn $closure
29+
* @param (Closure(): TReturn) $closure
3030
* @param TDefault $default
31-
* @param null|Closure(Throwable $e):bool $exceptionHandler
31+
* @param null|(Closure(Throwable $e):bool ) $exceptionHandler
3232
* @return TReturn|TDefault
3333
*/
3434
public function call(Closure $closure, mixed $default = null, ?Closure $exceptionHandler = null): mixed

0 commit comments

Comments
 (0)