Skip to content

Commit

Permalink
chore: fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus authored and fabpot committed Dec 7, 2024
1 parent 955e433 commit c40cbac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Response/CurlResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ private static function perform(ClientState $multi, ?array &$responses = null):
}

$multi->handlesActivity[$id][] = null;
$multi->handlesActivity[$id][] = \in_array($result, [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) || (curl_error($ch) === 'OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0' && -1.0 === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) && \in_array('close', array_map('strtolower', $responses[$id]->headers['connection']), true)) ? null : new TransportException(ucfirst(curl_error($ch) ?: curl_strerror($result)).\sprintf(' for "%s".', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)));
$multi->handlesActivity[$id][] = \in_array($result, [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || '_0' === $waitFor || curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD) === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) || ('OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0' === curl_error($ch) && -1.0 === curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD) && \in_array('close', array_map('strtolower', $responses[$id]->headers['connection']), true)) ? null : new TransportException(ucfirst(curl_error($ch) ?: curl_strerror($result)).\sprintf(' for "%s".', curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL)));
}
} finally {
$multi->performing = false;
Expand Down
1 change: 1 addition & 0 deletions Tests/CurlHttpClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

/**
* @requires extension curl
*
* @group dns-sensitive
*/
class CurlHttpClientTest extends HttpClientTestCase
Expand Down
2 changes: 2 additions & 0 deletions Tests/NoPrivateNetworkHttpClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public static function getExcludeHostData(): iterable

/**
* @dataProvider getExcludeIpData
*
* @group dns-sensitive
*/
public function testExcludeByIp(string $ipAddr, $subnets, bool $mustThrow)
Expand Down Expand Up @@ -105,6 +106,7 @@ public function testExcludeByIp(string $ipAddr, $subnets, bool $mustThrow)

/**
* @dataProvider getExcludeHostData
*
* @group dns-sensitive
*/
public function testExcludeByHost(string $ipAddr, $subnets, bool $mustThrow)
Expand Down

0 comments on commit c40cbac

Please sign in to comment.