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