This repository was archived by the owner on Jan 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 6
6
use GuzzleHttp \ClientInterface ;
7
7
use Http \Client \HttpAsyncClient ;
8
8
use Http \Client \HttpClient ;
9
- use Http \Client \Promise ;
10
9
use Http \Client \Tools \HttpClientEmulator ;
11
10
use Psr \Http \Message \RequestInterface ;
12
11
Original file line number Diff line number Diff line change @@ -48,25 +48,25 @@ class Guzzle6Promise implements Promise
48
48
public function __construct (PromiseInterface $ promise , RequestInterface $ request )
49
49
{
50
50
$ this ->request = $ request ;
51
- $ this ->state = self ::PENDING ;
51
+ $ this ->state = self ::PENDING ;
52
52
$ this ->promise = $ promise ->then (function ($ response ) {
53
53
$ this ->response = $ response ;
54
54
$ this ->state = self ::FULFILLED ;
55
55
56
56
return $ response ;
57
57
}, function ($ reason ) use ($ request ) {
58
58
if ($ reason instanceof HttplugException) {
59
- $ this ->state = self ::REJECTED ;
59
+ $ this ->state = self ::REJECTED ;
60
60
$ this ->exception = $ reason ;
61
61
62
62
throw $ this ->exception ;
63
63
}
64
64
65
65
if (!($ reason instanceof GuzzleExceptions \GuzzleException)) {
66
- throw new \RuntimeException (" Invalid reason " );
66
+ throw new \RuntimeException (' Invalid reason ' );
67
67
}
68
68
69
- $ this ->state = self ::REJECTED ;
69
+ $ this ->state = self ::REJECTED ;
70
70
$ this ->exception = $ this ->handleException ($ reason , $ request );
71
71
72
72
throw $ this ->exception ;
You can’t perform that action at this time.
0 commit comments