@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | public function boot() |
| 25 | 25 | { |
| 26 | 26 | $configPath = __DIR__ . '/../../config/geocoder.php'; |
| 27 | - $this->publishes([$configPath => config_path('geocoder.php')], 'config'); |
|
| 27 | + $this->publishes([ $configPath => config_path('geocoder.php') ], 'config'); |
|
| 28 | 28 | $this->mergeConfigFrom($configPath, 'geocoder'); |
| 29 | - $this->app->singleton('geocoder', function () { |
|
| 29 | + $this->app->singleton('geocoder', function() { |
|
| 30 | 30 | return (new ProviderAndDumperAggregator)->registerProviders( |
| 31 | 31 | $this->getProviders(collect(config('geocoder.providers'))) |
| 32 | 32 | ); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | private function getProviders(Collection $providers) : array |
| 45 | 45 | { |
| 46 | - $providers = $providers->map(function ($arguments, $provider) { |
|
| 46 | + $providers = $providers->map(function($arguments, $provider) { |
|
| 47 | 47 | $arguments = $this->getArguments($arguments, $provider); |
| 48 | 48 | $reflection = new ReflectionClass($provider); |
| 49 | 49 | |
@@ -99,6 +99,6 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | public function provides() : array |
| 101 | 101 | { |
| 102 | - return ['geocoder']; |
|
| 102 | + return [ 'geocoder' ]; |
|
| 103 | 103 | } |
| 104 | 104 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $dumper = new $dumperClass; |
| 71 | 71 | $results = collect($this->results->all()); |
| 72 | 72 | |
| 73 | - return $results->map(function ($result) use ($dumper) { |
|
| 73 | + return $results->map(function($result) use ($dumper) { |
|
| 74 | 74 | return $dumper->dump($result); |
| 75 | 75 | }); |
| 76 | 76 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $this->results = cache()->remember( |
| 82 | 82 | "geocoder-{$cacheKey}", |
| 83 | 83 | config('geocoder.cache-duraction', 0), |
| 84 | - function () use ($query) { |
|
| 84 | + function() use ($query) { |
|
| 85 | 85 | return collect($this->aggregator->geocodeQuery($query)); |
| 86 | 86 | } |
| 87 | 87 | ); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $this->results = cache()->remember( |
| 96 | 96 | "geocoder-{$cacheKey}", |
| 97 | 97 | config('geocoder.cache-duraction', 0), |
| 98 | - function () use ($query) { |
|
| 98 | + function() use ($query) { |
|
| 99 | 99 | return collect($this->aggregator->reverseQuery($query)); |
| 100 | 100 | } |
| 101 | 101 | ); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $this->results = cache()->remember( |
| 115 | 115 | "geocoder-{$cacheKey}", |
| 116 | 116 | config('geocoder.cache-duraction', 0), |
| 117 | - function () use ($value) { |
|
| 117 | + function() use ($value) { |
|
| 118 | 118 | return collect($this->aggregator->geocode($value)); |
| 119 | 119 | } |
| 120 | 120 | ); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $this->results = cache()->remember( |
| 129 | 129 | "geocoder-{$cacheKey}", |
| 130 | 130 | config('geocoder.cache-duraction', 0), |
| 131 | - function () use ($latitude, $longitude) { |
|
| 131 | + function() use ($latitude, $longitude) { |
|
| 132 | 132 | return collect($this->aggregator->reverse($latitude, $longitude)); |
| 133 | 133 | } |
| 134 | 134 | ); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | return $this; |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - public function registerProviders(array $providers = []) : self |
|
| 158 | + public function registerProviders(array $providers = [ ]) : self |
|
| 159 | 159 | { |
| 160 | 160 | $this->aggregator->registerProviders($providers); |
| 161 | 161 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | 'en-US', |
| 21 | 21 | env('GOOGLE_MAPS_API_KEY'), |
| 22 | 22 | ], |
| 23 | - GeoPlugin::class => [], |
|
| 23 | + GeoPlugin::class => [ ], |
|
| 24 | 24 | ], |
| 25 | 25 | BingMaps::class => [ |
| 26 | 26 | 'en-US', |