@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | // The given VIN must be in upper case... |
| 67 | 67 | $value = \strtoupper($value); |
| 68 | 68 | |
| 69 | - if (! \preg_match(self::REGEX, $value, $match)) |
|
| 69 | + if (!\preg_match(self::REGEX, $value, $match)) |
|
| 70 | 70 | { |
| 71 | 71 | throw new \InvalidArgumentException( |
| 72 | 72 | \sprintf('The value "%s" is not a valid VIN', $value) |
@@ -74,9 +74,9 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | $this->vin = $value; |
| 77 | - $this->wmi = $match['wmi']; |
|
| 78 | - $this->vds = $match['vds']; |
|
| 79 | - $this->vis = $match['vis']; |
|
| 77 | + $this->wmi = $match[ 'wmi' ]; |
|
| 78 | + $this->vds = $match[ 'vds' ]; |
|
| 79 | + $this->vis = $match[ 'vis' ]; |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | { |
| 119 | 119 | $wmi = $this->getWmi(); |
| 120 | 120 | |
| 121 | - return REGIONS[$wmi[0]]['region']; |
|
| 121 | + return REGIONS[ $wmi[ 0 ] ][ 'region' ]; |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
@@ -128,11 +128,11 @@ discard block |
||
| 128 | 128 | { |
| 129 | 129 | $wmi = $this->getWmi(); |
| 130 | 130 | |
| 131 | - $countries = REGIONS[$wmi[0]]['countries']; |
|
| 131 | + $countries = REGIONS[ $wmi[ 0 ] ][ 'countries' ]; |
|
| 132 | 132 | |
| 133 | 133 | foreach ($countries as $chars => $title) |
| 134 | 134 | { |
| 135 | - if (! (false === \strpbrk($wmi[1], $chars))) |
|
| 135 | + if (!(false === \strpbrk($wmi[ 1 ], $chars))) |
|
| 136 | 136 | { |
| 137 | 137 | return $title; |
| 138 | 138 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $long = \substr($wmi, 0, 3); |
| 152 | 152 | $short = \substr($wmi, 0, 2); |
| 153 | 153 | |
| 154 | - return MANUFACTURERS[$long] ?? MANUFACTURERS[$short] ?? null; |
|
| 154 | + return MANUFACTURERS[ $long ] ?? MANUFACTURERS[ $short ] ?? null; |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | /** |