Skip to content

Commit eba153c

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 0df894e commit eba153c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/functions.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*
4646
* @param ReadableStreamInterface<string> $stream
4747
* @param ?int $maxLength Maximum number of bytes to buffer or null for unlimited.
48-
* @return PromiseInterface<string,\RuntimeException>
48+
* @return PromiseInterface<string>
4949
*/
5050
function buffer(ReadableStreamInterface $stream, $maxLength = null)
5151
{
@@ -121,7 +121,7 @@ function buffer(ReadableStreamInterface $stream, $maxLength = null)
121121
*
122122
* @param ReadableStreamInterface|WritableStreamInterface $stream
123123
* @param string $event
124-
* @return PromiseInterface<mixed,\RuntimeException>
124+
* @return PromiseInterface<mixed>
125125
*/
126126
function first(EventEmitterInterface $stream, $event = 'data')
127127
{
@@ -192,7 +192,7 @@ function first(EventEmitterInterface $stream, $event = 'data')
192192
*
193193
* @param ReadableStreamInterface|WritableStreamInterface $stream
194194
* @param string $event
195-
* @return PromiseInterface<array,\RuntimeException>
195+
* @return PromiseInterface<array>
196196
*/
197197
function all(EventEmitterInterface $stream, $event = 'data')
198198
{
@@ -296,7 +296,7 @@ function all(EventEmitterInterface $stream, $event = 'data')
296296
* });
297297
* ```
298298
*
299-
* @param PromiseInterface<ReadableStreamInterface<T>,\Exception> $promise
299+
* @param PromiseInterface<ReadableStreamInterface<T>> $promise
300300
* @return ReadableStreamInterface<T>
301301
*/
302302
function unwrapReadable(PromiseInterface $promise)
@@ -361,7 +361,7 @@ function unwrapReadable(PromiseInterface $promise)
361361
* });
362362
* ```
363363
*
364-
* @param PromiseInterface<WritableStreamInterface<T>,\Exception> $promise
364+
* @param PromiseInterface<WritableStreamInterface<T>> $promise
365365
* @return WritableStreamInterface<T>
366366
*/
367367
function unwrapWritable(PromiseInterface $promise)

0 commit comments

Comments
 (0)