Update code to use GuzzleHttp 6.x (was 3.x) that required by League client

This commit is contained in:
trogwar
2016-06-29 22:24:07 +03:00
parent d24b697274
commit b64d43ed62

View File

@@ -71,13 +71,14 @@ class Vkontakte extends AbstractProvider
} }
} catch (BadResponseException $e) { } catch (BadResponseException $e) {
// @codeCoverageIgnoreStart // @codeCoverageIgnoreStart
$response = $e->getResponse()->getBody(); $response = $e->getResponse();
// @codeCoverageIgnoreEnd // @codeCoverageIgnoreEnd
} }
$responseBody = $response->getBody()->getContents();
switch ($this->responseType) { switch ($this->responseType) {
case 'json': case 'json':
$result = json_decode($response, true); $result = json_decode($responseBody, true);
if (JSON_ERROR_NONE !== json_last_error()) { if (JSON_ERROR_NONE !== json_last_error()) {
$result = []; $result = [];
@@ -85,7 +86,7 @@ class Vkontakte extends AbstractProvider
break; break;
case 'string': case 'string':
parse_str($response, $result); parse_str($responseBody, $result);
break; break;
} }