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