Skip to content

Commit be07fd7

Browse files
authored
Merge pull request #4 from tmarquesini/patch-1
Update Base.php
2 parents 9f8f2c1 + 5b91935 commit be07fd7

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

src/Base.php

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function __construct(string $country = null)
1616
$v = Validator::make([
1717
"country" => $country,
1818
], [
19-
"country" => "nullable|string|in:US,CA,MX",
19+
"country" => "nullable|string|in:US,CA,MX,BR",
2020
]);
2121

2222
if ($v->fails()) {
@@ -147,6 +147,35 @@ protected function isAbbr($value, string $country = null): bool
147147
["abbr" => "VER", "name" => "Veracruz de Ignacio de la Llave"],
148148
["abbr" => "YUC", "name" => "Yucatán"],
149149
["abbr" => "ZAC", "name" => "Zacatecas"],
150+
],
151+
"BR" => [
152+
["abbr" => 'AC', "name" => 'Acre'],
153+
["abbr" => 'AL', "name" => 'Alagoas'],
154+
["abbr" => 'AP', "name" => 'Amapá'],
155+
["abbr" => 'AM', "name" => 'Amazonas'],
156+
["abbr" => 'BA', "name" => 'Bahia'],
157+
["abbr" => 'CE', "name" => 'Ceará'],
158+
["abbr" => 'DF', "name" => 'Distrito Federal'],
159+
["abbr" => 'ES', "name" => 'Espírito Santo'],
160+
["abbr" => 'GO', "name" => 'Goiás'],
161+
["abbr" => 'MA', "name" => 'Maranhão'],
162+
["abbr" => 'MT', "name" => 'Mato Grosso'],
163+
["abbr" => 'MS', "name" => 'Mato Grosso do Sul'],
164+
["abbr" => 'MG', "name" => 'Minas Gerais'],
165+
["abbr" => 'PA', "name" => 'Pará'],
166+
["abbr" => 'PB', "name" => 'Paraíba'],
167+
["abbr" => 'PR', "name" => 'Paraná'],
168+
["abbr" => 'PE', "name" => 'Pernambuco'],
169+
["abbr" => 'PI', "name" => 'Piauí'],
170+
["abbr" => 'RR', "name" => 'Roraima'],
171+
["abbr" => 'RO', "name" => 'Rondônia'],
172+
["abbr" => 'RJ', "name" => 'Rio de Janeiro'],
173+
["abbr" => 'RN', "name" => 'Rio Grande do Norte'],
174+
["abbr" => 'RS', "name" => 'Rio Grande do Sul'],
175+
["abbr" => 'SC', "name" => 'Santa Catarina'],
176+
["abbr" => 'SP', "name" => 'São Paulo'],
177+
["abbr" => 'SE', "name" => 'Sergipe'],
178+
["abbr" => 'TO', "name" => 'Tocantins'],
150179
],
151180
];
152181

@@ -156,6 +185,7 @@ protected function getSubject(string $country = null): string
156185
{
157186
case "US":
158187
case "MX":
188+
case "BR":
159189
return "State";
160190
case "CA":
161191
return "Province";

0 commit comments

Comments
 (0)