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