@@ -12,7 +12,6 @@ |
||
12 | 12 | use Geocoder\Laravel\Facades\Geocoder; |
13 | 13 | use Geocoder\Laravel\ProviderAndDumperAggregator; |
14 | 14 | use Geocoder\Provider\Chain\Chain; |
15 | -use Illuminate\Foundation\AliasLoader; |
|
16 | 15 | use Illuminate\Support\Collection; |
17 | 16 | use Illuminate\Support\ServiceProvider; |
18 | 17 | use ReflectionClass; |
@@ -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 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $dumper = new $dumperClass; |
68 | 68 | $results = collect($this->results->all()); |
69 | 69 | |
70 | - return $results->map(function ($result) use ($dumper) { |
|
70 | + return $results->map(function($result) use ($dumper) { |
|
71 | 71 | return $dumper->dump($result); |
72 | 72 | }); |
73 | 73 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $this->results = cache()->remember( |
79 | 79 | "geocoder-{$cacheKey}", |
80 | 80 | config('geocoder.cache-duraction', 0), |
81 | - function () use ($query) { |
|
81 | + function() use ($query) { |
|
82 | 82 | $addresses = collect(); |
83 | 83 | $addressCollection = $this->aggregator->geocodeQuery($query); |
84 | 84 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $this->results = cache()->remember( |
100 | 100 | "geocoder-{$cacheKey}", |
101 | 101 | config('geocoder.cache-duraction', 0), |
102 | - function () use ($query) { |
|
102 | + function() use ($query) { |
|
103 | 103 | $addresses = collect(); |
104 | 104 | $addressCollection = $this->aggregator->reverseQuery($query); |
105 | 105 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $this->results = cache()->remember( |
126 | 126 | "geocoder-{$cacheKey}", |
127 | 127 | config('geocoder.cache-duraction', 0), |
128 | - function () use ($value) { |
|
128 | + function() use ($value) { |
|
129 | 129 | |
130 | 130 | $addresses = collect(); |
131 | 131 | $addressCollection = $this->aggregator->geocode($value); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $this->results = cache()->remember( |
148 | 148 | "geocoder-{$cacheId}", |
149 | 149 | config('geocoder.cache-duraction', 0), |
150 | - function () use ($latitude, $longitude) { |
|
150 | + function() use ($latitude, $longitude) { |
|
151 | 151 | $addresses = collect(); |
152 | 152 | $addressCollection = $this->aggregator->reverse($latitude, $longitude); |
153 | 153 | |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | return $this; |
182 | 182 | } |
183 | 183 | |
184 | - public function registerProviders(array $providers = []) : self |
|
184 | + public function registerProviders(array $providers = [ ]) : self |
|
185 | 185 | { |
186 | 186 | $this->aggregator->registerProviders($providers); |
187 | 187 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | 'en-US', |
21 | 21 | env('GOOGLE_MAPS_API_KEY'), |
22 | 22 | ], |
23 | - FreeGeoIp::class => [], |
|
23 | + FreeGeoIp::class => [ ], |
|
24 | 24 | ], |
25 | 25 | BingMaps::class => [ |
26 | 26 | 'en-US', |