Completed
Push — master ( 792da3...114083 )
by Mike
56:58
created
config/geocoder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
                 env('GOOGLE_MAPS_LOCALE', 'en-US'),
45 45
                 env('GOOGLE_MAPS_API_KEY'),
46 46
             ],
47
-            GeoPlugin::class  => [],
47
+            GeoPlugin::class  => [ ],
48 48
         ],
49 49
     ],
50 50
 
Please login to merge, or discard this patch.
src/ProviderAndDumperAggregator.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,6 @@
 block discarded – undo
18 18
 use Geocoder\Laravel\Exceptions\InvalidDumperException;
19 19
 use Geocoder\ProviderAggregator;
20 20
 use Geocoder\Query\GeocodeQuery;
21
-use Geocoder\Query\Query;
22 21
 use Geocoder\Query\ReverseQuery;
23 22
 use Illuminate\Support\Collection;
24 23
 use ReflectionClass;
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $dumper = new $dumperClass;
74 74
         $results = collect($this->results->all());
75 75
 
76
-        return $results->map(function ($result) use ($dumper) {
76
+        return $results->map(function($result) use ($dumper) {
77 77
             return $dumper->dump($result);
78 78
         });
79 79
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public function geocode(string $value) : self
82 82
     {
83 83
         $cacheKey = str_slug(strtolower(urlencode($value)));
84
-        $this->results = $this->cacheRequest($cacheKey, [$value], "geocode");
84
+        $this->results = $this->cacheRequest($cacheKey, [ $value ], "geocode");
85 85
 
86 86
         return $this;
87 87
     }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     public function geocodeQuery(GeocodeQuery $query) : self
90 90
     {
91 91
         $cacheKey = serialize($query);
92
-        $this->results = $this->cacheRequest($cacheKey, [$query], "geocodeQuery");
92
+        $this->results = $this->cacheRequest($cacheKey, [ $query ], "geocodeQuery");
93 93
 
94 94
         return $this;
95 95
     }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         return $this;
134 134
     }
135 135
 
136
-    public function registerProviders(array $providers = []) : self
136
+    public function registerProviders(array $providers = [ ]) : self
137 137
     {
138 138
         $this->aggregator->registerProviders($providers);
139 139
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     public function reverse(float $latitude, float $longitude) : self
151 151
     {
152 152
         $cacheKey = str_slug(strtolower(urlencode("{$latitude}-{$longitude}")));
153
-        $this->results = $this->cacheRequest($cacheKey, [$latitude, $longitude], "reverse");
153
+        $this->results = $this->cacheRequest($cacheKey, [ $latitude, $longitude ], "reverse");
154 154
 
155 155
         return $this;
156 156
     }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     public function reverseQuery(ReverseQuery $query) : self
159 159
     {
160 160
         $cacheKey = serialize($query);
161
-        $this->results = $this->cacheRequest($cacheKey, [$query], "reverseQuery");
161
+        $this->results = $this->cacheRequest($cacheKey, [ $query ], "reverseQuery");
162 162
 
163 163
         return $this;
164 164
     }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
         $result = app("cache")
180 180
             ->store($store)
181
-            ->remember($hashedCacheKey, $duration, function () use ($cacheKey, $queryElements, $queryType) {
181
+            ->remember($hashedCacheKey, $duration, function() use ($cacheKey, $queryElements, $queryType) {
182 182
                 return [
183 183
                     "key" => $cacheKey,
184 184
                     "value" => collect($this->aggregator->{$queryType}(...$queryElements)),
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
     protected function getProvidersFromConfiguration(Collection $providers) : array
236 236
     {
237
-        $providers = $providers->map(function ($arguments, $provider) {
237
+        $providers = $providers->map(function($arguments, $provider) {
238 238
             $arguments = $this->getArguments($arguments, $provider);
239 239
             $reflection = new ReflectionClass($provider);
240 240
 
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
         array $queryElements,
256 256
         string $queryType
257 257
     ) {
258
-        if ($result["key"] === $cacheKey) {
259
-            return $result["value"];
258
+        if ($result[ "key" ] === $cacheKey) {
259
+            return $result[ "value" ];
260 260
         }
261 261
 
262 262
         app("cache")
Please login to merge, or discard this patch.
src/Providers/GeocoderService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $configPath = __DIR__ . "/../../config/geocoder.php";
23 23
         $this->publishes(
24
-            [$configPath => $this->configPath("geocoder.php")],
24
+            [ $configPath => $this->configPath("geocoder.php") ],
25 25
             "config"
26 26
         );
27 27
         $this->mergeConfigFrom($configPath, "geocoder");
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public function register()
31 31
     {
32 32
         $this->app->alias("Geocoder", Geocoder::class);
33
-        $this->app->singleton(ProviderAndDumperAggregator::class, function () {
33
+        $this->app->singleton(ProviderAndDumperAggregator::class, function() {
34 34
             return (new ProviderAndDumperAggregator)
35 35
                 ->registerProvidersFromConfig(collect(config("geocoder.providers")));
36 36
         });
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function provides() : array
41 41
     {
42
-        return ["geocoder", ProviderAndDumperAggregator::class];
42
+        return [ "geocoder", ProviderAndDumperAggregator::class ];
43 43
     }
44 44
 
45 45
     protected function configPath(string $path = "") : string
Please login to merge, or discard this patch.