Skip to content

Commit

Permalink
rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Jun 22, 2022
1 parent bf870fd commit 68a2963
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Tracing/HttpClient/AbstractTraceableResponse.php
Expand Up @@ -103,13 +103,13 @@ public static function stream(HttpClientInterface $client, iterable $responses,
/** @var \SplObjectStorage<ResponseInterface, AbstractTraceableResponse> $traceableMap */
$traceableMap = new \SplObjectStorage();

foreach ($responses as $r) {
if (!$r instanceof self) {
throw new \TypeError(sprintf('"%s::stream()" expects parameter 1 to be an iterable of TraceableResponse objects, "%s" given.', TraceableHttpClient::class, get_debug_type($r)));
foreach ($responses as $response) {
if (!$response instanceof self) {
throw new \TypeError(sprintf('"%s::stream()" expects parameter 1 to be an iterable of TraceableResponse objects, "%s" given.', TraceableHttpClient::class, get_debug_type($respons)));
}

$traceableMap[$r->response] = $r;
$wrappedResponses[] = $r->response;
$traceableMap[$response->response] = $response;
$wrappedResponses[] = $response->response;
}

foreach ($client->stream($wrappedResponses, $timeout) as $r => $chunk) {
Expand Down

0 comments on commit 68a2963

Please sign in to comment.