@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | class FirebaseShortener extends RemoteShortener |
| 13 | 13 | { |
| 14 | - private static $SUFFIXES = ['UNGUESSABLE', 'SHORT']; |
|
| 14 | + private static $SUFFIXES = [ 'UNGUESSABLE', 'SHORT' ]; |
|
| 15 | 15 | |
| 16 | 16 | protected $client; |
| 17 | 17 | protected $defaults; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | public function __construct(ClientInterface $client, string $token, string $domain, string $suffix) |
| 28 | 28 | { |
| 29 | 29 | if (!Arr::has(self::$SUFFIXES, Str::upper($suffix))) { |
| 30 | - $suffix = self::$SUFFIXES[0]; |
|
| 30 | + $suffix = self::$SUFFIXES[ 0 ]; |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | $this->client = $client; |
@@ -58,12 +58,12 @@ discard block |
||
| 58 | 58 | * @param array $options |
| 59 | 59 | * @return \GuzzleHttp\Promise\PromiseInterface |
| 60 | 60 | */ |
| 61 | - public function shortenAsync($url, array $options = []) |
|
| 61 | + public function shortenAsync($url, array $options = [ ]) |
|
| 62 | 62 | { |
| 63 | 63 | $options = array_merge(Arr::add($this->defaults, 'json.dynamicLinkInfo.link', $url), $options); |
| 64 | 64 | $request = new Request('POST', '/v1/shortLinks'); |
| 65 | 65 | |
| 66 | - return $this->client->sendAsync($request, $options)->then(function (ResponseInterface $response) { |
|
| 66 | + return $this->client->sendAsync($request, $options)->then(function(ResponseInterface $response) { |
|
| 67 | 67 | return json_decode($response->getBody()->getContents())->shortLink; |
| 68 | 68 | }); |
| 69 | 69 | } |