@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $this->client = $client; |
26 | 26 | $this->defaults = [ |
27 | 27 | 'allow_redirects' => false, |
28 | - 'base_uri' => (string)$baseUri, |
|
28 | + 'base_uri' => (string) $baseUri, |
|
29 | 29 | 'query' => [ |
30 | 30 | 'format' => 'simple', |
31 | 31 | 'logstats' => intval($statistics), |
@@ -36,12 +36,12 @@ discard block |
||
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 = Arr::add(array_merge_recursive($this->defaults, $options), 'query.url', $url); |
42 | 42 | $request = new Request('GET', '/create.php'); |
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 $response->getBody()->getContents(); |
46 | 46 | }); |
47 | 47 | } |
@@ -36,12 +36,12 @@ |
||
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_recursive($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 | } |