Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 05925bb

Browse files
committed
Fixing failing tests and code style issues.
1 parent 7191ea0 commit 05925bb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static function createWithConfig(array $config)
5151
*/
5252
public function sendRequest(RequestInterface $request)
5353
{
54-
$promise = $this->sendAsyncRequest($request);
54+
$promise = $this->sendAsyncRequest($request)->wait();
5555

5656
return $promise->wait();
5757
}

src/Promise.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function wait($unwrap = true)
9797
$this->promise->wait(false);
9898

9999
if ($unwrap) {
100-
if ($this->getState() == self::REJECTED) {
100+
if (self::REJECTED == $this->getState()) {
101101
return rejection_for($this->exception);
102102
}
103103

tests/PromiseTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ public function testNonDomainExceptionIsHandled()
2121

2222
$guzzlePromise = new Promise($promise, $request->reveal());
2323

24-
$guzzlePromise->wait();
24+
$guzzlePromise->wait()->wait();
2525
}
2626
}

0 commit comments

Comments
 (0)