Skip to content

Commit

Permalink
Template params can only have one argument
Browse files Browse the repository at this point in the history
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
  • Loading branch information
WyriHaximus committed Jan 21, 2023
1 parent 0df894e commit eba153c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*
* @param ReadableStreamInterface<string> $stream
* @param ?int $maxLength Maximum number of bytes to buffer or null for unlimited.
* @return PromiseInterface<string,\RuntimeException>
* @return PromiseInterface<string>
*/
function buffer(ReadableStreamInterface $stream, $maxLength = null)
{
Expand Down Expand Up @@ -121,7 +121,7 @@ function buffer(ReadableStreamInterface $stream, $maxLength = null)
*
* @param ReadableStreamInterface|WritableStreamInterface $stream
* @param string $event
* @return PromiseInterface<mixed,\RuntimeException>
* @return PromiseInterface<mixed>
*/
function first(EventEmitterInterface $stream, $event = 'data')
{
Expand Down Expand Up @@ -192,7 +192,7 @@ function first(EventEmitterInterface $stream, $event = 'data')
*
* @param ReadableStreamInterface|WritableStreamInterface $stream
* @param string $event
* @return PromiseInterface<array,\RuntimeException>
* @return PromiseInterface<array>
*/
function all(EventEmitterInterface $stream, $event = 'data')
{
Expand Down Expand Up @@ -296,7 +296,7 @@ function all(EventEmitterInterface $stream, $event = 'data')
* });
* ```
*
* @param PromiseInterface<ReadableStreamInterface<T>,\Exception> $promise
* @param PromiseInterface<ReadableStreamInterface<T>> $promise
* @return ReadableStreamInterface<T>
*/
function unwrapReadable(PromiseInterface $promise)
Expand Down Expand Up @@ -361,7 +361,7 @@ function unwrapReadable(PromiseInterface $promise)
* });
* ```
*
* @param PromiseInterface<WritableStreamInterface<T>,\Exception> $promise
* @param PromiseInterface<WritableStreamInterface<T>> $promise
* @return WritableStreamInterface<T>
*/
function unwrapWritable(PromiseInterface $promise)
Expand Down

0 comments on commit eba153c

Please sign in to comment.