Skip to content

Commit

Permalink
Optimized phpdoc (#6927)
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdijia authored Jul 4, 2024
1 parent 9575665 commit 0f26697
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ function parallel(array $callables, int $concurrent = 0): array
return $parallel->wait();
}

/**
* @template TReturn
*
* @param Closure():TReturn $closure
* @return TReturn
*/
function wait(Closure $closure, ?float $timeout = null)
{
if (ApplicationContext::hasContainer()) {
Expand Down
4 changes: 4 additions & 0 deletions src/Waiter.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ public function __construct(float $timeout = 10.0)
}

/**
* @template TReturn
*
* @param Closure():TReturn $closure
* @param null|float $timeout seconds
* @return TReturn
*/
public function wait(Closure $closure, ?float $timeout = null)
{
Expand Down

0 comments on commit 0f26697

Please sign in to comment.