File tree 3 files changed +4
-9
lines changed
src/Symfony/Component/HttpClient/Httplug
3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ public function __construct(
116
116
117
117
public function wait (): void
118
118
{
119
- if ($ this -> state !== Promise:: PENDING ) {
119
+ if (Promise:: PENDING !== $ this -> state ) {
120
120
// No need to wait if we already are resolved.
121
121
return ;
122
122
}
@@ -131,12 +131,11 @@ public function wait(): void
131
131
$ this ->promisePool ->getPromise ($ response )->reject ($ e );
132
132
}
133
133
134
- if ($ this -> state !== Promise:: PENDING ) {
134
+ if (Promise:: PENDING !== $ this -> state ) {
135
135
// We just processed our response
136
136
return ;
137
137
}
138
138
}
139
-
140
139
}
141
140
142
141
/**
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \HttpClient \Httplug ;
13
13
14
14
use Http \Promise \Promise ;
15
- use Psr \Http \Message \RequestInterface ;
16
- use Psr \Http \Message \ResponseFactoryInterface ;
17
- use Psr \Http \Message \StreamFactoryInterface ;
18
- use Symfony \Contracts \HttpClient \HttpClientInterface ;
19
- use Symfony \Contracts \HttpClient \ResponseInterface ;
20
15
21
16
/**
22
17
* @author Tobias Nyholm <[email protected] >
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function getPendingResponses(): array
32
32
{
33
33
$ responses = [];
34
34
foreach ($ this ->promises as $ tupel ) {
35
- if ($ tupel [0 ]->getState () === Promise:: PENDING ) {
35
+ if (Promise:: PENDING === $ tupel [0 ]->getState ()) {
36
36
$ responses [] = $ tupel [1 ];
37
37
}
38
38
}
@@ -61,6 +61,7 @@ public function remove(CorePromise $promise): void
61
61
foreach ($ this ->promises as $ i => $ tupel ) {
62
62
if ($ tupel [0 ] === $ promise ) {
63
63
unset($ this ->promises [$ i ]);
64
+
64
65
return ;
65
66
}
66
67
}
You can’t perform that action at this time.
0 commit comments