Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
50 | public function shortenAsync($url, array $options = []) |
||
51 | { |
||
52 | $options = array_merge(Arr::add($this->defaults, 'query.url', $url), $options); |
||
53 | $request = new Request('GET', '/api/v2/action/shorten'); |
||
54 | |||
55 | return $this->client->sendAsync($request, $options)->then(function (ResponseInterface $response) { |
||
56 | return json_decode($response->getBody()->getContents())->result; |
||
57 | }); |
||
60 |