Completed
Push — master ( 007358...147788 )
by Mike
21:19
created
src/ProviderAndDumperAggregator.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $dumper = new $dumperClass;
81 81
         $results = collect($this->results->all());
82 82
 
83
-        return $results->map(function ($result) use ($dumper) {
83
+        return $results->map(function($result) use ($dumper) {
84 84
             return $dumper->dump($result);
85 85
         });
86 86
     }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     public function geocode(string $value) : self
89 89
     {
90 90
         $cacheKey = (new Str)->slug(strtolower(urlencode($value)));
91
-        $this->results = $this->cacheRequest($cacheKey, [$value], "geocode");
91
+        $this->results = $this->cacheRequest($cacheKey, [ $value ], "geocode");
92 92
 
93 93
         return $this;
94 94
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     public function geocodeQuery(GeocodeQuery $query) : self
97 97
     {
98 98
         $cacheKey = serialize($query);
99
-        $this->results = $this->cacheRequest($cacheKey, [$query], "geocodeQuery");
99
+        $this->results = $this->cacheRequest($cacheKey, [ $query ], "geocodeQuery");
100 100
 
101 101
         return $this;
102 102
     }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         return $this;
141 141
     }
142 142
 
143
-    public function registerProviders(array $providers = []) : self
143
+    public function registerProviders(array $providers = [ ]) : self
144 144
     {
145 145
         $this->aggregator->registerProviders($providers);
146 146
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     public function reverse(float $latitude, float $longitude) : self
158 158
     {
159 159
         $cacheKey = (new Str)->slug(strtolower(urlencode("{$latitude}-{$longitude}")));
160
-        $this->results = $this->cacheRequest($cacheKey, [$latitude, $longitude], "reverse");
160
+        $this->results = $this->cacheRequest($cacheKey, [ $latitude, $longitude ], "reverse");
161 161
 
162 162
         return $this;
163 163
     }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     public function reverseQuery(ReverseQuery $query) : self
166 166
     {
167 167
         $cacheKey = serialize($query);
168
-        $this->results = $this->cacheRequest($cacheKey, [$query], "reverseQuery");
168
+        $this->results = $this->cacheRequest($cacheKey, [ $query ], "reverseQuery");
169 169
 
170 170
         return $this;
171 171
     }
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
         $result = app("cache")
187 187
             ->store($store)
188
-            ->remember($hashedCacheKey, $duration, function () use ($cacheKey, $queryElements, $queryType) {
188
+            ->remember($hashedCacheKey, $duration, function() use ($cacheKey, $queryElements, $queryType) {
189 189
                 return [
190 190
                     "key" => $cacheKey,
191 191
                     "value" => collect($this->aggregator->{$queryType}(...$queryElements)),
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
     protected function getProvidersFromConfiguration(Collection $providers) : array
245 245
     {
246
-        $providers = $providers->map(function ($arguments, $provider) {
246
+        $providers = $providers->map(function($arguments, $provider) {
247 247
             $arguments = $this->getArguments($arguments, $provider);
248 248
             $reflection = new ReflectionClass($provider);
249 249
 
@@ -264,8 +264,8 @@  discard block
 block discarded – undo
264 264
         array $queryElements,
265 265
         string $queryType
266 266
     ) {
267
-        if ($result["key"] === $cacheKey) {
268
-            return $result["value"];
267
+        if ($result[ "key" ] === $cacheKey) {
268
+            return $result[ "value" ];
269 269
         }
270 270
 
271 271
         app("cache")
Please login to merge, or discard this patch.