@@ -94,11 +94,11 @@ function ($error) use (&$exception, &$rejected, &$wait) {
9494 * @param array<callable():PromiseInterface<mixed,Exception>> $tasks
9595 * @return PromiseInterface<array<mixed>,Exception>
9696 */
97- function parallel (array $ tasks )
97+ function parallel (array $ tasks ): PromiseInterface
9898{
9999 $ deferred = new Deferred ();
100- $ results = array () ;
101- $ errors = array () ;
100+ $ results = [] ;
101+ $ errors = [] ;
102102
103103 $ done = function () use (&$ results , &$ errors , $ deferred ) {
104104 if (count ($ errors )) {
@@ -145,10 +145,10 @@ function parallel(array $tasks)
145145 * @param array<callable():PromiseInterface<mixed,Exception>> $tasks
146146 * @return PromiseInterface<array<mixed>,Exception>
147147 */
148- function series (array $ tasks )
148+ function series (array $ tasks ): PromiseInterface
149149{
150150 $ deferred = new Deferred ();
151- $ results = array () ;
151+ $ results = [] ;
152152
153153 /** @var callable():void $next */
154154 $ taskCallback = function ($ result ) use (&$ results , &$ next ) {
@@ -178,7 +178,7 @@ function series(array $tasks)
178178 * @param array<callable(mixed=):PromiseInterface<mixed,Exception>> $tasks
179179 * @return PromiseInterface<mixed,Exception>
180180 */
181- function waterfall (array $ tasks )
181+ function waterfall (array $ tasks ): PromiseInterface
182182{
183183 $ deferred = new Deferred ();
184184
0 commit comments