@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | * @param array $options |
| 12 | 12 | * @return string |
| 13 | 13 | */ |
| 14 | - public function shorten($url, array $options = []); |
|
| 14 | + public function shorten($url, array $options = [ ]); |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * Shorten the given URL asynchronously. |
@@ -20,5 +20,5 @@ discard block |
||
| 20 | 20 | * @param array $options |
| 21 | 21 | * @return \GuzzleHttp\Promise\PromiseInterface |
| 22 | 22 | */ |
| 23 | - public function shortenAsync($url, array $options = []); |
|
| 23 | + public function shortenAsync($url, array $options = [ ]); |
|
| 24 | 24 | } |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * @param array $options |
| 13 | 13 | * @return string |
| 14 | 14 | */ |
| 15 | - public function shortenTo($url, string $identifier, array $options = []); |
|
| 15 | + public function shortenTo($url, string $identifier, array $options = [ ]); |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * Shorten the given URL to the given identifier asynchronously. |
@@ -22,5 +22,5 @@ discard block |
||
| 22 | 22 | * @param array $options |
| 23 | 23 | * @return \GuzzleHttp\Promise\PromiseInterface |
| 24 | 24 | */ |
| 25 | - public function shortenToAsync($url, string $identifier, array $options = []); |
|
| 25 | + public function shortenToAsync($url, string $identifier, array $options = [ ]); |
|
| 26 | 26 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $this->client = $client; |
| 29 | 29 | $this->defaults = [ |
| 30 | 30 | 'allow_redirects' => false, |
| 31 | - 'base_uri' => (string)$baseUri, |
|
| 31 | + 'base_uri' => (string) $baseUri, |
|
| 32 | 32 | 'query' => [ |
| 33 | 33 | 'format' => 'simple', |
| 34 | 34 | 'logstats' => intval($statistics), |
@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | /** |
| 40 | 40 | * {@inheritDoc} |
| 41 | 41 | */ |
| 42 | - public function shortenAsync($url, array $options = []) |
|
| 42 | + public function shortenAsync($url, array $options = [ ]) |
|
| 43 | 43 | { |
| 44 | 44 | $options = Arr::add(array_merge_recursive($this->defaults, $options), 'query.url', $url); |
| 45 | 45 | $request = new Request('GET', '/create.php'); |
| 46 | 46 | |
| 47 | - return $this->client->sendAsync($request, $options)->then(function (ResponseInterface $response) { |
|
| 47 | + return $this->client->sendAsync($request, $options)->then(function(ResponseInterface $response) { |
|
| 48 | 48 | return $response->getBody()->getContents(); |
| 49 | 49 | }); |
| 50 | 50 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | /** |
| 53 | 53 | * {@inheritDoc} |
| 54 | 54 | */ |
| 55 | - public function shortenToAsync($url, string $identifier, array $options = []) |
|
| 55 | + public function shortenToAsync($url, string $identifier, array $options = [ ]) |
|
| 56 | 56 | { |
| 57 | 57 | return $this->shortenAsync($url, Arr::add($options, 'query.shorturl', $identifier)); |
| 58 | 58 | } |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * @param array $options |
| 13 | 13 | * @return string |
| 14 | 14 | */ |
| 15 | - public function shortenTo($url, string $identifier, array $options = []) |
|
| 15 | + public function shortenTo($url, string $identifier, array $options = [ ]) |
|
| 16 | 16 | { |
| 17 | 17 | return $this->shortenToAsync($url, $identifier, $options)->wait(); |
| 18 | 18 | } |
@@ -25,5 +25,5 @@ discard block |
||
| 25 | 25 | * @param array $options |
| 26 | 26 | * @return \GuzzleHttp\Promise\PromiseInterface |
| 27 | 27 | */ |
| 28 | - abstract public function shortenToAsync($url, string $identifier, array $options = []); |
|
| 28 | + abstract public function shortenToAsync($url, string $identifier, array $options = [ ]); |
|
| 29 | 29 | } |