Rename result to stream
This commit is contained in:
parent
70ac87df82
commit
54e18048e3
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user