From 029fe3fe502529a283bb9944902829df77ef9648 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 19 Nov 2021 21:24:34 +0100 Subject: [PATCH] ExtendedPromiseInterface: type-hint for then() This solves the problem that a PHP IDE always believes your then() method returns a PromiseInterface and not an ExtendedPromiseInterface --- src/ExtendedPromiseInterface.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ExtendedPromiseInterface.php b/src/ExtendedPromiseInterface.php index 13b63691..e07f31a5 100644 --- a/src/ExtendedPromiseInterface.php +++ b/src/ExtendedPromiseInterface.php @@ -2,6 +2,9 @@ namespace React\Promise; +/** + * @method ExtendedPromiseInterface then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null) + */ interface ExtendedPromiseInterface extends PromiseInterface { /**