Skip to content

Commit

Permalink
Add back params with mixed type and give them descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Jun 28, 2023
1 parent 08151ed commit 1ee3b49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Promise.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions lib/Promise/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<mixed>
*/
function resolve($value): Promise
Expand Down

0 comments on commit 1ee3b49

Please sign in to comment.