@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | public function getIPBasedCountry() |
| 149 | 149 | { |
| 150 | 150 | $ip = $this->getClientIP(); |
| 151 | - $url = self::GEOCODE_SERVICE_URL.$ip; |
|
| 151 | + $url = self::GEOCODE_SERVICE_URL . $ip; |
|
| 152 | 152 | $result = file_get_contents($url); |
| 153 | 153 | switch ($result[ 0 ]) { |
| 154 | 154 | case '1': |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | public function shouldCollectVAT($countryCode) |
| 171 | 171 | { |
| 172 | - $taxKey = 'vat_calculator.rules.'.strtoupper($countryCode); |
|
| 172 | + $taxKey = 'vat_calculator.rules.' . strtoupper($countryCode); |
|
| 173 | 173 | return (isset($this->taxRules[ strtoupper($countryCode) ]) || (isset($this->config) && $this->config->has($taxKey))); |
| 174 | 174 | } |
| 175 | 175 | |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | if ($company && strtoupper($countryCode) !== strtoupper($this->businessCountryCode)) { |
| 269 | 269 | return 0; |
| 270 | 270 | } |
| 271 | - $taxKey = 'vat_calculator.rules.'.strtoupper($countryCode); |
|
| 271 | + $taxKey = 'vat_calculator.rules.' . strtoupper($countryCode); |
|
| 272 | 272 | if (isset($this->config) && $this->config->has($taxKey)) { |
| 273 | 273 | return $this->config->get($taxKey, 0); |
| 274 | 274 | } |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | */ |
| 294 | 294 | public function isValidVATNumber($vatNumber) |
| 295 | 295 | { |
| 296 | - $vatNumber = str_replace([' ', '-', '.', ','], '', trim($vatNumber)); |
|
| 296 | + $vatNumber = str_replace([ ' ', '-', '.', ',' ], '', trim($vatNumber)); |
|
| 297 | 297 | $countryCode = substr($vatNumber, 0, 2); |
| 298 | 298 | $vatNumber = substr($vatNumber, 2); |
| 299 | 299 | |