@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * |
| 29 | 29 | * @return string |
| 30 | 30 | */ |
| 31 | - public function shortenUsing(string $driver, string $url, array $options = []) |
|
| 31 | + public function shortenUsing(string $driver, string $url, array $options = [ ]) |
|
| 32 | 32 | { |
| 33 | 33 | return $this->createDriver($driver)->shorten($url, $options); |
| 34 | 34 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @return \GuzzleHttp\Promise\PromisorInterface |
| 44 | 44 | */ |
| 45 | - public function shortenAsyncUsing(string $driver, string $url, array $options = []) |
|
| 45 | + public function shortenAsyncUsing(string $driver, string $url, array $options = [ ]) |
|
| 46 | 46 | { |
| 47 | 47 | return $this->createDriver($driver)->shortenAsync($url, $options); |
| 48 | 48 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | public function getDefaultDriver() |
| 162 | 162 | { |
| 163 | - return $this->app['config']['url-shortener.default']; |
|
| 163 | + return $this->app[ 'config' ][ 'url-shortener.default' ]; |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | /** |
@@ -171,6 +171,6 @@ discard block |
||
| 171 | 171 | */ |
| 172 | 172 | protected function getDriverConfig(string $name) |
| 173 | 173 | { |
| 174 | - return $this->app['config']["url-shortener.drivers.$name"] ?: []; |
|
| 174 | + return $this->app[ 'config' ][ "url-shortener.drivers.$name" ] ?: [ ]; |
|
| 175 | 175 | } |
| 176 | 176 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $this->app->alias('url.shortener', UrlShortenerManager::class); |
| 52 | 52 | $this->app->bindIf(ClientInterface::class, Client::class); |
| 53 | 53 | |
| 54 | - $this->app->singleton('url.shortener', function ($app) { |
|
| 54 | + $this->app->singleton('url.shortener', function($app) { |
|
| 55 | 55 | return new UrlShortenerManager($app); |
| 56 | 56 | }); |
| 57 | 57 | } |
@@ -67,23 +67,23 @@ discard block |
||
| 67 | 67 | return; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - UrlGenerator::macro('shorten', function (...$parameters) { |
|
| 70 | + UrlGenerator::macro('shorten', function(...$parameters) { |
|
| 71 | 71 | return app('url.shortener')->shorten(...$parameters); |
| 72 | 72 | }); |
| 73 | 73 | |
| 74 | - UrlGenerator::macro('shortenAsync', function (...$parameters) { |
|
| 74 | + UrlGenerator::macro('shortenAsync', function(...$parameters) { |
|
| 75 | 75 | return app('url.shortener')->shortenAsync(...$parameters); |
| 76 | 76 | }); |
| 77 | 77 | |
| 78 | - UrlGenerator::macro('shortenUsing', function (string $driver, ...$parameters) { |
|
| 78 | + UrlGenerator::macro('shortenUsing', function(string $driver, ...$parameters) { |
|
| 79 | 79 | return app('url.shortener')->shortenUsing($driver, ...$parameters); |
| 80 | 80 | }); |
| 81 | 81 | |
| 82 | - UrlGenerator::macro('shortenAsyncUsing', function (string $driver, ...$parameters) { |
|
| 82 | + UrlGenerator::macro('shortenAsyncUsing', function(string $driver, ...$parameters) { |
|
| 83 | 83 | return app('url.shortener')->shortenAsyncUsing($driver, ...$parameters); |
| 84 | 84 | }); |
| 85 | 85 | |
| 86 | - UrlGenerator::macro('shortener', function () { |
|
| 86 | + UrlGenerator::macro('shortener', function() { |
|
| 87 | 87 | return app('url.shortener'); |
| 88 | 88 | }); |
| 89 | 89 | } |