Skip to content

Commit a584f92

Browse files
committed
Template params can only have one argument
The fact that a promise can also be rejected with a Throwable and/or Exception is implied and there is no need to also define that here. Refs: reactphp/promise#223
1 parent 790ce75 commit a584f92

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/functions.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@
129129
* For more details on the promise primitives, please refer to the
130130
* [Promise documentation](https://github.com/reactphp/promise#functions).
131131
*
132-
* @param PromiseInterface<mixed, \Throwable|mixed> $promise
132+
* @param PromiseInterface<mixed> $promise
133133
* @param float $time
134134
* @param ?LoopInterface $loop
135-
* @return PromiseInterface<mixed, TimeoutException|\Throwable|mixed>
135+
* @return PromiseInterface<mixed>
136136
*/
137137
function timeout(PromiseInterface $promise, $time, LoopInterface $loop = null)
138138
{
@@ -219,7 +219,7 @@ function timeout(PromiseInterface $promise, $time, LoopInterface $loop = null)
219219
*
220220
* @param float $time
221221
* @param ?LoopInterface $loop
222-
* @return PromiseInterface<void, \RuntimeException>
222+
* @return PromiseInterface<void>
223223
*/
224224
function sleep($time, LoopInterface $loop = null)
225225
{
@@ -275,7 +275,7 @@ function sleep($time, LoopInterface $loop = null)
275275
*
276276
* @param float $time
277277
* @param ?LoopInterface $loop
278-
* @return PromiseInterface<float, \RuntimeException>
278+
* @return PromiseInterface<float>
279279
* @deprecated 1.8.0 See `sleep()` instead
280280
* @see sleep()
281281
*/
@@ -318,7 +318,7 @@ function resolve($time, LoopInterface $loop = null)
318318
*
319319
* @param float $time
320320
* @param LoopInterface $loop
321-
* @return PromiseInterface<void, TimeoutException|\RuntimeException>
321+
* @return PromiseInterface<void>
322322
* @deprecated 1.8.0 See `sleep()` instead
323323
* @see sleep()
324324
*/

0 commit comments

Comments
 (0)