Rename result to stream

This commit is contained in:
1099511627776 2018-11-02 13:40:24 +02:00
parent 70ac87df82
commit 54e18048e3

View File

@ -65,11 +65,11 @@ class HttpRequestManager extends RequestManager implements IRequestManager
'connect_timeout' => $this->timeout 'connect_timeout' => $this->timeout
]); ]);
/** /**
* @var StreamInterface $result; * @var StreamInterface $stream;
*/ */
$result = $res->getBody(); $stream = $res->getBody();
$json = json_decode($result); $json = json_decode($stream);
$result->close(); $stream->close();
if (JSON_ERROR_NONE !== json_last_error()) { if (JSON_ERROR_NONE !== json_last_error()) {
call_user_func($callback, new InvalidArgumentException('json_decode error: ' . json_last_error_msg()), null); call_user_func($callback, new InvalidArgumentException('json_decode error: ' . json_last_error_msg()), null);