@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | protected function canHydrate($element, $enabled, $countryCode) |
65 | 65 | { |
66 | 66 | return ($enabled || $this->config->get('hydrate.elements.'.$element)) && |
67 | - ! isset($this->repository->countries[$countryCode]['hydrated'][$element]); |
|
67 | + !isset($this->repository->countries[$countryCode]['hydrated'][$element]); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | protected function createHydrated($countryCode) |
74 | 74 | { |
75 | - if (! isset($this->repository->countries[$countryCode]['hydrated'])) { |
|
75 | + if (!isset($this->repository->countries[$countryCode]['hydrated'])) { |
|
76 | 76 | $this->repository->countries[$countryCode]['hydrated'] = []; |
77 | 77 | } |
78 | 78 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | protected function fixCurrencies($country) |
83 | 83 | { |
84 | - if (! isset($country['currencies']) && isset($country['currency'])) { |
|
84 | + if (!isset($country['currencies']) && isset($country['currency'])) { |
|
85 | 85 | $country['currencies'] = $country['currency']; |
86 | 86 | } |
87 | 87 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | private function hydrateCountries($countries, $elements = null) |
99 | 99 | { |
100 | 100 | return countriesCollect( |
101 | - $countries->map(function ($country) use ($elements) { |
|
101 | + $countries->map(function($country) use ($elements) { |
|
102 | 102 | return $this->hydrateCountry($country, $elements); |
103 | 103 | }) |
104 | 104 | ); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | */ |
193 | 193 | protected function needsHydration($countryCode, $element, $enabled = false) |
194 | 194 | { |
195 | - if (! $this->canHydrate($element, $enabled, $countryCode)) { |
|
195 | + if (!$this->canHydrate($element, $enabled, $countryCode)) { |
|
196 | 196 | return false; |
197 | 197 | } |
198 | 198 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | public function hydrateBorders($country) |
306 | 306 | { |
307 | 307 | $country['borders'] = isset($country['borders']) |
308 | - ? $country['borders'] = countriesCollect($country['borders'])->map(function ($border) { |
|
308 | + ? $country['borders'] = countriesCollect($country['borders'])->map(function($border) { |
|
309 | 309 | return $this->repository->call('where', ['cca3', $border])->first(); |
310 | 310 | }) |
311 | 311 | : countriesCollect(); |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | { |
335 | 335 | $country = $this->hydrateTimezones($country); |
336 | 336 | |
337 | - $country['timezones'] = $country->timezones->map(function ($timezone) { |
|
337 | + $country['timezones'] = $country->timezones->map(function($timezone) { |
|
338 | 338 | return $timezone->overwrite(['times' => $this->repository->findTimezoneTime($timezone['zone_id'])]); |
339 | 339 | }); |
340 | 340 | |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $country = $this->fixCurrencies($country); |
355 | 355 | |
356 | 356 | if (isset($country['currencies'])) { |
357 | - $currencies = countriesCollect($country['currencies'])->mapWithKeys(function ($code, $currencyCode) use ($country) { |
|
357 | + $currencies = countriesCollect($country['currencies'])->mapWithKeys(function($code, $currencyCode) use ($country) { |
|
358 | 358 | if ($this->isCurrenciesArray($code)) { |
359 | 359 | return [ |
360 | 360 | $code['ISO4217Code'] => $code, |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | */ |
416 | 416 | public function addCountry($countryCode, $country) |
417 | 417 | { |
418 | - if (! isset($this->repository->countries[$countryCode])) { |
|
418 | + if (!isset($this->repository->countries[$countryCode])) { |
|
419 | 419 | $this->repository->countries[$countryCode] = $country; |
420 | 420 | } |
421 | 421 | } |
@@ -442,14 +442,14 @@ discard block |
||
442 | 442 | */ |
443 | 443 | protected function checkHydrationElements($elements) |
444 | 444 | { |
445 | - $elements = countriesCollect($elements)->mapWithKeys(function ($value, $key) { |
|
445 | + $elements = countriesCollect($elements)->mapWithKeys(function($value, $key) { |
|
446 | 446 | if (is_numeric($key)) { |
447 | 447 | $key = $value; |
448 | 448 | $value = true; |
449 | 449 | } |
450 | 450 | |
451 | 451 | return [$key => $value]; |
452 | - })->filter(function ($element) { |
|
452 | + })->filter(function($element) { |
|
453 | 453 | return $element; |
454 | 454 | }); |
455 | 455 |