Skip to content

Commit 456f71b

Browse files
committed
Fix CS
1 parent 9450670 commit 456f71b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

HttpClientTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ private static function jsonEncode($value, int $flags = null, int $maxDepth = 51
341341
$flags = $flags ?? (JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_PRESERVE_ZERO_FRACTION);
342342

343343
try {
344-
$value = json_encode($value, $flags | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0), $maxDepth);
344+
$value = json_encode($value, $flags | (\PHP_VERSION_ID >= 70300 ? JSON_THROW_ON_ERROR : 0), $maxDepth);
345345
} catch (\JsonException $e) {
346346
throw new InvalidArgumentException(sprintf('Invalid value for "json" option: %s.', $e->getMessage()));
347347
}

Response/CurlResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ private static function perform(CurlClientState $multi, array &$responses = null
262262
$id = (int) $ch = $info['handle'];
263263
$waitFor = @curl_getinfo($ch, CURLINFO_PRIVATE) ?: '_0';
264264

265-
if (\in_array($result, [\CURLE_SEND_ERROR, \CURLE_RECV_ERROR, /*CURLE_HTTP2*/ 16, /*CURLE_HTTP2_STREAM*/ 92], true) && $waitFor[1] && 'C' !== $waitFor[0]) {
265+
if (\in_array($result, [CURLE_SEND_ERROR, CURLE_RECV_ERROR, /*CURLE_HTTP2*/ 16, /*CURLE_HTTP2_STREAM*/ 92], true) && $waitFor[1] && 'C' !== $waitFor[0]) {
266266
curl_multi_remove_handle($multi->handle, $ch);
267267
$waitFor[1] = (string) ((int) $waitFor[1] - 1); // decrement the retry counter
268268
curl_setopt($ch, CURLOPT_PRIVATE, $waitFor);
@@ -277,7 +277,7 @@ private static function perform(CurlClientState $multi, array &$responses = null
277277
}
278278

279279
$multi->handlesActivity[$id][] = null;
280-
$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) ? null : new TransportException(sprintf('%s for "%s".', curl_strerror($result), curl_getinfo($ch, CURLINFO_EFFECTIVE_URL)));
280+
$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) ? null : new TransportException(sprintf('%s for "%s".', curl_strerror($result), curl_getinfo($ch, CURLINFO_EFFECTIVE_URL)));
281281
}
282282
} finally {
283283
self::$performing = false;

Response/ResponseTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function toArray(bool $throw = true): array
151151
}
152152

153153
try {
154-
$content = json_decode($content, true, 512, JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0));
154+
$content = json_decode($content, true, 512, JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? JSON_THROW_ON_ERROR : 0));
155155
} catch (\JsonException $e) {
156156
throw new JsonException($e->getMessage(), $e->getCode());
157157
}

0 commit comments

Comments
 (0)