Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
52 | public function shortenAsync($url, array $options = []) |
||
53 | { |
||
54 | $options = array_merge_recursive(Arr::add($this->defaults, 'json.dynamicLinkInfo.link', $url), $options); |
||
55 | $request = new Request('POST', '/v1/shortLinks'); |
||
56 | |||
57 | return $this->client->sendAsync($request, $options)->then(function (ResponseInterface $response) { |
||
58 | return json_decode($response->getBody()->getContents())->shortLink; |
||
59 | }); |
||
62 |