@@ -80,7 +80,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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") |