Skip to content

Add type hinting to wait function #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/Promise.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}