Skip to content

Commit 1897eae

Browse files
keradusfabpot
authored andcommitted
chore: PHP CS Fixer fixes
1 parent 5432299 commit 1897eae

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
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
@@ -650,7 +650,7 @@ private static function parseUrl(string $url, array $query = [], array $allowedS
650650
$tail = '';
651651

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

656656
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();

0 commit comments

Comments
 (0)