This repository was archived by the owner on Jan 6, 2024. It is now read-only.
File tree 3 files changed +7
-3
lines changed
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Http \Adapter \Guzzle6 ;
4
4
5
+ use function Clue \StreamFilter \fun ;
6
+ use function foo \func ;
5
7
use GuzzleHttp \Client as GuzzleClient ;
6
8
use GuzzleHttp \ClientInterface ;
7
9
use GuzzleHttp \HandlerStack ;
8
10
use GuzzleHttp \Middleware ;
9
11
use Http \Client \HttpAsyncClient ;
10
12
use Http \Client \HttpClient ;
13
+ use Http \Message \Exception ;
11
14
use Psr \Http \Message \RequestInterface ;
15
+ use Psr \Http \Message \ResponseInterface ;
12
16
13
17
/**
14
18
* HTTP Adapter for Guzzle 6.
@@ -51,7 +55,7 @@ public static function createWithConfig(array $config)
51
55
*/
52
56
public function sendRequest (RequestInterface $ request )
53
57
{
54
- $ promise = $ this ->sendAsyncRequest ($ request );
58
+ $ promise = $ this ->sendAsyncRequest ($ request )-> wait () ;
55
59
56
60
return $ promise ->wait ();
57
61
}
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public function wait($unwrap = true)
97
97
$ this ->promise ->wait (false );
98
98
99
99
if ($ unwrap ) {
100
- if ($ this ->getState () == self :: REJECTED ) {
100
+ if (self :: REJECTED == $ this ->getState ()) {
101
101
return rejection_for ($ this ->exception );
102
102
}
103
103
Original file line number Diff line number Diff line change @@ -21,6 +21,6 @@ public function testNonDomainExceptionIsHandled()
21
21
22
22
$ guzzlePromise = new Promise ($ promise , $ request ->reveal ());
23
23
24
- $ guzzlePromise ->wait ();
24
+ $ guzzlePromise ->wait ()-> wait () ;
25
25
}
26
26
}
You can’t perform that action at this time.
0 commit comments