@@ -115,9 +115,9 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | // Base values |
| 117 | 117 | $this->vin = $value; |
| 118 | - $this->wmi = $match['wmi']; |
|
| 119 | - $this->vds = $match['vds']; |
|
| 120 | - $this->vis = $match['vis']; |
|
| 118 | + $this->wmi = $match[ 'wmi' ]; |
|
| 119 | + $this->vds = $match[ 'vds' ]; |
|
| 120 | + $this->vis = $match[ 'vis' ]; |
|
| 121 | 121 | |
| 122 | 122 | // Parsed values |
| 123 | 123 | $this->region = $this->determineRegion(); |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | */ |
| 217 | 217 | private function determineRegion() : ?string |
| 218 | 218 | { |
| 219 | - return REGIONS[$this->wmi[0]]['region'] ?? null; |
|
| 219 | + return REGIONS[ $this->wmi[ 0 ] ][ 'region' ] ?? null; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | /** |
@@ -226,13 +226,13 @@ discard block |
||
| 226 | 226 | */ |
| 227 | 227 | private function determineCountry() : ?string |
| 228 | 228 | { |
| 229 | - $countries = REGIONS[$this->wmi[0]]['countries'] ?? null; |
|
| 229 | + $countries = REGIONS[ $this->wmi[ 0 ] ][ 'countries' ] ?? null; |
|
| 230 | 230 | if (null === $countries) { |
| 231 | 231 | return null; |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | foreach ($countries as $chars => $name) { |
| 235 | - if (!(false === strpbrk($this->wmi[1], (string) $chars))) { |
|
| 235 | + if (!(false === strpbrk($this->wmi[ 1 ], (string) $chars))) { |
|
| 236 | 236 | return $name; |
| 237 | 237 | } |
| 238 | 238 | } |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | */ |
| 248 | 248 | private function determineManufacturer() : ?string |
| 249 | 249 | { |
| 250 | - return MANUFACTURERS[$this->wmi] ?? MANUFACTURERS[$this->wmi[0] . $this->wmi[1]] ?? null; |
|
| 250 | + return MANUFACTURERS[ $this->wmi ] ?? MANUFACTURERS[ $this->wmi[ 0 ].$this->wmi[ 1 ] ] ?? null; |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | /** |
@@ -258,11 +258,11 @@ discard block |
||
| 258 | 258 | private function determineModelYear() : array |
| 259 | 259 | { |
| 260 | 260 | $comingYear = (int) date('Y') + 1; |
| 261 | - $estimatedYears = []; |
|
| 261 | + $estimatedYears = [ ]; |
|
| 262 | 262 | |
| 263 | 263 | foreach (YEARS as $year => $char) { |
| 264 | - if ($this->vis[0] === $char) { |
|
| 265 | - $estimatedYears[] = $year; |
|
| 264 | + if ($this->vis[ 0 ] === $char) { |
|
| 265 | + $estimatedYears[ ] = $year; |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | if ($comingYear === $year) { |