Skip to content

Commit f401e77

Browse files
authored
Improves phpstan docs for Hyperf\Support\SafeCaller (#7227)
1 parent e0b6807 commit f401e77

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/SafeCaller.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ public function __construct(private ContainerInterface $container)
2424
{
2525
}
2626

27+
/**
28+
* @template TReturn
29+
* @template TDefault
30+
*
31+
* @param Closure(): TReturn $closure
32+
* @param null|(Closure(): TDefault) $default
33+
* @return ($default is Closure? TDefault : null)|TReturn
34+
*/
2735
public function call(Closure $closure, ?Closure $default = null, string $level = LogLevel::CRITICAL): mixed
2836
{
2937
try {

0 commit comments

Comments
 (0)