Passed
Push — master ( 721e36...61b3e9 )
by Anatoly
09:49 queued 14s
created
data/regions.php 1 patch
Indentation   +240 added lines, -240 removed lines patch added patch discarded remove patch
@@ -20,244 +20,244 @@
 block discarded – undo
20 20
  * @link https://en.wikibooks.org/wiki/Vehicle_Identification_Numbers_(VIN_codes)/World_Manufacturer_Identifier_(WMI)#WMI_Regions
21 21
  */
22 22
 const REGIONS = [
23
-    'A' => [
24
-        'region' => 'Africa',
25
-        'countries' => [
26
-            'ABCDEFGH' => 'South Africa',
27
-            'JKLMN' => 'Ivory Coast',
28
-        ],
29
-    ],
30
-    'B' => [
31
-        'region' => 'Africa',
32
-        'countries' => [
33
-            'ABCDE' => 'Angola',
34
-            'FGHJK' => 'Kenya',
35
-            'LMNPR' => 'Tanzania',
36
-        ],
37
-    ],
38
-    'C' => [
39
-        'region' => 'Africa',
40
-        'countries' => [
41
-            'ABCDE' => 'Benin',
42
-            'FGHJK' => 'Madagascar',
43
-            'LMNPR' => 'Tunisia',
44
-        ],
45
-    ],
46
-    'D' => [
47
-        'region' => 'Africa',
48
-        'countries' => [
49
-            'ABCDE' => 'Egypt',
50
-            'FGHJK' => 'Morocco',
51
-            'LMNPR' => 'Zambia',
52
-        ],
53
-    ],
54
-    'E' => [
55
-        'region' => 'Africa',
56
-        'countries' => [
57
-            'ABCDE' => 'Ethiopia',
58
-            'FGHJK' => 'Mozambique',
59
-        ],
60
-    ],
61
-    'F' => [
62
-        'region' => 'Africa',
63
-        'countries' => [
64
-            'ABCDE' => 'Ghana',
65
-            'FGHJK' => 'Nigeria',
66
-        ],
67
-    ],
68
-    'J' => [
69
-        'region' => 'Asia',
70
-        'countries' => [
71
-            'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'Japan',
72
-        ],
73
-    ],
74
-    'K' => [
75
-        'region' => 'Asia',
76
-        'countries' => [
77
-            'ABCDE' => 'Sri Lanka',
78
-            'FGHJK' => 'Israel',
79
-            'LMNPR' => 'South Korea',
80
-            'STUVWXYZ1234567890' => 'Kazakhstan',
81
-        ],
82
-    ],
83
-    'L' => [
84
-        'region' => 'Asia',
85
-        'countries' => [
86
-            'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'China',
87
-        ],
88
-    ],
89
-    'M' => [
90
-        'region' => 'Asia',
91
-        'countries' => [
92
-            'ABCDE' => 'India',
93
-            'FGHJK' => 'Indonesia',
94
-            'LMNPR' => 'Thailand',
95
-            'STUVWXYZ1234567890' => 'Myanmar',
96
-        ],
97
-    ],
98
-    'N' => [
99
-        'region' => 'Asia',
100
-        'countries' => [
101
-            'ABCDE' => 'Iran',
102
-            'FGHJK' => 'Pakistan',
103
-            'LMNPR' => 'Turkey',
104
-        ],
105
-    ],
106
-    'P' => [
107
-        'region' => 'Asia',
108
-        'countries' => [
109
-            'ABCDE' => 'Philippines',
110
-            'FGHJK' => 'Singapore',
111
-            'LMNPR' => 'Malaysia',
112
-        ],
113
-    ],
114
-    'R' => [
115
-        'region' => 'Asia',
116
-        'countries' => [
117
-            'ABCDE' => 'United Arab Emirates',
118
-            'FGHJK' => 'Taiwan',
119
-            'LMNPR' => 'Vietnam',
120
-            'STUVWXYZ1234567890' => 'Saudi Arabia',
121
-        ],
122
-    ],
123
-    'S' => [
124
-        'region' => 'Europe',
125
-        'countries' => [
126
-            'ABCDEFGHJKLM' => 'United Kingdom',
127
-            'NPRST' => 'East Germany',
128
-            'UVWXYZ' => 'Poland',
129
-            '1234' => 'Latvia',
130
-        ],
131
-    ],
132
-    'T' => [
133
-        'region' => 'Europe',
134
-        'countries' => [
135
-            'ABCDEFGH' => 'Switzerland',
136
-            'JKLMNP' => 'Czech Republic',
137
-            'RSTUV' => 'Hungary',
138
-            'WXYZ1' => 'Portugal',
139
-        ],
140
-    ],
141
-    'U' => [
142
-        'region' => 'Europe',
143
-        'countries' => [
144
-            'HJKLM' => 'Denmark',
145
-            'NPRST' => 'Ireland',
146
-            'UVWXYZ' => 'Romania',
147
-            '567' => 'Slovakia',
148
-        ],
149
-    ],
150
-    'V' => [
151
-        'region' => 'Europe',
152
-        'countries' => [
153
-            'ABCDE' => 'Austria',
154
-            'FGHJKLMNPR' => 'France',
155
-            'STUVW' => 'Spain',
156
-            'XYZ12' => 'Serbia',
157
-            '345' => 'Croatia',
158
-            '67890' => 'Estonia',
159
-        ],
160
-    ],
161
-    'W' => [
162
-        'region' => 'Europe',
163
-        'countries' => [
164
-            'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'Germany',
165
-        ],
166
-    ],
167
-    'X' => [
168
-        'region' => 'Europe',
169
-        'countries' => [
170
-            'ABCDE' => 'Bulgaria',
171
-            'FGHJK' => 'Greece',
172
-            'LMNPR' => 'Netherlands',
173
-            'STUVW' => 'Russia (USSR)',
174
-            'XYZ12' => 'Luxembourg',
175
-            '34567890' => 'Russia',
176
-        ],
177
-    ],
178
-    'Y' => [
179
-        'region' => 'Europe',
180
-        'countries' => [
181
-            'ABCDE' => 'Belgium',
182
-            'FGHJK' => 'Finland',
183
-            'LMNPR' => 'Malta',
184
-            'STUVW' => 'Sweden',
185
-            'XYZ12' => 'Norway',
186
-            '345' => 'Belarus',
187
-            '67890' => 'Ukraine',
188
-        ],
189
-    ],
190
-    'Z' => [
191
-        'region' => 'Europe',
192
-        'countries' => [
193
-            'ABCDEFGHJKLMNPR' => 'Italy',
194
-            'XYZ12' => 'Slovenia',
195
-            '345' => 'Lithuania',
196
-        ],
197
-    ],
198
-    '1' => [
199
-        'region' => 'North America',
200
-        'countries' => [
201
-            'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'USA',
202
-        ],
203
-    ],
204
-    '2' => [
205
-        'region' => 'North America',
206
-        'countries' => [
207
-            'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'Canada',
208
-        ],
209
-    ],
210
-    '3' => [
211
-        'region' => 'North America',
212
-        'countries' => [
213
-            'ABCDEFGHJKLMNPRSTUVW' => 'Mexico',
214
-            'XYZ1234567' => 'Costa Rica',
215
-            '890' => 'Cayman Islands',
216
-        ],
217
-    ],
218
-    '4' => [
219
-        'region' => 'North America',
220
-        'countries' => [
221
-            'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'USA',
222
-        ],
223
-    ],
224
-    '5' => [
225
-        'region' => 'North America',
226
-        'countries' => [
227
-            'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'USA',
228
-        ],
229
-    ],
230
-    '6' => [
231
-        'region' => 'Oceania',
232
-        'countries' => [
233
-            'ABCDEFGHJKLMNPRSTUVW' => 'Australia',
234
-        ],
235
-    ],
236
-    '7' => [
237
-        'region' => 'Oceania',
238
-        'countries' => [
239
-            'ABCDE' => 'New Zealand',
240
-        ],
241
-    ],
242
-    '8' => [
243
-        'region' => 'South America',
244
-        'countries' => [
245
-            'ABCDE' => 'Argentina',
246
-            'FGHJK' => 'Chile',
247
-            'LMNPR' => 'Ecuador',
248
-            'STUVW' => 'Peru',
249
-            'XYZ12' => 'Venezuela',
250
-        ],
251
-    ],
252
-    '9' => [
253
-        'region' => 'South America',
254
-        'countries' => [
255
-            'ABCDE' => 'Brazil',
256
-            'FGHJK' => 'Colombia',
257
-            'LMNPR' => 'Paraguay',
258
-            'STUVW' => 'Uruguay',
259
-            'XYZ12' => 'Trinidad & Tobago',
260
-            '3456789' => 'Brazil',
261
-        ],
262
-    ],
23
+	'A' => [
24
+		'region' => 'Africa',
25
+		'countries' => [
26
+			'ABCDEFGH' => 'South Africa',
27
+			'JKLMN' => 'Ivory Coast',
28
+		],
29
+	],
30
+	'B' => [
31
+		'region' => 'Africa',
32
+		'countries' => [
33
+			'ABCDE' => 'Angola',
34
+			'FGHJK' => 'Kenya',
35
+			'LMNPR' => 'Tanzania',
36
+		],
37
+	],
38
+	'C' => [
39
+		'region' => 'Africa',
40
+		'countries' => [
41
+			'ABCDE' => 'Benin',
42
+			'FGHJK' => 'Madagascar',
43
+			'LMNPR' => 'Tunisia',
44
+		],
45
+	],
46
+	'D' => [
47
+		'region' => 'Africa',
48
+		'countries' => [
49
+			'ABCDE' => 'Egypt',
50
+			'FGHJK' => 'Morocco',
51
+			'LMNPR' => 'Zambia',
52
+		],
53
+	],
54
+	'E' => [
55
+		'region' => 'Africa',
56
+		'countries' => [
57
+			'ABCDE' => 'Ethiopia',
58
+			'FGHJK' => 'Mozambique',
59
+		],
60
+	],
61
+	'F' => [
62
+		'region' => 'Africa',
63
+		'countries' => [
64
+			'ABCDE' => 'Ghana',
65
+			'FGHJK' => 'Nigeria',
66
+		],
67
+	],
68
+	'J' => [
69
+		'region' => 'Asia',
70
+		'countries' => [
71
+			'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'Japan',
72
+		],
73
+	],
74
+	'K' => [
75
+		'region' => 'Asia',
76
+		'countries' => [
77
+			'ABCDE' => 'Sri Lanka',
78
+			'FGHJK' => 'Israel',
79
+			'LMNPR' => 'South Korea',
80
+			'STUVWXYZ1234567890' => 'Kazakhstan',
81
+		],
82
+	],
83
+	'L' => [
84
+		'region' => 'Asia',
85
+		'countries' => [
86
+			'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'China',
87
+		],
88
+	],
89
+	'M' => [
90
+		'region' => 'Asia',
91
+		'countries' => [
92
+			'ABCDE' => 'India',
93
+			'FGHJK' => 'Indonesia',
94
+			'LMNPR' => 'Thailand',
95
+			'STUVWXYZ1234567890' => 'Myanmar',
96
+		],
97
+	],
98
+	'N' => [
99
+		'region' => 'Asia',
100
+		'countries' => [
101
+			'ABCDE' => 'Iran',
102
+			'FGHJK' => 'Pakistan',
103
+			'LMNPR' => 'Turkey',
104
+		],
105
+	],
106
+	'P' => [
107
+		'region' => 'Asia',
108
+		'countries' => [
109
+			'ABCDE' => 'Philippines',
110
+			'FGHJK' => 'Singapore',
111
+			'LMNPR' => 'Malaysia',
112
+		],
113
+	],
114
+	'R' => [
115
+		'region' => 'Asia',
116
+		'countries' => [
117
+			'ABCDE' => 'United Arab Emirates',
118
+			'FGHJK' => 'Taiwan',
119
+			'LMNPR' => 'Vietnam',
120
+			'STUVWXYZ1234567890' => 'Saudi Arabia',
121
+		],
122
+	],
123
+	'S' => [
124
+		'region' => 'Europe',
125
+		'countries' => [
126
+			'ABCDEFGHJKLM' => 'United Kingdom',
127
+			'NPRST' => 'East Germany',
128
+			'UVWXYZ' => 'Poland',
129
+			'1234' => 'Latvia',
130
+		],
131
+	],
132
+	'T' => [
133
+		'region' => 'Europe',
134
+		'countries' => [
135
+			'ABCDEFGH' => 'Switzerland',
136
+			'JKLMNP' => 'Czech Republic',
137
+			'RSTUV' => 'Hungary',
138
+			'WXYZ1' => 'Portugal',
139
+		],
140
+	],
141
+	'U' => [
142
+		'region' => 'Europe',
143
+		'countries' => [
144
+			'HJKLM' => 'Denmark',
145
+			'NPRST' => 'Ireland',
146
+			'UVWXYZ' => 'Romania',
147
+			'567' => 'Slovakia',
148
+		],
149
+	],
150
+	'V' => [
151
+		'region' => 'Europe',
152
+		'countries' => [
153
+			'ABCDE' => 'Austria',
154
+			'FGHJKLMNPR' => 'France',
155
+			'STUVW' => 'Spain',
156
+			'XYZ12' => 'Serbia',
157
+			'345' => 'Croatia',
158
+			'67890' => 'Estonia',
159
+		],
160
+	],
161
+	'W' => [
162
+		'region' => 'Europe',
163
+		'countries' => [
164
+			'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'Germany',
165
+		],
166
+	],
167
+	'X' => [
168
+		'region' => 'Europe',
169
+		'countries' => [
170
+			'ABCDE' => 'Bulgaria',
171
+			'FGHJK' => 'Greece',
172
+			'LMNPR' => 'Netherlands',
173
+			'STUVW' => 'Russia (USSR)',
174
+			'XYZ12' => 'Luxembourg',
175
+			'34567890' => 'Russia',
176
+		],
177
+	],
178
+	'Y' => [
179
+		'region' => 'Europe',
180
+		'countries' => [
181
+			'ABCDE' => 'Belgium',
182
+			'FGHJK' => 'Finland',
183
+			'LMNPR' => 'Malta',
184
+			'STUVW' => 'Sweden',
185
+			'XYZ12' => 'Norway',
186
+			'345' => 'Belarus',
187
+			'67890' => 'Ukraine',
188
+		],
189
+	],
190
+	'Z' => [
191
+		'region' => 'Europe',
192
+		'countries' => [
193
+			'ABCDEFGHJKLMNPR' => 'Italy',
194
+			'XYZ12' => 'Slovenia',
195
+			'345' => 'Lithuania',
196
+		],
197
+	],
198
+	'1' => [
199
+		'region' => 'North America',
200
+		'countries' => [
201
+			'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'USA',
202
+		],
203
+	],
204
+	'2' => [
205
+		'region' => 'North America',
206
+		'countries' => [
207
+			'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'Canada',
208
+		],
209
+	],
210
+	'3' => [
211
+		'region' => 'North America',
212
+		'countries' => [
213
+			'ABCDEFGHJKLMNPRSTUVW' => 'Mexico',
214
+			'XYZ1234567' => 'Costa Rica',
215
+			'890' => 'Cayman Islands',
216
+		],
217
+	],
218
+	'4' => [
219
+		'region' => 'North America',
220
+		'countries' => [
221
+			'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'USA',
222
+		],
223
+	],
224
+	'5' => [
225
+		'region' => 'North America',
226
+		'countries' => [
227
+			'ABCDEFGHJKLMNPRSTUVWXYZ1234567890' => 'USA',
228
+		],
229
+	],
230
+	'6' => [
231
+		'region' => 'Oceania',
232
+		'countries' => [
233
+			'ABCDEFGHJKLMNPRSTUVW' => 'Australia',
234
+		],
235
+	],
236
+	'7' => [
237
+		'region' => 'Oceania',
238
+		'countries' => [
239
+			'ABCDE' => 'New Zealand',
240
+		],
241
+	],
242
+	'8' => [
243
+		'region' => 'South America',
244
+		'countries' => [
245
+			'ABCDE' => 'Argentina',
246
+			'FGHJK' => 'Chile',
247
+			'LMNPR' => 'Ecuador',
248
+			'STUVW' => 'Peru',
249
+			'XYZ12' => 'Venezuela',
250
+		],
251
+	],
252
+	'9' => [
253
+		'region' => 'South America',
254
+		'countries' => [
255
+			'ABCDE' => 'Brazil',
256
+			'FGHJK' => 'Colombia',
257
+			'LMNPR' => 'Paraguay',
258
+			'STUVW' => 'Uruguay',
259
+			'XYZ12' => 'Trinidad & Tobago',
260
+			'3456789' => 'Brazil',
261
+		],
262
+	],
263 263
 ];
