@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | throw new UnsupportedOperationException('Async URL shortening is not supported'); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - return $promise->then(function ($uri) { |
|
| 52 | + return $promise->then(function($uri) { |
|
| 53 | 53 | return $this->parseUri($uri); |
| 54 | 54 | }); |
| 55 | 55 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | if (is_string($uri) || (is_object($uri) && method_exists($uri, '__toString'))) { |
| 122 | - return new Uri((string)$uri); |
|
| 122 | + return new Uri((string) $uri); |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | throw new InvalidArgumentException('URI must be a string or UriInterface'); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | if (is_array($key)) { |
| 157 | 157 | $this->options = array_merge($this->options, $key); |
| 158 | 158 | } else { |
| 159 | - $this->options[$key] = $value; |
|
| 159 | + $this->options[ $key ] = $value; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | return $this; |
@@ -169,6 +169,6 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | public function __toString() |
| 171 | 171 | { |
| 172 | - return (string)$this->get(); |
|
| 172 | + return (string) $this->get(); |
|
| 173 | 173 | } |
| 174 | 174 | } |
@@ -18,5 +18,5 @@ |
||
| 18 | 18 | * @param array $options |
| 19 | 19 | * @return \LaraCrafts\UrlShortener\Builder |
| 20 | 20 | */ |
| 21 | - public function shorten($uri, array $options = []); |
|
| 21 | + public function shorten($uri, array $options = [ ]); |
|
| 22 | 22 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | */ |
| 12 | 12 | public function getDefaultDriver() |
| 13 | 13 | { |
| 14 | - return $this->app['config']['url-shortener.default']; |
|
| 14 | + return $this->app[ 'config' ][ 'url-shortener.default' ]; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | /** |
@@ -22,6 +22,6 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | public function setDefaultDriver(string $name) |
| 24 | 24 | { |
| 25 | - $this->app['config']['session.driver'] = $name; |
|
| 25 | + $this->app[ 'config' ][ 'session.driver' ] = $name; |
|
| 26 | 26 | } |
| 27 | 27 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @param array $options |
| 17 | 17 | * @return void |
| 18 | 18 | */ |
| 19 | - public function __construct($driver, array $options = []) |
|
| 19 | + public function __construct($driver, array $options = [ ]) |
|
| 20 | 20 | { |
| 21 | 21 | $this->driver = $driver; |
| 22 | 22 | $this->options = $options; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | /** |
| 34 | 34 | * {@inheritDoc} |
| 35 | 35 | */ |
| 36 | - public function shorten($uri, array $options = []) |
|
| 36 | + public function shorten($uri, array $options = [ ]) |
|
| 37 | 37 | { |
| 38 | 38 | return new Builder($this, $uri, array_merge_recursive($this->options, $options)); |
| 39 | 39 | } |