diff --git a/lib/Promise.php b/lib/Promise.php index bd6cea3..2928ce6 100644 --- a/lib/Promise.php +++ b/lib/Promise.php @@ -128,7 +128,7 @@ public function otherwise(callable $onRejected): Promise /** * Marks this promise as fulfilled and sets its return value. * - * @param mixed $value + * @param mixed $value the value to return for the fulfilled promise */ public function fulfill($value = null): void { @@ -168,8 +168,6 @@ public function reject(\Throwable $reason): void * one. In PHP it might be useful to call this on the last promise in a * chain. * - * @return mixed - * * @psalm-return TReturn */ public function wait() @@ -207,11 +205,11 @@ 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 + * @var mixed the result to be returned when the promise is resolved */ - protected $value = null; + protected $value; /** * This method is used to call either an onFulfilled or onRejected callback. diff --git a/lib/Promise/functions.php b/lib/Promise/functions.php index d618303..4a40685 100644 --- a/lib/Promise/functions.php +++ b/lib/Promise/functions.php @@ -105,7 +105,7 @@ 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 + * @param mixed $value the value to return when the promise is resolved * * @return Promise */