From 1ee3b492995a6d35398bd888620e9ca360459216 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 28 Jun 2023 16:05:03 +0545 Subject: [PATCH] Add back params with mixed type and give them descriptions --- lib/Promise.php | 6 +++++- lib/Promise/functions.php | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Promise.php b/lib/Promise.php index aa26289..2928ce6 100644 --- a/lib/Promise.php +++ b/lib/Promise.php @@ -127,6 +127,8 @@ public function otherwise(callable $onRejected): Promise /** * Marks this promise as fulfilled and sets its return value. + * + * @param mixed $value the value to return for the fulfilled promise */ public function fulfill($value = null): void { @@ -203,7 +205,9 @@ public function wait() * The result of the promise. * * If the promise was fulfilled, this will be the result value. If the - * promise was rejected, this property hold the rejection reason. + * promise was rejected, this property holds the rejection reason. + * + * @var mixed the result to be returned when the promise is resolved */ protected $value; diff --git a/lib/Promise/functions.php b/lib/Promise/functions.php index a202458..4a40685 100644 --- a/lib/Promise/functions.php +++ b/lib/Promise/functions.php @@ -105,6 +105,8 @@ function ($reason) use ($fail, &$alreadyDone) { * If the value is a promise, the returned promise will attach itself to that * promise and eventually get the same state as the followed promise. * + * @param mixed $value the value to return when the promise is resolved + * * @return Promise */ function resolve($value): Promise