Please login to merge, or discard this patch.
src/Vin.php 2 patches
Indentation   +264 added lines, -264 removed lines patch added patch discarded remove patch
@@ -39,268 +39,268 @@
 block discarded – undo
39 39
 class Vin implements VinInterface
40 40
 {
41 41
 
42
-    /**
43
-     * Regular expression for a VIN parsing/validation (ISO 3779)
44
-     *
45
-     * @var string
46
-     *
47
-     * @link https://www.iso.org/standard/52200.html
48
-     */
49
-    public const REGEX = '/^(?<wmi>[0-9A-HJ-NPR-Z]{3})(?<vds>[0-9A-HJ-NPR-Z]{6})(?<vis>[0-9A-HJ-NPR-Z]{8})$/';
50
-
51
-    /**
52
-     * The VIN value
53
-     *
54
-     * @var string
55
-     */
56
-    private $vin;
57
-
58
-    /**
59
-     * World manufacturer identifier
60
-     *
61
-     * @var string
62
-     */
63
-    private $wmi;
64
-
65
-    /**
66
-     * Vehicle descriptor section
67
-     *
68
-     * @var string
69
-     */
70
-    private $vds;
71
-
72
-    /**
73
-     * Vehicle identifier section
74
-     *
75
-     * @var string
76
-     */
77
-    private $vis;
78
-
79
-    /**
80
-     * Vehicle region
81
-     *
82
-     * @var string|null
83
-     */
84
-    private $region;
85
-
86
-    /**
87
-     * Vehicle country
88
-     *
89
-     * @var string|null
90
-     */
91
-    private $country;
92
-
93
-    /**
94
-     * Vehicle manufacturer
95
-     *
96
-     * @var string|null
97
-     */
98
-    private $manufacturer;
99
-
100
-    /**
101
-     * Vehicle model year
102
-     *
103
-     * @var list<int>
104
-     */
105
-    private $modelYear;
106
-
107
-    /**
108
-     * Constructor of the class
109
-     *
110
-     * @param string $value
111
-     *
112
-     * @throws InvalidArgumentException
113
-     *         If the given value isn't a valid VIN.
114
-     */
115
-    public function __construct(string $value)
116
-    {
117
-        // VIN must be in uppercase...
118
-        $value = strtoupper($value);
119
-
120
-        if (!preg_match(self::REGEX, $value, $match)) {
121
-            throw new InvalidArgumentException(sprintf(
122
-                'The value "%s" is not a valid VIN',
123
-                $value
124
-            ));
125
-        }
126
-
127
-        $this->vin = $value;
128
-        $this->wmi = $match['wmi'];
129
-        $this->vds = $match['vds'];
130
-        $this->vis = $match['vis'];
131
-
132
-        $this->region = $this->determineVehicleRegion();
133
-        $this->country = $this->determineVehicleCountry();
134
-        $this->manufacturer = $this->determineVehicleManufacturer();
135
-        $this->modelYear = $this->determineVehicleModelYear();
136
-    }
137
-
138
-    /**
139
-     * {@inheritdoc}
140
-     */
141
-    public function getVin() : string
142
-    {
143
-        return $this->vin;
144
-    }
145
-
146
-    /**
147
-     * {@inheritdoc}
148
-     */
149
-    public function getWmi() : string
150
-    {
151
-        return $this->wmi;
152
-    }
153
-
154
-    /**
155
-     * {@inheritdoc}
156
-     */
157
-    public function getVds() : string
158
-    {
159
-        return $this->vds;
160
-    }
161
-
162
-    /**
163
-     * {@inheritdoc}
164
-     */
165
-    public function getVis() : string
166
-    {
167
-        return $this->vis;
168
-    }
169
-
170
-    /**
171
-     * {@inheritdoc}
172
-     */
173
-    public function getRegion() : ?string
174
-    {
175
-        return $this->region;
176
-    }
177
-
178
-    /**
179
-     * {@inheritdoc}
180
-     */
181
-    public function getCountry() : ?string
182
-    {
183
-        return $this->country;
184
-    }
185
-
186
-    /**
187
-     * {@inheritdoc}
188
-     */
189
-    public function getManufacturer() : ?string
190
-    {
191
-        return $this->manufacturer;
192
-    }
193
-
194
-    /**
195
-     * {@inheritdoc}
196
-     */
197
-    public function getModelYear() : array
198
-    {
199
-        return $this->modelYear;
200
-    }
201
-
202
-    /**
203
-     * Converts the object to array
204
-     *
205
-     * @return array{
206
-     *           vin: string,
207
-     *           wmi: string,
208
-     *           vds: string,
209
-     *           vis: string,
210
-     *           region: ?string,
211
-     *           country: ?string,
212
-     *           manufacturer: ?string,
213
-     *           modelYear: list<int>,
214
-     *         }
215
-     */
216
-    public function toArray() : array
217
-    {
218
-        return [
219
-            'vin' => $this->vin,
220
-            'wmi' => $this->wmi,
221
-            'vds' => $this->vds,
222
-            'vis' => $this->vis,
223
-            'region' => $this->region,
224
-            'country' => $this->country,
225
-            'manufacturer' => $this->manufacturer,
226
-            'modelYear' => $this->modelYear,
227
-        ];
228
-    }
229
-
230
-    /**
231
-     * Converts the object to string
232
-     *
233
-     * @return string
234
-     */
235
-    public function __toString() : string
236
-    {
237
-        return $this->vin;
238
-    }
239
-
240
-    /**
241
-     * Tries to determine vehicle region
242
-     *
243
-     * @return string|null
244
-     */
245
-    private function determineVehicleRegion() : ?string
246
-    {
247
-        return REGIONS[$this->wmi[0]]['region'] ?? null;
248
-    }
249
-
250
-    /**
251
-     * Tries to determine vehicle country
252
-     *
253
-     * @return string|null
254
-     */
255
-    private function determineVehicleCountry() : ?string
256
-    {
257
-        $countries = REGIONS[$this->wmi[0]]['countries'] ?? null;
258
-        if ($countries === null) {
259
-            return null;
260
-        }
261
-
262
-        foreach ($countries as $chars => $name) {
263
-            // there are keys that consist only of numbers...
264
-            $chars = (string) $chars;
265
-
266
-            if (strpbrk($this->wmi[1], $chars) !== false) {
267
-                return $name;
268
-            }
269
-        }
270
-
271
-        return null;
272
-    }
273
-
274
-    /**
275
-     * Tries to determine vehicle manufacturer
276
-     *
277
-     * @return string|null
278
-     */
279
-    private function determineVehicleManufacturer() : ?string
280
-    {
281
-        return MANUFACTURERS[$this->wmi] ?? MANUFACTURERS[$this->wmi[0] . $this->wmi[1]] ?? null;
282
-    }
283
-
284
-    /**
285
-     * Tries to determine vehicle model year(s)
286
-     *
287
-     * @return list<int>
288
-     */
289
-    private function determineVehicleModelYear() : array
290
-    {
291
-        $comingYear = date('Y') + 1;
292
-        $estimatedYears = [];
293
-
294
-        foreach (YEARS as $year => $char) {
295
-            if ($this->vis[0] === $char) {
296
-                $estimatedYears[] = $year;
297
-            }
298
-
299
-            if ($comingYear === $year) {
300
-                break;
301
-            }
302
-        }
303
-
304
-        return $estimatedYears;
305
-    }
42
+	/**
43
+	 * Regular expression for a VIN parsing/validation (ISO 3779)
44
+	 *
45
+	 * @var string
46
+	 *
47
+	 * @link https://www.iso.org/standard/52200.html
48
+	 */
49
+	public const REGEX = '/^(?<wmi>[0-9A-HJ-NPR-Z]{3})(?<vds>[0-9A-HJ-NPR-Z]{6})(?<vis>[0-9A-HJ-NPR-Z]{8})$/';
50
+
51
+	/**
52
+	 * The VIN value
53
+	 *
54
+	 * @var string
55
+	 */
56
+	private $vin;
57
+
58
+	/**
59
+	 * World manufacturer identifier
60
+	 *
61
+	 * @var string
62
+	 */
63
+	private $wmi;
64
+
65
+	/**
66
+	 * Vehicle descriptor section
67
+	 *
68
+	 * @var string
69
+	 */
70
+	private $vds;
71
+
72
+	/**
73
+	 * Vehicle identifier section
74
+	 *
75
+	 * @var string
76
+	 */
77
+	private $vis;
78
+
79
+	/**
80
+	 * Vehicle region
81
+	 *
82
+	 * @var string|null
83
+	 */
84
+	private $region;
85
+
86
+	/**
87
+	 * Vehicle country
88
+	 *
89
+	 * @var string|null
90
+	 */
91
+	private $country;
92
+
93
+	/**
94
+	 * Vehicle manufacturer
95
+	 *
96
+	 * @var string|null
97
+	 */
98
+	private $manufacturer;
99
+
100
+	/**
101
+	 * Vehicle model year
102
+	 *
103
+	 * @var list<int>
104
+	 */
105
+	private $modelYear;
106
+
107
+	/**
108
+	 * Constructor of the class
109
+	 *
110
+	 * @param string $value
111
+	 *
112
+	 * @throws InvalidArgumentException
113
+	 *         If the given value isn't a valid VIN.
114
+	 */
115
+	public function __construct(string $value)
116
+	{
117
+		// VIN must be in uppercase...
118
+		$value = strtoupper($value);
119
+
120
+		if (!preg_match(self::REGEX, $value, $match)) {
121
+			throw new InvalidArgumentException(sprintf(
122
+				'The value "%s" is not a valid VIN',
123
+				$value
124
+			));
125
+		}
126
+
127
+		$this->vin = $value;
128
+		$this->wmi = $match['wmi'];
129
+		$this->vds = $match['vds'];
130
+		$this->vis = $match['vis'];
131
+
132
+		$this->region = $this->determineVehicleRegion();
133
+		$this->country = $this->determineVehicleCountry();
134
+		$this->manufacturer = $this->determineVehicleManufacturer();
135
+		$this->modelYear = $this->determineVehicleModelYear();
136
+	}
137
+
138
+	/**
139
+	 * {@inheritdoc}
140
+	 */
141
+	public function getVin() : string
142
+	{
143
+		return $this->vin;
144
+	}
145
+
146
+	/**
147
+	 * {@inheritdoc}
148
+	 */
149
+	public function getWmi() : string
150
+	{
151
+		return $this->wmi;
152
+	}
153
+
154
+	/**
155
+	 * {@inheritdoc}
156
+	 */
157
+	public function getVds() : string
158
+	{
159
+		return $this->vds;
160
+	}
161
+
162
+	/**
163
+	 * {@inheritdoc}
164
+	 */
165
+	public function getVis() : string
166
+	{
167
+		return $this->vis;
168
+	}
169
+
170
+	/**
171
+	 * {@inheritdoc}
172
+	 */
173
+	public function getRegion() : ?string
174
+	{
175
+		return $this->region;
176
+	}
177
+
178
+	/**
179
+	 * {@inheritdoc}
180
+	 */
181
+	public function getCountry() : ?string
182
+	{
183
+		return $this->country;
184
+	}
185
+
186
+	/**
187
+	 * {@inheritdoc}
188
+	 */
189
+	public function getManufacturer() : ?string
190
+	{
191
+		return $this->manufacturer;
192
+	}
193
+
194
+	/**
195
+	 * {@inheritdoc}
196
+	 */
197
+	public function getModelYear() : array
198
+	{
199
+		return $this->modelYear;
200
+	}
201
+
202
+	/**
203
+	 * Converts the object to array
204
+	 *
205
+	 * @return array{
206
+	 *           vin: string,
207
+	 *           wmi: string,
208
+	 *           vds: string,
209
+	 *           vis: string,
210
+	 *           region: ?string,
211
+	 *           country: ?string,
212
+	 *           manufacturer: ?string,
213
+	 *           modelYear: list<int>,
214
+	 *         }
215
+	 */
216
+	public function toArray() : array
217
+	{
218
+		return [
219
+			'vin' => $this->vin,
220
+			'wmi' => $this->wmi,
221
+			'vds' => $this->vds,
222
+			'vis' => $this->vis,
223
+			'region' => $this->region,
224
+			'country' => $this->country,
225
+			'manufacturer' => $this->manufacturer,
226
+			'modelYear' => $this->modelYear,
227
+		];
228
+	}
229
+
230
+	/**
231
+	 * Converts the object to string
232
+	 *
233
+	 * @return string
234
+	 */
235
+	public function __toString() : string
236
+	{
237
+		return $this->vin;
238
+	}
239
+
240
+	/**
241
+	 * Tries to determine vehicle region
242
+	 *
243
+	 * @return string|null
244
+	 */
245
+	private function determineVehicleRegion() : ?string
246
+	{
247
+		return REGIONS[$this->wmi[0]]['region'] ?? null;
248
+	}
249
+
250
+	/**
251
+	 * Tries to determine vehicle country
252
+	 *
253
+	 * @return string|null
254
+	 */
255
+	private function determineVehicleCountry() : ?string
256
+	{
257
+		$countries = REGIONS[$this->wmi[0]]['countries'] ?? null;
258
+		if ($countries === null) {
259
+			return null;
260
+		}
261
+
262
+		foreach ($countries as $chars => $name) {
263
+			// there are keys that consist only of numbers...
264
+			$chars = (string) $chars;
265
+
266
+			if (strpbrk($this->wmi[1], $chars) !== false) {
267
+				return $name;
268
+			}
269
+		}
270
+
271
+		return null;
272
+	}
273
+
274
+	/**
275
+	 * Tries to determine vehicle manufacturer
276
+	 *
277
+	 * @return string|null
278
+	 */
279
+	private function determineVehicleManufacturer() : ?string
280
+	{
281
+		return MANUFACTURERS[$this->wmi] ?? MANUFACTURERS[$this->wmi[0] . $this->wmi[1]] ?? null;
282
+	}
283
+
284
+	/**
285
+	 * Tries to determine vehicle model year(s)
286
+	 *
287
+	 * @return list<int>
288
+	 */
289
+	private function determineVehicleModelYear() : array
290
+	{
291
+		$comingYear = date('Y') + 1;
292
+		$estimatedYears = [];
293
+
294
+		foreach (YEARS as $year => $char) {
295
+			if ($this->vis[0] === $char) {
296
+				$estimatedYears[] = $year;
297
+			}
298
+
299
+			if ($comingYear === $year) {
300
+				break;
301
+			}
302
+		}
303
+
304
+		return $estimatedYears;
305
+	}
306 306
 }
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
         }
