diff --git a/lib/functions.php b/lib/functions.php index dab4f21f..0c70faa0 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -350,9 +350,11 @@ function adapt($promise): Promise * This function is the same as some() with the notable exception that it will never fail even * if all promises in the array resolve unsuccessfully. * - * @param Promise[]|ReactPromise[] $promises + * @template TValue * - * @return Promise + * @param Promise[]|ReactPromise[] $promises + * + * @return Promise * * @throws \Error If a non-Promise is in the array. */ @@ -423,9 +425,11 @@ function all(array $promises): Promise /** * Returns a promise that succeeds when the first promise succeeds, and fails only if all promises fail. * - * @param Promise[]|ReactPromise[] $promises Array of only promises. + * @template TValue * - * @return Promise + * @param Promise[]|ReactPromise[] $promises Array of only promises. + * + * @return Promise * * @throws \Error If the array is empty or a non-Promise is in the array. */ @@ -475,12 +479,14 @@ function first(array $promises): Promise * Resolves with a two-item array delineating successful and failed Promise results. * * The returned promise will only fail if the given number of required promises fail. + * + * @template TValue * - * @param Promise[]|ReactPromise[] $promises Array of only promises. - * @param int $required Number of promises that must succeed for the + * @param Promise[]|ReactPromise[] $promises Array of only promises. + * @param int $required Number of promises that must succeed for the * returned promise to succeed. * - * @return Promise + * @return Promise * * @throws \Error If a non-Promise is in the array. */