Skip to content

Commit

Permalink
ExtendedPromiseInterface: type-hint for then()
Browse files Browse the repository at this point in the history
This solves the problem that a PHP IDE always believes your then()
method returns a PromiseInterface and not an ExtendedPromiseInterface
  • Loading branch information
Thomas-Gelf committed Nov 20, 2021
1 parent 29daf46 commit 029fe3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ExtendedPromiseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace React\Promise;

/**
* @method ExtendedPromiseInterface then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
*/
interface ExtendedPromiseInterface extends PromiseInterface
{
/**
Expand Down

0 comments on commit 029fe3f

Please sign in to comment.