126 126
 
127 127
         $this->vin = $value;
128
-        $this->wmi = $match['wmi'];
129
-        $this->vds = $match['vds'];
130
-        $this->vis = $match['vis'];
128
+        $this->wmi = $match[ 'wmi' ];
129
+        $this->vds = $match[ 'vds' ];
130
+        $this->vis = $match[ 'vis' ];
131 131
 
132 132
         $this->region = $this->determineVehicleRegion();
133 133
         $this->country = $this->determineVehicleCountry();
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      */
245 245
     private function determineVehicleRegion() : ?string
246 246
     {
247
-        return REGIONS[$this->wmi[0]]['region'] ?? null;
247
+        return REGIONS[ $this->wmi[ 0 ] ][ 'region' ] ?? null;
248 248
     }
249 249
 
250 250
     /**
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
      */
255 255
     private function determineVehicleCountry() : ?string
256 256
     {
257
-        $countries = REGIONS[$this->wmi[0]]['countries'] ?? null;
257
+        $countries = REGIONS[ $this->wmi[ 0 ] ][ 'countries' ] ?? null;
258 258
         if ($countries === null) {
259 259
             return null;
260 260
         }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
             // there are keys that consist only of numbers...
264 264
             $chars = (string) $chars;
265 265
 
266
-            if (strpbrk($this->wmi[1], $chars) !== false) {
266
+            if (strpbrk($this->wmi[ 1 ], $chars) !== false) {
267 267
                 return $name;
268 268
             }
269 269
         }
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
      */
279 279
     private function determineVehicleManufacturer() : ?string
280 280
     {
281
-        return MANUFACTURERS[$this->wmi] ?? MANUFACTURERS[$this->wmi[0] . $this->wmi[1]] ?? null;
281
+        return MANUFACTURERS[ $this->wmi ] ?? MANUFACTURERS[ $this->wmi[ 0 ].$this->wmi[ 1 ] ] ?? null;
282 282
     }
283 283
 
284 284
     /**
@@ -289,11 +289,11 @@  discard block
 block discarded – undo
289 289
     private function determineVehicleModelYear() : array
290 290
     {
291 291
         $comingYear = date('Y') + 1;
292
-        $estimatedYears = [];
292
+        $estimatedYears = [ ];
293 293
 
294 294
         foreach (YEARS as $year => $char) {
295
-            if ($this->vis[0] === $char) {
296
-                $estimatedYears[] = $year;
295
+            if ($this->vis[ 0 ] === $char) {
296
+                $estimatedYears[ ] = $year;
297 297
             }
298 298
 
299 299
             if ($comingYear === $year) {
Please login to merge, or discard this patch.
src/VinInterface.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -21,59 +21,59 @@
 block discarded – undo
21 21
 interface VinInterface
22 22
 {
23 23
 
24
-    /**
25
-     * Gets the VIN
26
-     *
27
-     * @return string
28
-     */
29
-    public function getVin() : string;
24
+	/**
25
+	 * Gets the VIN
26
+	 *
27
+	 * @return string
28
+	 */
29
+	public function getVin() : string;
30 30
 
31
-    /**
32
-     * Gets WMI (World Manufacturer Identifier) from the VIN
33
-     *
34
-     * @return string
35
-     */
36
-    public function getWmi() : string;
31
+	/**
32
+	 * Gets WMI (World Manufacturer Identifier) from the VIN
33
+	 *
34
+	 * @return string
35
+	 */
36
+	public function getWmi() : string;
37 37
 
38
-    /**
39
-     * Gets VDS (Vehicle Descriptor Section) from the VIN
40
-     *
41
-     * @return string
42
-     */
43
-    public function getVds() : string;
38
+	/**
39
+	 * Gets VDS (Vehicle Descriptor Section) from the VIN
40
+	 *
41
+	 * @return string
42
+	 */
43
+	public function getVds() : string;
44 44
 
45
-    /**
46
-     * Gets VIS (Vehicle Identifier Section) from the VIN
47
-     *
48
-     * @return string
49
-     */
50
-    public function getVis() : string;
45
+	/**
46
+	 * Gets VIS (Vehicle Identifier Section) from the VIN
47
+	 *
48
+	 * @return string
49
+	 */
50
+	public function getVis() : string;
51 51
 
52
-    /**
53
-     * Gets a region from the VIN
54
-     *
55
-     * @return string|null
56
-     */
57
-    public function getRegion() : ?string;
52
+	/**
53
+	 * Gets a region from the VIN
54
+	 *
55
+	 * @return string|null
56
+	 */
57
+	public function getRegion() : ?string;
58 58
 
59
-    /**
60
-     * Gets a country from the VIN
61
-     *
62
-     * @return string|null
63
-     */
64
-    public function getCountry() : ?string;
59
+	/**
60
+	 * Gets a country from the VIN
61
+	 *
62
+	 * @return string|null
63
+	 */
64
+	public function getCountry() : ?string;
65 65
 
66
-    /**
67
-     * Gets a manufacturer from the VIN
68
-     *
69
-     * @return string|null
70
-     */
71
-    public function getManufacturer() : ?string;
66
+	/**
67
+	 * Gets a manufacturer from the VIN
68
+	 *
69
+	 * @return string|null
70
+	 */
71
+	public function getManufacturer() : ?string;
72 72
 
73
-    /**
74
-     * Gets a model year from the VIN
75
-     *
76
-     * @return list<int>
77
-     */
78
-    public function getModelYear() : array;
73
+	/**
74
+	 * Gets a model year from the VIN
75
+	 *
76
+	 * @return list<int>
77
+	 */
78
+	public function getModelYear() : array;
79 79
 }
