|
@@ -36,12 +36,12 @@ |
|
|
block discarded – undo |
|
36
|
36
|
/** |
|
37
|
37
|
* {@inheritDoc} |
|
38
|
38
|
*/ |
|
39
|
|
- public function shortenAsync($url, array $options = []) |
|
|
39
|
+ public function shortenAsync($url, array $options = [ ]) |
|
40
|
40
|
{ |
|
41
|
41
|
$options = array_merge($this->defaults, $options); |
|
42
|
|
- $request = new Request('PUT', '/v1/data/url', [], http_build_query(['urlToShorten' => $url])); |
|
|
42
|
+ $request = new Request('PUT', '/v1/data/url', [ ], http_build_query([ 'urlToShorten' => $url ])); |
|
43
|
43
|
|
|
44
|
|
- return $this->client->sendAsync($request, $options)->then(function (ResponseInterface $response) { |
|
|
44
|
+ return $this->client->sendAsync($request, $options)->then(function(ResponseInterface $response) { |
|
45
|
45
|
return json_decode($response->getBody()->getContents())->shortenedUrl; |
|
46
|
46
|
}); |
|
47
|
47
|
} |
Please login to merge, or discard this patch.