diff --git a/src/Tracing/HttpClient/AbstractTraceableResponse.php b/src/Tracing/HttpClient/AbstractTraceableResponse.php index b2ad3819..0d75635c 100644 --- a/src/Tracing/HttpClient/AbstractTraceableResponse.php +++ b/src/Tracing/HttpClient/AbstractTraceableResponse.php @@ -103,13 +103,13 @@ public static function stream(HttpClientInterface $client, iterable $responses, /** @var \SplObjectStorage $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) {