Please login to merge, or discard this patch.
data/manufacturers.php 1 patch
Indentation   +518 added lines, -518 removed lines patch added patch discarded remove patch
@@ -20,525 +20,525 @@
 block discarded – undo
20 20
  * @link https://en.wikibooks.org/wiki/Vehicle_Identification_Numbers_(VIN_codes)/World_Manufacturer_Identifier_(WMI)#List_of_all_WMIs
21 21
  */
22 22
 const MANUFACTURERS = [
23
-    'AAV' => 'Volkswagen',
24
-    'AC5' => 'Hyundai',
25
-    'ADD' => 'Hyundai',
26
-    'AFA' => 'Ford',
27
-    'AHT' => 'Toyota',
28
-    'JA3' => 'Mitsubishi',
29
-    'JA4' => 'Mitsubishi',
30
-    'JA'  => 'Isuzu',
31
-    'JD'  => 'Daihatsu',
32
-    'JF'  => 'Fuji Heavy Industries (Subaru)',
33
-    'JH'  => 'Honda',
34
-    'JK'  => 'Kawasaki (motorcycles)',
35
-    'JL5' => 'Mitsubishi Fuso',
36
-    'JMB' => 'Mitsubishi Motors',
37
-    'JMY' => 'Mitsubishi Motors',
38
-    'JMZ' => 'Mazda',
39
-    'JN'  => 'Nissan',
40
-    'JS'  => 'Suzuki',
41
-    'JT'  => 'Toyota',
42
-    'JY'  => 'Yamaha (motorcycles)',
43
-    'KL'  => 'Daewoo General Motors',
44
-    'KM'  => 'Hyundai',
45
-    'KMY' => 'Daelim (motorcycles)',
46
-    'KM1' => 'Hyosung (motorcycles)',
47
-    'KN'  => 'Kia',
48
-    'KNM' => 'Renault Samsung',
49
-    'KPA' => 'SsangYong',
50
-    'KPT' => 'SsangYong',
51
-    'LAE' => 'Jinan Qingqi Motorcycle',
52
-    'LAN' => 'Changzhou Yamasaki Motorcycle',
53
-    'LBB' => 'Zhejiang Qianjiang Motorcycle (Keeway/Generic)',
54
-    'LBE' => 'Beijing Hyundai',
55
-    'LBM' => 'Zongshen Piaggio',
56
-    'LBP' => 'Chongqing Jainshe Yamaha (motorcycles)',
57
-    'LB2' => 'Geely Motorcycles',
58
-    'LCE' => 'Hangzhou Chunfeng Motorcycles (CFMOTO)',
59
-    'LDC' => 'Dong Feng Peugeot Citroen (DPCA)',
60
-    'LDD' => 'Dandong Huanghai Automobile',
61
-    'LDN' => 'SouEast Motor',
62
-    'LDY' => 'Zhongtong Coach',
63
-    'LET' => 'Jiangling-Isuzu Motors',
64
-    'LE4' => 'Beijing Benz',
65
-    'LFB' => 'FAW (busses)',
66
-    'LFG' => 'Taizhou Chuanl Motorcycle Manufacturing',
67
-    'LFP' => 'FAW (passenger vehicles)',
68
-    'LFT' => 'FAW (trailers)',
69
-    'LFV' => 'FAW-Volkswagen',
70
-    'LFW' => 'FAW JieFang',
71
-    'LFY' => 'Changshu Light Motorcycle Factory',
72
-    'LGB' => 'Dong Feng (DFM)',
73
-    'LGH' => 'Qoros (formerly Dong Feng (DFM))',
74
-    'LGX' => 'BYD Auto',
75
-    'LHB' => 'Beijing Automotive Industry Holding',
76
-    'LH1' => 'FAW-Haima',
77
-    'LJC' => 'JAC',
78
-    'LJ1' => 'JAC',
79
-    'LKL' => 'Suzhou King Long',
80
-    'LL6' => 'Hunan Changfeng Manufacture Joint-Stock',
81
-    'LL8' => 'Linhai (ATV)',
82
-    'LMC' => 'Suzuki Hong Kong (motorcycles)',
83
-    'LPR' => 'Yamaha Hong Kong (motorcycles)',
84
-    'LSG' => 'SAIC General Motors',
85
-    'LSJ' => 'SAIC MG',
86
-    'LSV' => 'SAIC Volkswagen',
87
-    'LSY' => 'Brilliance Zhonghua',
88
-    'LTV' => 'Toyota Tian Jin',
89
-    'LUC' => 'Guangqi Honda',
90
-    'LVS' => 'Ford Chang An',
91
-    'LVV' => 'Chery',
92
-    'LVZ' => 'Dong Feng Sokon Motor Company (DFSK)',
93
-    'LZM' => 'MAN',
94
-    'LZE' => 'Isuzu Guangzhou',
95
-    'LZG' => 'Shaanxi Automobile Group',
96
-    'LZP' => 'Zhongshan Guochi Motorcycle (Baotian)',
97
-    'LZY' => 'Yutong Zhengzhou',
98
-    'LZZ' => 'Chongqing Shuangzing Mech & Elec (Howo)',
99
-    'L4B' => 'Xingyue Group (motorcycles)',
100
-    'L5C' => 'KangDi (ATV)',
101
-    'L5K' => 'Zhejiang Yongkang Easy Vehicle',
102
-    'L5N' => 'Zhejiang Taotao (ATV & motorcycles)',
103
-    'L5Y' => 'Merato Motorcycle Taizhou Zhongneng',
104
-    'L85' => 'Zhejiang Yongkang Huabao Electric Appliance',
105
-    'L8X' => 'Zhejiang Summit Huawin Motorcycle',
106
-    'MAB' => 'Mahindra & Mahindra',
107
-    'MAC' => 'Mahindra & Mahindra',
108
-    'MAJ' => 'Ford',
109
-    'MAK' => 'Honda Siel Cars',
110
-    'MAL' => 'Hyundai',
111
-    'MAT' => 'Tata Motors',
112
-    'MA1' => 'Mahindra & Mahindra',
113
-    'MA3' => 'Suzuki (Maruti)',
114
-    'MA6' => 'GM',
115
-    'MA7' => 'Mitsubishi (formerly Honda)',
116
-    'MBH' => 'Suzuki (Maruti)',
117
-    'MBJ' => 'Toyota',
118
-    'MBR' => 'Mercedes-Benz',
119
-    'MB1' => 'Ashok Leyland',
120
-    'MCA' => 'Fiat',
121
-    'MCB' => 'GM',
122
-    'MC2' => 'Volvo Eicher commercial vehicles limited.',
123
-    'MDH' => 'Nissan',
124
-    'MD2' => 'Bajaj Auto',
125
-    'MD9' => 'Shuttle Cars',
126
-    'MEE' => 'Renault',
127
-    'MEX' => 'Volkswagen',
128
-    'MHF' => 'Toyota',
129
-    'MHR' => 'Honda',
130
-    'MLC' => 'Suzuki',
131
-    'MLH' => 'Honda',
132
-    'MMB' => 'Mitsubishi',
133
-    'MMC' => 'Mitsubishi',
134
-    'MMM' => 'Chevrolet',
135
-    'MMS' => 'Suzuki',
136
-    'MMT' => 'Mitsubishi',
137
-    'MM8' => 'Mazda',
138
-    'MNB' => 'Ford',
139
-    'MNT' => 'Nissan',
140
-    'MPA' => 'Isuzu',
141
-    'MP1' => 'Isuzu',
142
-    'MRH' => 'Honda',
143
-    'MR0' => 'Toyota',
144
-    'MS0' => 'KIA',
145
-    'MS3' => 'Suzuki Motor Co., Ltd.',
146
-    'NLA' => 'Honda',
147
-    'NLE' => 'Mercedes-Benz Truck',
148
-    'NLH' => 'Hyundai Assan',
149
-    'NLT' => 'TEMSA',
150
-    'NMB' => 'Mercedes-Benz Buses',
151
-    'NMC' => 'BMC',
152
-    'NM0' => 'Ford',
153
-    'NM4' => 'Tofaş',
154
-    'NMT' => 'Toyota',
155
-    'NNA' => 'Isuzu',
156
-    'PE1' => 'Ford',
157
-    'PE3' => 'Mazda',
158
-    'PL1' => 'Proton',
159
-    'PNA' => 'NAZA (Peugeot)',
160
-    'R1N' => 'NIU',
161
-    'RA1' => 'Steyr Trucks International FZE',
162
-    'RFB' => 'Kymco',
163
-    'RFG' => 'Sanyang SYM',
164
-    'RFL' => 'Adly',
165
-    'RFT' => 'CPI',
166
-    'RF3' => 'Aeon Motor',
167
-    'RL0' => 'Ford',
168
-    'RL1' => 'Suzuki',
169
-    'RL2' => 'Ford',
170
-    'RL3' => 'Ford',
171
-    'RL4' => 'Toyota',
172
-    'RL5' => 'Lifan',
173
-    'RL6' => 'Piaggio',
174
-    'RL8' => 'Lifan',
175
-    'RLA' => 'Mitsubishi',
176
-    'RLC' => 'Yamaha',
177
-    'RLD' => 'Isuzu',
178
-    'RLE' => 'Isuzu',
179
-    'RLF' => 'BMW',
180
-    'RLG' => 'SYM',
181
-    'RLH' => 'Honda',
182
-    'RLM' => 'Mercedes-Benz',
183
-    'RLS' => 'Suzuki',
184
-    'RP8' => 'Piaggio',
185
-    'SAD' => 'Jaguar (F-Pace)',
186
-    'SAL' => 'Land Rover',
187
-    'SAJ' => 'Jaguar',
188
-    'SAR' => 'Rover',
189
-    'SB1' => 'Toyota',
190
-    'SBM' => 'McLaren',
191
-    'SCA' => 'Rolls Royce',
192
-    'SCB' => 'Bentley',
193
-    'SCC' => 'Lotus Cars',
194
-    'SCE' => 'DeLorean Motor Cars N. Ireland',
195
-    'SCF' => 'Aston',
196
-    'SDB' => 'Peugeot (formerly Talbot)',
197
-    'SED' => 'General Motors Luton Plant',
198
-    'SEY' => 'LDV',
199
-    'SFA' => 'Ford',
200
-    'SFD' => 'Alexander Dennis',
201
-    'SHH' => 'Honda',
202
-    'SHS' => 'Honda',
203
-    'SJN' => 'Nissan',
204
-    'SKF' => 'Vauxhall',
205
-    'SLP' => 'JCB Research',
206
-    'SMT' => 'Triumph Motorcycles',
207
-    'SUF' => 'Fiat Auto',
208
-    'SUL' => 'FSC',
209
-    'SUP' => 'FSO-Daewoo',
210
-    'SUU' => 'Solaris Bus & Coach',
211
-    'SWV' => 'TA-NO',
212
-    'TCC' => 'Micro Compact Car AG (smart 1998-1999)',
213
-    'TDM' => 'QUANTYA Swiss Electric Movement',
214
-    'TK9' => 'SOR buses',
215
-    'TMA' => 'Hyundai Motor Manufacturing',
216
-    'TMB' => 'Škoda',
217
-    'TMK' => 'Karosa',
218
-    'TMP' => 'Škoda trolleybuses',
219
-    'TMT' => 'Tatra',
220
-    'TM9' => 'Škoda trolleybuses',
221
-    'TNE' => 'TAZ',
222
-    'TN9' => 'Karosa',
223
-    'TRA' => 'Ikarus Bus',
224
-    'TRU' => 'Audi',
225
-    'TSE' => 'Ikarus Egyedi Autobuszgyar',
226
-    'TSM' => 'Suzuki',
227
-    'TW1' => 'Toyota Caetano',
228
-    'TYA' => 'Mitsubishi Trucks',
229
-    'TYB' => 'Mitsubishi Trucks',
230
-    'UU1' => 'Renault Dacia',
231
-    'UU3' => 'ARO',
232
-    'UU6' => 'Daewoo',
233
-    'U5Y' => 'Kia Motors',
234
-    'U6Y' => 'Kia Motors',
235
-    'VAG' => 'Magna Steyr Puch',
236
-    'VAN' => 'MAN',
237
-    'VBK' => 'KTM (Motorcycles)',
238
-    'VF1' => 'Renault',
239
-    'VF2' => 'Renault',
240
-    'VF3' => 'Peugeot',
241
-    'VF4' => 'Talbot',
242
-    'VF6' => 'Renault (Trucks & Buses)',
243
-    'VF7' => 'Citroën',
244
-    'VF8' => 'Matra',
245
-    'VF9' => 'Bugatti',
246
-    '795' => 'Bugatti',
247
-    'VG5' => 'MBK (motorcycles)',
248
-    'VLU' => 'Scania',
249
-    'VN1' => 'SOVAB',
250
-    'VNE' => 'Irisbus',
251
-    'VNK' => 'Toyota',
252
-    'VNV' => 'Renault-Nissan',
253
-    'VSA' => 'Mercedes-Benz',
254
-    'VSE' => 'Suzuki (Santana Motors)',
255
-    'VSK' => 'Nissan',
256
-    'VSS' => 'SEAT',
257
-    'VSX' => 'Opel',
258
-    'VS6' => 'Ford',
259
-    'VS7' => 'Citroën',
260
-    'VS9' => 'Carrocerias Ayats',
261
-    'VTH' => 'Derbi (motorcycles)',
262
-    'VTL' => 'Yamaha (motorcycles)',
263
-    'VTT' => 'Suzuki (motorcycles)',
264
-    'VV9' => 'TAURO',
265
-    'VWA' => 'Nissan',
266
-    'VWV' => 'Volkswagen',
267
-    'VX1' => 'Zastava / Yugo Serbia',
268
-    'WAG' => 'Neoplan',
269
-    'WAU' => 'Audi',
270
-    'WA1' => 'Audi SUV',
271
-    'WBA' => 'BMW',
272
-    'WBS' => 'BMW M',
273
-    'WBW' => 'BMW',
274
-    'WBY' => 'BMW',
275
-    'WDA' => 'Daimler',
276
-    'WDB' => 'Mercedes-Benz',
277
-    'WDC' => 'DaimlerChrysler',
278
-    'WDD' => 'Mercedes-Benz',
279
-    'WDF' => 'Mercedes-Benz (commercial vehicles)',
280
-    'WEB' => 'Evobus GmbH (Mercedes-Bus)',
281
-    'WJM' => 'Iveco Magirus',
282
-    'WF0' => 'Ford',
283
-    'WKE' => 'Fahrzeugwerk Bernard Krone GmbH & Co. KG',
284
-    'WKK' => 'Kässbohrer/Setra',
285
-    'WMA' => 'MAN',
286
-    'WME' => 'smart',
287
-    'WMW' => 'MINI',
288
-    'WMX' => 'Mercedes-AMG',
289
-    'WP0' => 'Porsche',
290
-    'WP1' => 'Porsche SUV',
291
-    'W09' => 'RUF',
292
-    'W0L' => 'Opel',
293
-    'W0V' => 'Opel',
294
-    'WUA' => 'quattro GmbH',
295
-    'WVG' => 'Volkswagen MPV/SUV',
296
-    'WVW' => 'Volkswagen',
297
-    'WV1' => 'Volkswagen Commercial Vehicles',
298
-    'WV2' => 'Volkswagen Bus/Van',
299
-    'WV3' => 'Volkswagen Trucks',
300
-    'XLB' => 'Volvo (NedCar)',
301
-    'XLE' => 'Scania',
302
-    'XLR' => 'DAF (trucks)',
303
-    'XL9' => 'Spyker',
304
-    '363' => 'Spyker',
305
-    'XMC' => 'Mitsubishi (NedCar)',
306
-    'XTA' => 'Lada/AvtoVAZ',
307
-    'XTC' => 'KAMAZ',
308
-    'XTH' => 'GAZ',
309
-    'XTT' => 'UAZ/Sollers',
310
-    'XTY' => 'LiAZ',
311
-    'XUF' => 'General Motors',
312
-    'XUU' => 'AvtoTor (General Motors SKD)',
313
-    'XW8' => 'Volkswagen Group',
314
-    'XWB' => 'UZ-Daewoo',
315
-    'XWE' => 'AvtoTor (Hyundai-Kia SKD)',
316
-    'X1M' => 'PAZ',
317
-    'X4X' => 'AvtoTor (BMW SKD)',
318
-    'X7L' => 'Renault AvtoFramos',
319
-    'X7M' => 'Hyundai TagAZ',
320
-    'YBW' => 'Volkswagen',
321
-    'YB1' => 'Volvo Trucks',
322
-    'YCM' => 'Mazda',
323
-    'YE2' => 'Van Hool (buses)',
324
-    'YH2' => 'BRP (Lynx snowmobiles)',
325
-    'YK1' => 'Saab-Valmet',
326
-    'YS2' => 'Scania AB',
327
-    'YS3' => 'Saab',
328
-    'YS4' => 'Scania Bus',
329
-    'YTN' => 'Saab NEVS',
330
-    'YT9' => 'Koenigsegg',
331
-    '007' => 'Koenigsegg',
332
-    '034' => 'Carvia',
333
-    'YU7' => 'Husaberg (motorcycles)',
334
-    'YV1' => 'Volvo Cars',
335
-    'YV4' => 'Volvo Cars',
336
-    'YV2' => 'Volvo Trucks',
337
-    'YV3' => 'Volvo Buses',
338
-    'Y3M' => 'MAZ',
339
-    'Y6D' => 'Zaporozhets/AvtoZAZ',
340
-    'ZAA' => 'Autobianchi',
341
-    'ZAM' => 'Maserati',
342
-    'ZAP' => 'Piaggio/Vespa/Gilera',
343
-    'ZAR' => 'Alfa Romeo',
344
-    'ZBN' => 'Benelli',
345
-    'ZCG' => 'Cagiva SpA / MV Agusta',
346
-    'ZCF' => 'Iveco',
347
-    'ZDM' => 'Ducati Motor Holdings SpA',
348
-    'ZDF' => 'Ferrari Dino',
349
-    'ZD0' => 'Yamaha',
350
-    'ZD3' => 'Beta Motor',
351
-    'ZD4' => 'Aprilia',
352
-    'ZFA' => 'Fiat',
353
-    'ZFC' => 'Fiat V.I.',
354
-    'ZFF' => 'Ferrari',
355
-    'ZGU' => 'Moto Guzzi',
356
-    'ZHW' => 'Lamborghini',
357
-    'ZJM' => 'Malaguti',
358
-    'ZJN' => 'Innocenti',
359
-    'ZKH' => 'Husqvarna Motorcycles',
360
-    'ZLA' => 'Lancia',
361
-    'ZOM' => 'OM',
362
-    'Z8M' => 'Marussia',
363
-    '1B3' => 'Dodge',
364
-    '1C3' => 'Chrysler',
365
-    '1C4' => 'Chrysler',
366
-    '1C6' => 'Chrysler',
367
-    '1D3' => 'Dodge',
368
-    '1FA' => 'Ford Motor Company',
369
-    '1FB' => 'Ford Motor Company',
370
-    '1FC' => 'Ford Motor Company',
371
-    '1FD' => 'Ford Motor Company',
372
-    '1FM' => 'Ford Motor Company',
373
-    '1FT' => 'Ford Motor Company',
374
-    '1FU' => 'Freightliner',
375
-    '1FV' => 'Freightliner',
376
-    '1F9' => 'FWD Corp.',
377
-    '1G'  => 'General Motors',
378
-    '1GC' => 'Chevrolet Truck',
379
-    '1GT' => 'GMC Truck',
380
-    '1G1' => 'Chevrolet',
381
-    '1G2' => 'Pontiac',
382
-    '1G3' => 'Oldsmobile',
383
-    '1G4' => 'Buick',
384
-    '1G6' => 'Cadillac',
385
-    '1G8' => 'Saturn',
386
-    '1GM' => 'Pontiac',
387
-    '1GY' => 'Cadillac',
388
-    '1H'  => 'Honda',
389
-    '1HD' => 'Harley-Davidson',
390
-    '1J4' => 'Jeep',
391
-    '1J8' => 'Jeep',
392
-    '1L'  => 'Lincoln',
393
-    '1ME' => 'Mercury',
394
-    '1M1' => 'Mack Truck',
395
-    '1M2' => 'Mack Truck',
396
-    '1M3' => 'Mack Truck',
397
-    '1M4' => 'Mack Truck',
398
-    '1M9' => 'Mynatt Truck & Equipment',
399
-    '1N'  => 'Nissan',
400
-    '1NX' => 'NUMMI',
401
-    '1P3' => 'Plymouth',
402
-    '1R9' => 'Roadrunner Hay Squeeze',
403
-    '1VW' => 'Volkswagen',
404
-    '1XK' => 'Kenworth',
405
-    '1XP' => 'Peterbilt',
406
-    '1YV' => 'Mazda (AutoAlliance International)',
407
-    '1ZV' => 'Ford (AutoAlliance International)',
408
-    '2A4' => 'Chrysler',
409
-    '2BP' => 'Bombardier Recreational Products',
410
-    '2B3' => 'Dodge',
411
-    '2B7' => 'Dodge',
412
-    '2C3' => 'Chrysler',
413
-    '2CN' => 'CAMI',
414
-    '2D3' => 'Dodge',
415
-    '2FA' => 'Ford Motor Company',
416
-    '2FB' => 'Ford Motor Company',
417
-    '2FC' => 'Ford Motor Company',
418
-    '2FM' => 'Ford Motor Company',
419
-    '2FT' => 'Ford Motor Company',
420
-    '2FU' => 'Freightliner',
421
-    '2FV' => 'Freightliner',
422
-    '2FZ' => 'Sterling',
423
-    '2Gx' => 'General Motors',
424
-    '2G1' => 'Chevrolet',
425
-    '2G2' => 'Pontiac',
426
-    '2G3' => 'Oldsmobile',
427
-    '2G4' => 'Buick',
428
-    '2G9' => 'Gnome Homes',
429
-    '2HG' => 'Honda',
430
-    '2HK' => 'Honda',
431
-    '2HJ' => 'Honda',
432
-    '2HM' => 'Hyundai',
433
-    '2M'  => 'Mercury',
434
-    '2NV' => 'Nova Bus',
435
-    '2P3' => 'Plymouth',
436
-    '2T'  => 'Toyota',
437
-    '2TP' => 'Triple E LTD',
438
-    '2V4' => 'Volkswagen',
439
-    '2V8' => 'Volkswagen',
440
-    '2WK' => 'Western Star',
441
-    '2WL' => 'Western Star',
442
-    '2WM' => 'Western Star',
443
-    '3C4' => 'Chrysler',
444
-    '3D3' => 'Dodge',
445
-    '3D4' => 'Dodge',
446
-    '3FA' => 'Ford Motor Company',
447
-    '3FE' => 'Ford Motor Company',
448
-    '3G'  => 'General Motors',
449
-    '3H'  => 'Honda',
450
-    '3JB' => 'BRP (all-terrain vehicles)',
451
-    '3MD' => 'Mazda',
452
-    '3MZ' => 'Mazda',
453
-    '3N'  => 'Nissan',
454
-    '3P3' => 'Plymouth',
455
-    '3VW' => 'Volkswagen',
456
-    '4F'  => 'Mazda',
457
-    '4JG' => 'Mercedes-Benz',
458
-    '4M'  => 'Mercury',
459
-    '4RK' => 'Nova Bus',
460
-    '4S'  => 'Subaru-Isuzu Automotive',
461
-    '4T'  => 'Toyota',
462
-    '4T9' => 'Lumen Motors',
463
-    '4UF' => 'Arctic Cat Inc.',
464
-    '4US' => 'BMW',
465
-    '4UZ' => 'Frt-Thomas Bus',
466
-    '4V1' => 'Volvo',
467
-    '4V2' => 'Volvo',
468
-    '4V3' => 'Volvo',
469
-    '4V4' => 'Volvo',
470
-    '4V5' => 'Volvo',
471
-    '4V6' => 'Volvo',
472
-    '4VL' => 'Volvo',
473
-    '4VM' => 'Volvo',
474
-    '4VZ' => 'Volvo',
475
-    '538' => 'Zero Motorcycles',
476
-    '5F'  => 'Honda Alabama',
477
-    '5J'  => 'Honda Ohio',
478
-    '5L'  => 'Lincoln',
479
-    '5N1' => 'Nissan',
480
-    '5NP' => 'Hyundai',
481
-    '5T'  => 'Toyota - trucks',
482
-    '5YJ' => 'Tesla, Inc.',
483
-    '6AB' => 'MAN',
484
-    '6F4' => 'Nissan Motor Company',
485
-    '6F5' => 'Kenworth',
486
-    '6FP' => 'Ford Motor Company',
487
-    '6G1' => 'General Motors-Holden (post Nov 2002)',
488
-    '6G2' => 'Pontiac (GTO & G8)',
489
-    '6H8' => 'General Motors-Holden (pre Nov 2002)',
490
-    '6MM' => 'Mitsubishi Motors',
491
-    '6T1' => 'Toyota Motor Corporation',
492
-    '6U9' => 'Privately Imported car',
493
-    '8AD' => 'Peugeot',
494
-    '8AF' => 'Ford Motor Company',
495
-    '8AG' => 'Chevrolet',
496
-    '8AJ' => 'Toyota',
497
-    '8AK' => 'Suzuki',
498
-    '8AP' => 'Fiat',
499
-    '8AW' => 'Volkswagen',
500
-    '8A1' => 'Renault',
501
-    '8GD' => 'Peugeot',
502
-    '8GG' => 'Chevrolet',
503
-    '935' => 'Citroën',
504
-    '936' => 'Peugeot',
505
-    '93H' => 'Honda',
506
-    '93R' => 'Toyota',
507
-    '93U' => 'Audi',
508
-    '93V' => 'Audi',
509
-    '93X' => 'Mitsubishi Motors',
510
-    '93Y' => 'Renault',
511
-    '94D' => 'Nissan',
512
-    '9BD' => 'Fiat',
513
-    '9BF' => 'Ford Motor Company',
514
-    '9BG' => 'Chevrolet',
515
-    '9BM' => 'Mercedes-Benz',
516
-    '9BR' => 'Toyota',
517
-    '9BS' => 'Scania',
518
-    '9BW' => 'Volkswagen',
519
-    '9FB' => 'Renault',
520
-    'WB1' => 'BMW Motorrad of North America',
23
+	'AAV' => 'Volkswagen',
24
+	'AC5' => 'Hyundai',
25
+	'ADD' => 'Hyundai',
26
+	'AFA' => 'Ford',
27
+	'AHT' => 'Toyota',
28
+	'JA3' => 'Mitsubishi',
29
+	'JA4' => 'Mitsubishi',
30
+	'JA'  => 'Isuzu',
31
+	'JD'  => 'Daihatsu',
32
+	'JF'  => 'Fuji Heavy Industries (Subaru)',
33
+	'JH'  => 'Honda',
34
+	'JK'  => 'Kawasaki (motorcycles)',
35
+	'JL5' => 'Mitsubishi Fuso',
36
+	'JMB' => 'Mitsubishi Motors',
37
+	'JMY' => 'Mitsubishi Motors',
38
+	'JMZ' => 'Mazda',
39
+	'JN'  => 'Nissan',
40
+	'JS'  => 'Suzuki',
41
+	'JT'  => 'Toyota',
42
+	'JY'  => 'Yamaha (motorcycles)',
43
+	'KL'  => 'Daewoo General Motors',
44
+	'KM'  => 'Hyundai',
45
+	'KMY' => 'Daelim (motorcycles)',
46
+	'KM1' => 'Hyosung (motorcycles)',
47
+	'KN'  => 'Kia',
48
+	'KNM' => 'Renault Samsung',
49
+	'KPA' => 'SsangYong',
50
+	'KPT' => 'SsangYong',
51
+	'LAE' => 'Jinan Qingqi Motorcycle',
52
+	'LAN' => 'Changzhou Yamasaki Motorcycle',
53
+	'LBB' => 'Zhejiang Qianjiang Motorcycle (Keeway/Generic)',
54
+	'LBE' => 'Beijing Hyundai',
55
+	'LBM' => 'Zongshen Piaggio',
56
+	'LBP' => 'Chongqing Jainshe Yamaha (motorcycles)',
57
+	'LB2' => 'Geely Motorcycles',
58
+	'LCE' => 'Hangzhou Chunfeng Motorcycles (CFMOTO)',
59
+	'LDC' => 'Dong Feng Peugeot Citroen (DPCA)',
60
+	'LDD' => 'Dandong Huanghai Automobile',
61
+	'LDN' => 'SouEast Motor',
62
+	'LDY' => 'Zhongtong Coach',
63
+	'LET' => 'Jiangling-Isuzu Motors',
64
+	'LE4' => 'Beijing Benz',
65
+	'LFB' => 'FAW (busses)',
66
+	'LFG' => 'Taizhou Chuanl Motorcycle Manufacturing',
67
+	'LFP' => 'FAW (passenger vehicles)',
68
+	'LFT' => 'FAW (trailers)',
69
+	'LFV' => 'FAW-Volkswagen',
70
+	'LFW' => 'FAW JieFang',
71
+	'LFY' => 'Changshu Light Motorcycle Factory',
72
+	'LGB' => 'Dong Feng (DFM)',
73
+	'LGH' => 'Qoros (formerly Dong Feng (DFM))',
74
+	'LGX' => 'BYD Auto',
75
+	'LHB' => 'Beijing Automotive Industry Holding',
76
+	'LH1' => 'FAW-Haima',
77
+	'LJC' => 'JAC',
78
+	'LJ1' => 'JAC',
79
+	'LKL' => 'Suzhou King Long',
80
+	'LL6' => 'Hunan Changfeng Manufacture Joint-Stock',
81
+	'LL8' => 'Linhai (ATV)',
82
+	'LMC' => 'Suzuki Hong Kong (motorcycles)',
83
+	'LPR' => 'Yamaha Hong Kong (motorcycles)',
84
+	'LSG' => 'SAIC General Motors',
85
+	'LSJ' => 'SAIC MG',
86
+	'LSV' => 'SAIC Volkswagen',
87
+	'LSY' => 'Brilliance Zhonghua',
88
+	'LTV' => 'Toyota Tian Jin',
89
+	'LUC' => 'Guangqi Honda',
90
+	'LVS' => 'Ford Chang An',
91
+	'LVV' => 'Chery',
92
+	'LVZ' => 'Dong Feng Sokon Motor Company (DFSK)',
93
+	'LZM' => 'MAN',
94
+	'LZE' => 'Isuzu Guangzhou',
95
+	'LZG' => 'Shaanxi Automobile Group',
96
+	'LZP' => 'Zhongshan Guochi Motorcycle (Baotian)',
97
+	'LZY' => 'Yutong Zhengzhou',
98
+	'LZZ' => 'Chongqing Shuangzing Mech & Elec (Howo)',
99
+	'L4B' => 'Xingyue Group (motorcycles)',
100
+	'L5C' => 'KangDi (ATV)',
101
+	'L5K' => 'Zhejiang Yongkang Easy Vehicle',
102
+	'L5N' => 'Zhejiang Taotao (ATV & motorcycles)',
103
+	'L5Y' => 'Merato Motorcycle Taizhou Zhongneng',
104
+	'L85' => 'Zhejiang Yongkang Huabao Electric Appliance',
105
+	'L8X' => 'Zhejiang Summit Huawin Motorcycle',
106
+	'MAB' => 'Mahindra & Mahindra',
107
+	'MAC' => 'Mahindra & Mahindra',
108
+	'MAJ' => 'Ford',
109
+	'MAK' => 'Honda Siel Cars',
110
+	'MAL' => 'Hyundai',
111
+	'MAT' => 'Tata Motors',
112
+	'MA1' => 'Mahindra & Mahindra',
113
+	'MA3' => 'Suzuki (Maruti)',
114
+	'MA6' => 'GM',
115
+	'MA7' => 'Mitsubishi (formerly Honda)',
116
+	'MBH' => 'Suzuki (Maruti)',
117
+	'MBJ' => 'Toyota',
118
+	'MBR' => 'Mercedes-Benz',
119
+	'MB1' => 'Ashok Leyland',
120
+	'MCA' => 'Fiat',
121
+	'MCB' => 'GM',
122
+	'MC2' => 'Volvo Eicher commercial vehicles limited.',
123
+	'MDH' => 'Nissan',
124
+	'MD2' => 'Bajaj Auto',
125
+	'MD9' => 'Shuttle Cars',
126
+	'MEE' => 'Renault',
127
+	'MEX' => 'Volkswagen',
128
+	'MHF' => 'Toyota',
129
+	'MHR' => 'Honda',
130
+	'MLC' => 'Suzuki',
131
+	'MLH' => 'Honda',
132
+	'MMB' => 'Mitsubishi',
133
+	'MMC' => 'Mitsubishi',
134
+	'MMM' => 'Chevrolet',
135
+	'MMS' => 'Suzuki',
136
+	'MMT' => 'Mitsubishi',
137
+	'MM8' => 'Mazda',
138
+	'MNB' => 'Ford',
139
+	'MNT' => 'Nissan',
140
+	'MPA' => 'Isuzu',
141
+	'MP1' => 'Isuzu',
142
+	'MRH' => 'Honda',
143
+	'MR0' => 'Toyota',
144
+	'MS0' => 'KIA',
145
+	'MS3' => 'Suzuki Motor Co., Ltd.',
146
+	'NLA' => 'Honda',
147
+	'NLE' => 'Mercedes-Benz Truck',
148
+	'NLH' => 'Hyundai Assan',
149
+	'NLT' => 'TEMSA',
150
+	'NMB' => 'Mercedes-Benz Buses',
151
+	'NMC' => 'BMC',
152
+	'NM0' => 'Ford',
153
+	'NM4' => 'Tofaş',
154
+	'NMT' => 'Toyota',
155
+	'NNA' => 'Isuzu',
156
+	'PE1' => 'Ford',
157
+	'PE3' => 'Mazda',
158
+	'PL1' => 'Proton',
159
+	'PNA' => 'NAZA (Peugeot)',
160
+	'R1N' => 'NIU',
161
+	'RA1' => 'Steyr Trucks International FZE',
162
+	'RFB' => 'Kymco',
163
+	'RFG' => 'Sanyang SYM',
164
+	'RFL' => 'Adly',
165
+	'RFT' => 'CPI',
166
+	'RF3' => 'Aeon Motor',
167
+	'RL0' => 'Ford',
168
+	'RL1' => 'Suzuki',
169
+	'RL2' => 'Ford',
170
+	'RL3' => 'Ford',
171
+	'RL4' => 'Toyota',
172
+	'RL5' => 'Lifan',
173
+	'RL6' => 'Piaggio',
174
+	'RL8' => 'Lifan',
175
+	'RLA' => 'Mitsubishi',
176
+	'RLC' => 'Yamaha',
177
+	'RLD' => 'Isuzu',
178
+	'RLE' => 'Isuzu',
179
+	'RLF' => 'BMW',
180
+	'RLG' => 'SYM',
181
+	'RLH' => 'Honda',
182
+	'RLM' => 'Mercedes-Benz',
183
+	'RLS' => 'Suzuki',
184
+	'RP8' => 'Piaggio',
185
+	'SAD' => 'Jaguar (F-Pace)',
186
+	'SAL' => 'Land Rover',
187
+	'SAJ' => 'Jaguar',
188
+	'SAR' => 'Rover',
189
+	'SB1' => 'Toyota',
190
+	'SBM' => 'McLaren',
191
+	'SCA' => 'Rolls Royce',
192
+	'SCB' => 'Bentley',
193
+	'SCC' => 'Lotus Cars',
194
+	'SCE' => 'DeLorean Motor Cars N. Ireland',
195
+	'SCF' => 'Aston',
196
+	'SDB' => 'Peugeot (formerly Talbot)',
197
+	'SED' => 'General Motors Luton Plant',
198
+	'SEY' => 'LDV',
199
+	'SFA' => 'Ford',
200
+	'SFD' => 'Alexander Dennis',
201
+	'SHH' => 'Honda',
202
+	'SHS' => 'Honda',
203
+	'SJN' => 'Nissan',
204
+	'SKF' => 'Vauxhall',
205
+	'SLP' => 'JCB Research',
206
+	'SMT' => 'Triumph Motorcycles',
207
+	'SUF' => 'Fiat Auto',
208
+	'SUL' => 'FSC',
209
+	'SUP' => 'FSO-Daewoo',
210
+	'SUU' => 'Solaris Bus & Coach',
211
+	'SWV' => 'TA-NO',
212
+	'TCC' => 'Micro Compact Car AG (smart 1998-1999)',
213
+	'TDM' => 'QUANTYA Swiss Electric Movement',
214
+	'TK9' => 'SOR buses',
215
+	'TMA' => 'Hyundai Motor Manufacturing',
216
+	'TMB' => 'Škoda',
217
+	'TMK' => 'Karosa',
218
+	'TMP' => 'Škoda trolleybuses',
219
+	'TMT' => 'Tatra',
220
+	'TM9' => 'Škoda trolleybuses',
221
+	'TNE' => 'TAZ',
222
+	'TN9' => 'Karosa',
223
+	'TRA' => 'Ikarus Bus',
224
+	'TRU' => 'Audi',
225
+	'TSE' => 'Ikarus Egyedi Autobuszgyar',
226
+	'TSM' => 'Suzuki',
227
+	'TW1' => 'Toyota Caetano',
228
+	'TYA' => 'Mitsubishi Trucks',
229
+	'TYB' => 'Mitsubishi Trucks',
230
+	'UU1' => 'Renault Dacia',
231
+	'UU3' => 'ARO',
232
+	'UU6' => 'Daewoo',
233
+	'U5Y' => 'Kia Motors',
234
+	'U6Y' => 'Kia Motors',
235
+	'VAG' => 'Magna Steyr Puch',
236
+	'VAN' => 'MAN',
237
+	'VBK' => 'KTM (Motorcycles)',
238
+	'VF1' => 'Renault',
239
+	'VF2' => 'Renault',
240
+	'VF3' => 'Peugeot',
241
+	'VF4' => 'Talbot',
242
+	'VF6' => 'Renault (Trucks & Buses)',
243
+	'VF7' => 'Citroën',
244
+	'VF8' => 'Matra',
245
+	'VF9' => 'Bugatti',
246
+	'795' => 'Bugatti',
247
+	'VG5' => 'MBK (motorcycles)',
248
+	'VLU' => 'Scania',
249
+	'VN1' => 'SOVAB',
250
+	'VNE' => 'Irisbus',
251
+	'VNK' => 'Toyota',
252
+	'VNV' => 'Renault-Nissan',
253
+	'VSA' => 'Mercedes-Benz',
254
+	'VSE' => 'Suzuki (Santana Motors)',
255
+	'VSK' => 'Nissan',
256
+	'VSS' => 'SEAT',
257
+	'VSX' => 'Opel',
258
+	'VS6' => 'Ford',
259
+	'VS7' => 'Citroën',
260
+	'VS9' => 'Carrocerias Ayats',
261
+	'VTH' => 'Derbi (motorcycles)',
262
+	'VTL' => 'Yamaha (motorcycles)',
263
+	'VTT' => 'Suzuki (motorcycles)',
264
+	'VV9' => 'TAURO',
265
+	'VWA' => 'Nissan',
266
+	'VWV' => 'Volkswagen',
267
+	'VX1' => 'Zastava / Yugo Serbia',
268
+	'WAG' => 'Neoplan',
269
+	'WAU' => 'Audi',
270
+	'WA1' => 'Audi SUV',
271
+	'WBA' => 'BMW',
272
+	'WBS' => 'BMW M',
273
+	'WBW' => 'BMW',
274
+	'WBY' => 'BMW',
275
+	'WDA' => 'Daimler',
276
+	'WDB' => 'Mercedes-Benz',
277
+	'WDC' => 'DaimlerChrysler',
278
+	'WDD' => 'Mercedes-Benz',
279
+	'WDF' => 'Mercedes-Benz (commercial vehicles)',
280
+	'WEB' => 'Evobus GmbH (Mercedes-Bus)',
281
+	'WJM' => 'Iveco Magirus',
282
+	'WF0' => 'Ford',
283
+	'WKE' => 'Fahrzeugwerk Bernard Krone GmbH & Co. KG',
284
+	'WKK' => 'Kässbohrer/Setra',
285
+	'WMA' => 'MAN',
286
+	'WME' => 'smart',
287
+	'WMW' => 'MINI',
288
+	'WMX' => 'Mercedes-AMG',
289
+	'WP0' => 'Porsche',
290
+	'WP1' => 'Porsche SUV',
291
+	'W09' => 'RUF',
292
+	'W0L' => 'Opel',
293
+	'W0V' => 'Opel',
294
+	'WUA' => 'quattro GmbH',
295
+	'WVG' => 'Volkswagen MPV/SUV',
296
+	'WVW' => 'Volkswagen',
297
+	'WV1' => 'Volkswagen Commercial Vehicles',
298
+	'WV2' => 'Volkswagen Bus/Van',
299
+	'WV3' => 'Volkswagen Trucks',
300
+	'XLB' => 'Volvo (NedCar)',
301
+	'XLE' => 'Scania',
302
+	'XLR' => 'DAF (trucks)',
303
+	'XL9' => 'Spyker',
304
+	'363' => 'Spyker',
305
+	'XMC' => 'Mitsubishi (NedCar)',
306
+	'XTA' => 'Lada/AvtoVAZ',
307
+	'XTC' => 'KAMAZ',
308
+	'XTH' => 'GAZ',
309
+	'XTT' => 'UAZ/Sollers',
310
+	'XTY' => 'LiAZ',
311
+	'XUF' => 'General Motors',
312
+	'XUU' => 'AvtoTor (General Motors SKD)',
313
+	'XW8' => 'Volkswagen Group',
314
+	'XWB' => 'UZ-Daewoo',
315
+	'XWE' => 'AvtoTor (Hyundai-Kia SKD)',
316
+	'X1M' => 'PAZ',
317
+	'X4X' => 'AvtoTor (BMW SKD)',
318
+	'X7L' => 'Renault AvtoFramos',
319
+	'X7M' => 'Hyundai TagAZ',
320
+	'YBW' => 'Volkswagen',
321
+	'YB1' => 'Volvo Trucks',
322
+	'YCM' => 'Mazda',
323
+	'YE2' => 'Van Hool (buses)',
324
+	'YH2' => 'BRP (Lynx snowmobiles)',
325
+	'YK1' => 'Saab-Valmet',
326
+	'YS2' => 'Scania AB',
327
+	'YS3' => 'Saab',
328
+	'YS4' => 'Scania Bus',
329
+	'YTN' => 'Saab NEVS',
330
+	'YT9' => 'Koenigsegg',
331
+	'007' => 'Koenigsegg',
332
+	'034' => 'Carvia',
333
+	'YU7' => 'Husaberg (motorcycles)',
334
+	'YV1' => 'Volvo Cars',
335
+	'YV4' => 'Volvo Cars',
336
+	'YV2' => 'Volvo Trucks',
337
+	'YV3' => 'Volvo Buses',
338
+	'Y3M' => 'MAZ',
339
+	'Y6D' => 'Zaporozhets/AvtoZAZ',
340
+	'ZAA' => 'Autobianchi',
341
+	'ZAM' => 'Maserati',
342
+	'ZAP' => 'Piaggio/Vespa/Gilera',
343
+	'ZAR' => 'Alfa Romeo',
344
+	'ZBN' => 'Benelli',
345
+	'ZCG' => 'Cagiva SpA / MV Agusta',
346
+	'ZCF' => 'Iveco',
347
+	'ZDM' => 'Ducati Motor Holdings SpA',
348
+	'ZDF' => 'Ferrari Dino',
349
+	'ZD0' => 'Yamaha',
350
+	'ZD3' => 'Beta Motor',
351
+	'ZD4' => 'Aprilia',
352
+	'ZFA' => 'Fiat',
353
+	'ZFC' => 'Fiat V.I.',
354
+	'ZFF' => 'Ferrari',
355
+	'ZGU' => 'Moto Guzzi',
356
+	'ZHW' => 'Lamborghini',
357
+	'ZJM' => 'Malaguti',
358
+	'ZJN' => 'Innocenti',
359
+	'ZKH' => 'Husqvarna Motorcycles',
360
+	'ZLA' => 'Lancia',
361
+	'ZOM' => 'OM',
362
+	'Z8M' => 'Marussia',
363
+	'1B3' => 'Dodge',
364
+	'1C3' => 'Chrysler',
365
+	'1C4' => 'Chrysler',
366
+	'1C6' => 'Chrysler',
367
+	'1D3' => 'Dodge',
368
+	'1FA' => 'Ford Motor Company',
369
+	'1FB' => 'Ford Motor Company',
370
+	'1FC' => 'Ford Motor Company',
371
+	'1FD' => 'Ford Motor Company',
372
+	'1FM' => 'Ford Motor Company',
373
+	'1FT' => 'Ford Motor Company',
374
+	'1FU' => 'Freightliner',
375
+	'1FV' => 'Freightliner',
376
+	'1F9' => 'FWD Corp.',
377
+	'1G'  => 'General Motors',
378
+	'1GC' => 'Chevrolet Truck',
379
+	'1GT' => 'GMC Truck',
380
+	'1G1' => 'Chevrolet',
381
+	'1G2' => 'Pontiac',
382
+	'1G3' => 'Oldsmobile',
383
+	'1G4' => 'Buick',
384
+	'1G6' => 'Cadillac',
385
+	'1G8' => 'Saturn',
386
+	'1GM' => 'Pontiac',
387
+	'1GY' => 'Cadillac',
388
+	'1H'  => 'Honda',
389
+	'1HD' => 'Harley-Davidson',
390
+	'1J4' => 'Jeep',
391
+	'1J8' => 'Jeep',
392
+	'1L'  => 'Lincoln',
393
+	'1ME' => 'Mercury',
394
+	'1M1' => 'Mack Truck',
395
+	'1M2' => 'Mack Truck',
396
+	'1M3' => 'Mack Truck',
397
+	'1M4' => 'Mack Truck',
398
+	'1M9' => 'Mynatt Truck & Equipment',
399
+	'1N'  => 'Nissan',
400
+	'1NX' => 'NUMMI',
401
+	'1P3' => 'Plymouth',
402
+	'1R9' => 'Roadrunner Hay Squeeze',
403
+	'1VW' => 'Volkswagen',
404
+	'1XK' => 'Kenworth',
405
+	'1XP' => 'Peterbilt',
406
+	'1YV' => 'Mazda (AutoAlliance International)',
407
+	'1ZV' => 'Ford (AutoAlliance International)',
408
+	'2A4' => 'Chrysler',
409
+	'2BP' => 'Bombardier Recreational Products',
410
+	'2B3' => 'Dodge',
411
+	'2B7' => 'Dodge',
412
+	'2C3' => 'Chrysler',
413
+	'2CN' => 'CAMI',
414
+	'2D3' => 'Dodge',
415
+	'2FA' => 'Ford Motor Company',
416
+	'2FB' => 'Ford Motor Company',
417
+	'2FC' => 'Ford Motor Company',
418
+	'2FM' => 'Ford Motor Company',
419
+	'2FT' => 'Ford Motor Company',
420
+	'2FU' => 'Freightliner',
421
+	'2FV' => 'Freightliner',
422
+	'2FZ' => 'Sterling',
423
+	'2Gx' => 'General Motors',
424
+	'2G1' => 'Chevrolet',
425
+	'2G2' => 'Pontiac',
426
+	'2G3' => 'Oldsmobile',
427
+	'2G4' => 'Buick',
428
+	'2G9' => 'Gnome Homes',
429
+	'2HG' => 'Honda',
430
+	'2HK' => 'Honda',
431
+	'2HJ' => 'Honda',
432
+	'2HM' => 'Hyundai',
433
+	'2M'  => 'Mercury',
434
+	'2NV' => 'Nova Bus',
435
+	'2P3' => 'Plymouth',
436
+	'2T'  => 'Toyota',
437
+	'2TP' => 'Triple E LTD',
438
+	'2V4' => 'Volkswagen',
439
+	'2V8' => 'Volkswagen',
440
+	'2WK' => 'Western Star',
441
+	'2WL' => 'Western Star',
442
+	'2WM' => 'Western Star',
443
+	'3C4' => 'Chrysler',
444
+	'3D3' => 'Dodge',
445
+	'3D4' => 'Dodge',
446
+	'3FA' => 'Ford Motor Company',
447
+	'3FE' => 'Ford Motor Company',
448
+	'3G'  => 'General Motors',
449
+	'3H'  => 'Honda',
450
+	'3JB' => 'BRP (all-terrain vehicles)',
451
+	'3MD' => 'Mazda',
452
+	'3MZ' => 'Mazda',
453
+	'3N'  => 'Nissan',
454
+	'3P3' => 'Plymouth',
455
+	'3VW' => 'Volkswagen',
456
+	'4F'  => 'Mazda',
457
+	'4JG' => 'Mercedes-Benz',
458
+	'4M'  => 'Mercury',
459
+	'4RK' => 'Nova Bus',
460
+	'4S'  => 'Subaru-Isuzu Automotive',
461
+	'4T'  => 'Toyota',
462
+	'4T9' => 'Lumen Motors',
463
+	'4UF' => 'Arctic Cat Inc.',
464
+	'4US' => 'BMW',
465
+	'4UZ' => 'Frt-Thomas Bus',
466
+	'4V1' => 'Volvo',
467
+	'4V2' => 'Volvo',
468
+	'4V3' => 'Volvo',
469
+	'4V4' => 'Volvo',
470
+	'4V5' => 'Volvo',
471
+	'4V6' => 'Volvo',
472
+	'4VL' => 'Volvo',
473
+	'4VM' => 'Volvo',
474
+	'4VZ' => 'Volvo',
475
+	'538' => 'Zero Motorcycles',
476
+	'5F'  => 'Honda Alabama',
477
+	'5J'  => 'Honda Ohio',
478
+	'5L'  => 'Lincoln',
479
+	'5N1' => 'Nissan',
480
+	'5NP' => 'Hyundai',
481
+	'5T'  => 'Toyota - trucks',
482
+	'5YJ' => 'Tesla, Inc.',
483
+	'6AB' => 'MAN',
484
+	'6F4' => 'Nissan Motor Company',
485
+	'6F5' => 'Kenworth',
486
+	'6FP' => 'Ford Motor Company',
487
+	'6G1' => 'General Motors-Holden (post Nov 2002)',
488
+	'6G2' => 'Pontiac (GTO & G8)',
489
+	'6H8' => 'General Motors-Holden (pre Nov 2002)',
490
+	'6MM' => 'Mitsubishi Motors',
491
+	'6T1' => 'Toyota Motor Corporation',
492
+	'6U9' => 'Privately Imported car',
493
+	'8AD' => 'Peugeot',
494
+	'8AF' => 'Ford Motor Company',
495
+	'8AG' => 'Chevrolet',
496
+	'8AJ' => 'Toyota',
497
+	'8AK' => 'Suzuki',
498
+	'8AP' => 'Fiat',
499
+	'8AW' => 'Volkswagen',
500
+	'8A1' => 'Renault',
501
+	'8GD' => 'Peugeot',
502
+	'8GG' => 'Chevrolet',
503
+	'935' => 'Citroën',
504
+	'936' => 'Peugeot',
505
+	'93H' => 'Honda',
506
+	'93R' => 'Toyota',
507
+	'93U' => 'Audi',
508
+	'93V' => 'Audi',
509
+	'93X' => 'Mitsubishi Motors',
510
+	'93Y' => 'Renault',
511
+	'94D' => 'Nissan',
512
+	'9BD' => 'Fiat',
513
+	'9BF' => 'Ford Motor Company',
514
+	'9BG' => 'Chevrolet',
515
+	'9BM' => 'Mercedes-Benz',
516
+	'9BR' => 'Toyota',
517
+	'9BS' => 'Scania',
518
+	'9BW' => 'Volkswagen',
519
+	'9FB' => 'Renault',
520
+	'WB1' => 'BMW Motorrad of North America',
521 521
 
522
-    /**
523
-     * @see https://github.com/sunrise-php/vin/issues/70
524
-     */
525
-    'W1K' => 'Mercedes',
526
-    'W1V' => 'Mercedes',
527
-    'W1N' => 'Mercedes',
528
-    'WAP' => 'BMW',
529
-    'YAR' => 'Toyota',
522
+	/**
523
+	 * @see https://github.com/sunrise-php/vin/issues/70
524
+	 */
525
+	'W1K' => 'Mercedes',
526
+	'W1V' => 'Mercedes',
527
+	'W1N' => 'Mercedes',
528
+	'WAP' => 'BMW',
529
+	'YAR' => 'Toyota',
530 530
 
531
-    /**
532
-     * @see https://github.com/sunrise-php/vin/issues/76
533
-     */
534
-    '7SA' => 'Tesla, Inc.',
535
-    '7G2' => 'Tesla, Inc.',
536
-    'LRW' => 'Tesla, Inc.',
537
-    'XP7' => 'Tesla, Inc.',
538
-    'SFZ' => 'Tesla, Inc.',
531
+	/**
532
+	 * @see https://github.com/sunrise-php/vin/issues/76
533
+	 */
534
+	'7SA' => 'Tesla, Inc.',
535
+	'7G2' => 'Tesla, Inc.',
536
+	'LRW' => 'Tesla, Inc.',
537
+	'XP7' => 'Tesla, Inc.',
538
+	'SFZ' => 'Tesla, Inc.',
539 539
 
540
-    /**
541
-     * @see https://github.com/sunrise-php/vin/issues/77
542
-     */
543
-    '7JR' => 'Volvo Car Usa, Llc',
540
+	/**
541
+	 * @see https://github.com/sunrise-php/vin/issues/77
542
+	 */
543
+	'7JR' => 'Volvo Car Usa, Llc',
544 544
 ];
