Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d542bd

Browse files
Ruben Jacobsrjwebdev
Ruben Jacobs
authored andcommitted
Code cleanup
1 parent 99d6dda commit 1d542bd

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/Symfony/Component/HttpClient/Response/CurlResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ private static function parseHeaderLine($ch, string $data, array &$info, array &
287287
// Regular header line: add it to the list
288288

289289
self::addResponseHeaders([substr($data, 0, -2)], $info, $headers);
290-
if (isset($headers['content-type'], $options['buffer']) && is_string($options['buffer'])) {
290+
if (isset($headers['content-type'], $options['buffer']) && \is_string($options['buffer'])) {
291291
self::handleContentType($content, $headers['content-type'][0], $options['buffer']);
292292
}
293293

src/Symfony/Component/HttpClient/Response/NativeResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct(NativeClientState $multi, $context, string $url, $op
5252
$this->resolveRedirect = $resolveRedirect;
5353
$this->onProgress = $onProgress;
5454
$this->content = $options['buffer'] ? fopen('php://temp', 'w+') : null;
55-
$this->bufferRegex = isset($options['buffer']) && is_string($options['buffer']) ? $options['buffer'] : null;
55+
$this->bufferRegex = isset($options['buffer']) && \is_string($options['buffer']) ? $options['buffer'] : null;
5656

5757
// Temporary resources to dechunk/inflate the response stream
5858
$this->buffer = fopen('php://temp', 'w+');

src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
use Psr\Log\AbstractLogger;
1515
use Symfony\Component\HttpClient\CurlHttpClient;
16-
use Symfony\Component\HttpClient\MockHttpClient;
17-
use Symfony\Component\HttpClient\Response\MockResponse;
1816
use Symfony\Contracts\HttpClient\HttpClientInterface;
1917

2018
/**

0 commit comments

Comments
 (0)