diff --git a/stubs/Runtime.stub b/stubs/Runtime.stub index 5abb4c2..a6ebf5e 100644 --- a/stubs/Runtime.stub +++ b/stubs/Runtime.stub @@ -33,10 +33,29 @@ final class Runtime /* Execute */ /** - * @param (Closure():T)|(Closure():void) $task - * @param array $argv + * @param (Closure():T)|(Closure(A0):T)|(Closure(A0,A1):T)|(Closure(A0,A1,A2):T)|(Closure(A0,A1,A2,A3):T)|(Closure(A0,A1,A2,A3,A4):T)|(Closure():void)|(Closure(A0):void)|(Closure(A0,A1):void)|(Closure(A0,A1,A2):void)|(Closure(A0,A1,A2,A3):void)|(Closure(A0,A1,A2,A3,A4):void) $task + * @param array{}|array{A0}|array{A0,A1}|array{A0,A1,A2}|array{A0,A1,A2,A3}|array{A0,A1,A2,A3,A4} $argv + * + * @return ( + * $task is (Closure():T) ? Future : ( + * $task is (Closure(A0):T) ? Future : ( + * $task is (Closure(A0,A1):T) ? Future : ( + * $task is (Closure(A0,A1,A2):T) ? Future : ( + * $task is (Closure(A0,A1,A2,A3):T) ? Future : ( + * $task is (Closure(A0,A1,A2,A3,A4):T) ? Future : null + * ) + * ) + * ) + * ) + * ) + * ) + * * @template T - * @return ($task is (Closure():T) ? Future : null) + * @template A0 (any number of function arguments, see https://github.com/phpstan/phpstan/issues/8214) + * @template A1 + * @template A2 + * @template A3 + * @template A4 * * @throws Runtime\Error\Closed if \parallel\Runtime was closed. * @throws Runtime\Error\IllegalFunction if task is a closure created from an internal function.