Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f647abe

Browse files
committed
cs
1 parent c830419 commit f647abe

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/Symfony/Component/HttpClient/Httplug/CorePromise.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function __construct(
116116

117117
public function wait(): void
118118
{
119-
if ($this->state !== Promise::PENDING) {
119+
if (Promise::PENDING !== $this->state) {
120120
// No need to wait if we already are resolved.
121121
return;
122122
}
@@ -131,12 +131,11 @@ public function wait(): void
131131
$this->promisePool->getPromise($response)->reject($e);
132132
}
133133

134-
if ($this->state !== Promise::PENDING) {
134+
if (Promise::PENDING !== $this->state) {
135135
// We just processed our response
136136
return;
137137
}
138138
}
139-
140139
}
141140

142141
/**

src/Symfony/Component/HttpClient/Httplug/HttplugPromise.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
namespace Symfony\Component\HttpClient\Httplug;
1313

1414
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;
2015

2116
/**
2217
* @author Tobias Nyholm <[email protected]>

src/Symfony/Component/HttpClient/Httplug/PromisePool.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function getPendingResponses(): array
3232
{
3333
$responses = [];
3434
foreach ($this->promises as $tupel) {
35-
if ($tupel[0]->getState() === Promise::PENDING) {
35+
if (Promise::PENDING === $tupel[0]->getState()) {
3636
$responses[] = $tupel[1];
3737
}
3838
}
@@ -61,6 +61,7 @@ public function remove(CorePromise $promise): void
6161
foreach ($this->promises as $i => $tupel) {
6262
if ($tupel[0] === $promise) {
6363
unset($this->promises[$i]);
64+
6465
return;
6566
}
6667
}

0 commit comments

Comments
 (0)