Please login to merge, or discard this patch.
data/years.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -21,64 +21,64 @@
 block discarded – undo
21 21
  * @link https://en.wikibooks.org/wiki/Vehicle_Identification_Numbers_(VIN_codes)/Model_year
22 22
  */
23 23
 const YEARS = [
24
-    1980 => 'A',
25
-    1981 => 'B',
26
-    1982 => 'C',
27
-    1983 => 'D',
28
-    1984 => 'E',
29
-    1985 => 'F',
30
-    1986 => 'G',
31
-    1987 => 'H',
32
-    1988 => 'J',
33
-    1989 => 'K',
34
-    1990 => 'L',
35
-    1991 => 'M',
36
-    1992 => 'N',
37
-    1993 => 'P',
38
-    1994 => 'R',
39
-    1995 => 'S',
40
-    1996 => 'T',
41
-    1997 => 'V',
42
-    1998 => 'W',
43
-    1999 => 'X',
44
-    2000 => 'Y',
45
-    2001 => '1',
46
-    2002 => '2',
47
-    2003 => '3',
48
-    2004 => '4',
49
-    2005 => '5',
50
-    2006 => '6',
51
-    2007 => '7',
52
-    2008 => '8',
53
-    2009 => '9',
54
-    2010 => 'A',
55
-    2011 => 'B',
56
-    2012 => 'C',
57
-    2013 => 'D',
58
-    2014 => 'E',
59
-    2015 => 'F',
60
-    2016 => 'G',
61
-    2017 => 'H',
62
-    2018 => 'J',
63
-    2019 => 'K',
64
-    2020 => 'L',
65
-    2021 => 'M',
66
-    2022 => 'N',
67
-    2023 => 'P',
68
-    2024 => 'R',
69
-    2025 => 'S',
70
-    2026 => 'T',
71
-    2027 => 'V',
72
-    2028 => 'W',
73
-    2029 => 'X',
74
-    2030 => 'Y',
75
-    2031 => '1',
76
-    2032 => '2',
77
-    2033 => '3',
78
-    2034 => '4',
79
-    2035 => '5',
80
-    2036 => '6',
81
-    2037 => '7',
82
-    2038 => '8',
83
-    2039 => '9',
24
+	1980 => 'A',
25
+	1981 => 'B',
26
+	1982 => 'C',
27
+	1983 => 'D',
28
+	1984 => 'E',
29
+	1985 => 'F',
30
+	1986 => 'G',
31
+	1987 => 'H',
32
+	1988 => 'J',
33
+	1989 => 'K',
34
+	1990 => 'L',
35
+	1991 => 'M',
36
+	1992 => 'N',
37
+	1993 => 'P',
38
+	1994 => 'R',
39
+	1995 => 'S',
40
+	1996 => 'T',
41
+	1997 => 'V',
42
+	1998 => 'W',
43
+	1999 => 'X',
44
+	2000 => 'Y',
45
+	2001 => '1',
46
+	2002 => '2',
47
+	2003 => '3',
48
+	2004 => '4',
49
+	2005 => '5',
50
+	2006 => '6',
51
+	2007 => '7',
52
+	2008 => '8',
53
+	2009 => '9',
54
+	2010 => 'A',
55
+	2011 => 'B',
56
+	2012 => 'C',
57
+	2013 => 'D',
58
+	2014 => 'E',
59
+	2015 => 'F',
60
+	2016 => 'G',
61
+	2017 => 'H',
62
+	2018 => 'J',
63
+	2019 => 'K',
64
+	2020 => 'L',
65
+	2021 => 'M',
66
+	2022 => 'N',
67
+	2023 => 'P',
68
+	2024 => 'R',
69
+	2025 => 'S',
70
+	2026 => 'T',
71
+	2027 => 'V',
72
+	2028 => 'W',
73
+	2029 => 'X',
74
+	2030 => 'Y',
75
+	2031 => '1',
76
+	2032 => '2',
77
+	2033 => '3',
78
+	2034 => '4',
79
+	2035 => '5',
80
+	2036 => '6',
81
+	2037 => '7',
82
+	2038 => '8',
83
+	2039 => '9',
84 84
 ];
Please login to merge, or discard this patch.