Skip to content

Commit c480398

Browse files
authored
Improve psalm types (#101)
* Improve psalm type hints
1 parent dda87ae commit c480398

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Promise.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class Promise
3131
* promise will be an array containing the resolution values of each of the
3232
* items in `$promises`.
3333
*
34-
* @param PromiseInterface[]|mixed[] $promises
34+
* @param iterable<int, PromiseInterface|mixed> $promises
3535
* @return PromiseInterface
3636
*/
3737
public static function all(iterable $promises): PromiseInterface
@@ -50,7 +50,7 @@ public static function all(iterable $promises): PromiseInterface
5050
* The returned promise will also reject with a {@see LengthException} if
5151
* `$promises` contains 0 items.
5252
*
53-
* @param PromiseInterface[]|mixed[] $promises
53+
* @param iterable<int, PromiseInterface|mixed> $promises
5454
* @return PromiseInterface
5555
*/
5656
public static function any(iterable $promises): PromiseInterface
@@ -72,7 +72,7 @@ public static function any(iterable $promises): PromiseInterface
7272
* The returned promise will also reject with a {@see LengthException} if
7373
* `$promises` contains less items than `$count`.
7474
*
75-
* @param PromiseInterface[]|mixed[] $promises
75+
* @param iterable<int, PromiseInterface|mixed> $promises
7676
* @param int $count
7777
* @return PromiseInterface
7878
*/
@@ -90,7 +90,7 @@ public static function some(iterable $promises, int $count): PromiseInterface
9090
* resolved value of a promise or value in `$promises`.
9191
*
9292
* @psalm-param PromiseMapCallback $map
93-
* @param PromiseInterface[]|mixed[] $promises
93+
* @param iterable<int, PromiseInterface|mixed> $promises
9494
* @param callable $map
9595
* @return PromiseInterface
9696
*/
@@ -106,7 +106,7 @@ public static function map(iterable $promises, callable $map): PromiseInterface
106106
* starting value.
107107
*
108108
* @psalm-param PromiseReduceCallback $reduce
109-
* @param PromiseInterface[]|mixed[] $promises
109+
* @param iterable<int, PromiseInterface|mixed> $promises
110110
* @param callable $reduce
111111
* @param mixed $initial
112112
* @return PromiseInterface

0 commit comments

Comments
 (0)