Skip to content

Commit bf38428

Browse files
Merge branch '6.4' into 7.2
* 6.4: - CS fixes
2 parents 628af44 + 6f2691f commit bf38428

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

DataCollector/HttpClientDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ private function escapePayload(string $payload): string
252252
{
253253
static $useProcess;
254254

255-
if ($useProcess ??= function_exists('proc_open') && class_exists(Process::class)) {
255+
if ($useProcess ??= \function_exists('proc_open') && class_exists(Process::class)) {
256256
return substr((new Process(['', $payload]))->getCommandLine(), 3);
257257
}
258258

HttpClientTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ private static function parseUrl(string $url, array $query = [], array $allowedS
652652
$tail = '';
653653

654654
if (false === $parts = parse_url(\strlen($url) !== strcspn($url, '?#') ? $url : $url.$tail = '#')) {
655-
throw new InvalidArgumentException(sprintf('Malformed URL "%s".', $url));
655+
throw new InvalidArgumentException(\sprintf('Malformed URL "%s".', $url));
656656
}
657657

658658
if ($query) {

NoPrivateNetworkHttpClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
*/
3131
final class NoPrivateNetworkHttpClient implements HttpClientInterface, LoggerAwareInterface, ResetInterface
3232
{
33-
use HttpClientTrait;
3433
use AsyncDecoratorTrait;
34+
use HttpClientTrait;
3535

3636
private array $defaultOptions = self::OPTIONS_DEFAULTS;
3737
private HttpClientInterface $client;
38-
private array|null $subnets;
38+
private ?array $subnets;
3939
private int $ipFlags;
4040
private \ArrayObject $dnsCache;
4141

@@ -209,7 +209,7 @@ private static function dnsResolve(\ArrayObject $dnsCache, string $host, int $ip
209209

210210
if ($ip = dns_get_record($host, \DNS_AAAA)) {
211211
$ip = $ip[0]['ipv6'];
212-
} elseif (extension_loaded('sockets')) {
212+
} elseif (\extension_loaded('sockets')) {
213213
if (!$info = socket_addrinfo_lookup($host, 0, ['ai_socktype' => \SOCK_STREAM, 'ai_family' => \AF_INET6])) {
214214
return $host;
215215
}

Tests/HttpClientTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ public function testPostToGetRedirect(int $status)
691691
try {
692692
$client = $this->getHttpClient(__FUNCTION__);
693693

694-
$response = $client->request('POST', 'http://localhost:8057/custom?status=' . $status . '&headers[]=Location%3A%20%2F');
694+
$response = $client->request('POST', 'http://localhost:8057/custom?status='.$status.'&headers[]=Location%3A%20%2F');
695695
$body = $response->toArray();
696696
} finally {
697697
$p->stop();

Tests/NoPrivateNetworkHttpClientTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,14 @@ public function testNonCallableOnProgressCallback()
178178
public function testHeadersArePassedOnRedirect()
179179
{
180180
$ipAddr = '104.26.14.6';
181-
$url = sprintf('http://%s/', $ipAddr);
181+
$url = \sprintf('http://%s/', $ipAddr);
182182
$content = 'foo';
183183

184184
$callback = function ($method, $url, $options) use ($content): MockResponse {
185185
$this->assertArrayHasKey('headers', $options);
186186
$this->assertNotContains('content-type: application/json', $options['headers']);
187187
$this->assertContains('foo: bar', $options['headers']);
188+
188189
return new MockResponse($content);
189190
};
190191
$responses = [

0 commit comments

Comments
 (0)