From fe90558bb62bd72a7f6d85943037247bb6a0eb43 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 4 Nov 2021 09:49:31 +0100 Subject: [PATCH] Fix CS --- CurlHttpClient.php | 4 ++-- Tests/CurlHttpClientTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CurlHttpClient.php b/CurlHttpClient.php index c682854..eb09f48 100644 --- a/CurlHttpClient.php +++ b/CurlHttpClient.php @@ -90,7 +90,7 @@ public function __construct(array $defaultOptions = [], int $maxHostConnections } // HTTP/2 push crashes before curl 7.61 - if (!\defined('CURLMOPT_PUSHFUNCTION') || 0x073d00 > self::$curlVersion['version_number'] || !(\CURL_VERSION_HTTP2 & self::$curlVersion['features'])) { + if (!\defined('CURLMOPT_PUSHFUNCTION') || 0x073D00 > self::$curlVersion['version_number'] || !(\CURL_VERSION_HTTP2 & self::$curlVersion['features'])) { return; } @@ -185,7 +185,7 @@ public function request(string $method, string $url, array $options = []): Respo $this->multi->dnsCache->evictions = []; $port = parse_url($authority, \PHP_URL_PORT) ?: ('http:' === $scheme ? 80 : 443); - if ($resolve && 0x072a00 > self::$curlVersion['version_number']) { + if ($resolve && 0x072A00 > self::$curlVersion['version_number']) { // DNS cache removals require curl 7.42 or higher // On lower versions, we have to create a new multi handle curl_multi_close($this->multi->handle); diff --git a/Tests/CurlHttpClientTest.php b/Tests/CurlHttpClientTest.php index 269705a..5cbdcb7 100644 --- a/Tests/CurlHttpClientTest.php +++ b/Tests/CurlHttpClientTest.php @@ -142,7 +142,7 @@ private function getVulcainClient(): CurlHttpClient $this->markTestSkipped('PHP 7.3.0 to 7.3.3 don\'t support HTTP/2 PUSH'); } - if (!\defined('CURLMOPT_PUSHFUNCTION') || 0x073d00 > ($v = curl_version())['version_number'] || !(\CURL_VERSION_HTTP2 & $v['features'])) { + if (!\defined('CURLMOPT_PUSHFUNCTION') || 0x073D00 > ($v = curl_version())['version_number'] || !(\CURL_VERSION_HTTP2 & $v['features'])) { $this->markTestSkipped('curl <7.61 is used or it is not compiled with support for HTTP/2 PUSH'); }