Skip to content

Commit 2effc85

Browse files
authored
Merge branch 'master' into master
2 parents dbd4dd4 + be07fd7 commit 2effc85

File tree

2 files changed

+42
-6
lines changed

2 files changed

+42
-6
lines changed

composer.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
{
1414
"name": "Tyler Arbon",
1515
"email": "[email protected]"
16+
},
17+
{
18+
"name": "Scott Robinson",
19+
"email": "[email protected]",
20+
"homepage": "http://dor.ky"
1621
}
1722
],
1823
"autoload": {
@@ -27,12 +32,12 @@
2732
},
2833
"minimum-stability": "stable",
2934
"require": {
30-
"illuminate/contracts": "^5.5|^6.0",
31-
"illuminate/support": "^5.5|^6.0"
35+
"illuminate/contracts": "^5.5|^6.0|^7.0|^8.0|^9.0|^10.0",
36+
"illuminate/support": "^5.5|^6.0|^7.0|^8.0|^9.0|^10.0"
3237
},
3338
"require-dev": {
34-
"phpunit/phpunit": "^7.0|^8.0",
35-
"orchestra/testbench": "^3.5|^4.0"
39+
"phpunit/phpunit": "^7.0|^8.0|^9.0",
40+
"orchestra/testbench": "^3.5|^4.0|^5.0|^7.0|^8.0"
3641
},
37-
"suggest": {}
42+
"suggest": []
3843
}

src/Base.php

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

2223
if ($v->fails()) {
@@ -147,6 +148,35 @@ protected function isAbbr($value, string $country = null): bool
147148
["abbr" => "VER", "name" => "Veracruz de Ignacio de la Llave"],
148149
["abbr" => "YUC", "name" => "Yucatán"],
149150
["abbr" => "ZAC", "name" => "Zacatecas"],
151+
],
152+
"BR" => [
153+
["abbr" => 'AC', "name" => 'Acre'],
154+
["abbr" => 'AL', "name" => 'Alagoas'],
155+
["abbr" => 'AP', "name" => 'Amapá'],
156+
["abbr" => 'AM', "name" => 'Amazonas'],
157+
["abbr" => 'BA', "name" => 'Bahia'],
158+
["abbr" => 'CE', "name" => 'Ceará'],
159+
["abbr" => 'DF', "name" => 'Distrito Federal'],
160+
["abbr" => 'ES', "name" => 'Espírito Santo'],
161+
["abbr" => 'GO', "name" => 'Goiás'],
162+
["abbr" => 'MA', "name" => 'Maranhão'],
163+
["abbr" => 'MT', "name" => 'Mato Grosso'],
164+
["abbr" => 'MS', "name" => 'Mato Grosso do Sul'],
165+
["abbr" => 'MG', "name" => 'Minas Gerais'],
166+
["abbr" => 'PA', "name" => 'Pará'],
167+
["abbr" => 'PB', "name" => 'Paraíba'],
168+
["abbr" => 'PR', "name" => 'Paraná'],
169+
["abbr" => 'PE', "name" => 'Pernambuco'],
170+
["abbr" => 'PI', "name" => 'Piauí'],
171+
["abbr" => 'RR', "name" => 'Roraima'],
172+
["abbr" => 'RO', "name" => 'Rondônia'],
173+
["abbr" => 'RJ', "name" => 'Rio de Janeiro'],
174+
["abbr" => 'RN', "name" => 'Rio Grande do Norte'],
175+
["abbr" => 'RS', "name" => 'Rio Grande do Sul'],
176+
["abbr" => 'SC', "name" => 'Santa Catarina'],
177+
["abbr" => 'SP', "name" => 'São Paulo'],
178+
["abbr" => 'SE', "name" => 'Sergipe'],
179+
["abbr" => 'TO', "name" => 'Tocantins'],
150180
],
151181
"NG" => [
152182
["abbr" => "AB", "name" => "Abia"],
@@ -195,6 +225,7 @@ protected function getSubject(string $country = null): string
195225
{
196226
case "US":
197227
case "MX":
228+
case "BR":
198229
case "NG":
199230
return "State";
200231
case "CA":

0 commit comments

Comments
 (0)