From 86b50d7db2914df4d29dc4ff8b57388dd494762d Mon Sep 17 00:00:00 2001 From: Joel Wurtz Date: Sat, 12 Dec 2015 23:52:12 +0100 Subject: [PATCH] Add type hinting to wait function --- src/Promise.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Promise.php b/src/Promise.php index af6f321..229147d 100644 --- a/src/Promise.php +++ b/src/Promise.php @@ -2,6 +2,8 @@ namespace Http\Promise; +use Psr\Http\Message\ResponseInterface; + /** * Promise represents a value that may not be available yet, but will be resolved at some point in future. * It acts like a proxy to the actual value. @@ -56,11 +58,11 @@ public function getState(); * * When called with the unwrap option * - * @param bool $unwrap + * @param bool $unwrap Whether to return resolved value / throw reason or not * - * @return mixed + * @return ResponseInterface|null Resolved value, null if $unwrap is set to false * - * @throws \Exception When the rejection reason is an exception. + * @throws \Http\Client\Exception The rejection reason. */ public function wait($unwrap = true); }