Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Faker\Provider\pt_BR;
4
 
5
class Address extends \Faker\Provider\Address
6
{
7
    protected static $cityPrefix = ['São', 'Porto', 'Vila', 'Santa'];
8
    protected static $citySuffix = ['do Norte', 'do Leste', 'do Sul', 'd\'Oeste'];
9
    protected static $streetPrefix = [
10
        'Av.', 'Avenida', 'R.', 'Rua', 'Travessa', 'Largo',
11
    ];
12
    protected static $buildingNumber = ['%####', '%###', '%##', '%#', '%'];
13
    protected static $postcode = ['#####-###'];
14
    protected static $state = [
15
        'Acre', 'Alagoas', 'Amapá', 'Amazonas', 'Bahia', 'Ceará',
16
        'Distrito Federal', 'Espírito Santo', 'Goiás', 'Maranhão',
17
        'Mato Grosso', 'Mato Grosso do Sul', 'Minas Gerais', 'Pará', 'Paraíba',
18
        'Paraná', 'Pernambuco', 'Piauí', 'Rio de Janeiro',
19
        'Rio Grande do Norte', 'Rio Grande do Sul', 'Rondônia', 'Roraima',
20
        'Santa Catarina', 'São Paulo', 'Sergipe', 'Tocantins',
21
    ];
22
    protected static $stateAbbr = [
23
        'AC', 'AL', 'AP', 'AM', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA', 'MT', 'MS',
24
        'MG', 'PA', 'PB', 'PR', 'PE', 'PI', 'RJ', 'RN', 'RS', 'RO', 'RR', 'SC',
25
        'SP', 'SE', 'TO',
26
    ];
27
    protected static $region = [
28
        'Centro-Oeste', 'Nordeste', 'Norte', 'Sudeste', 'Sul',
29
    ];
30
    protected static $regionAbbr = [
31
        'CO', 'N', 'NE', 'SE', 'S',
32
    ];
33
    protected static $country = [
34
        'Afeganistão', 'África do Sul', 'Albânia', 'Alemanha', 'Andorra',
35
        'Angola', 'Antigua e Barbuda', 'Arabia Saudita', 'Argélia',
36
        'Argentina', 'Armênia', 'Austrália', 'Áustria', 'Azerbaijão',
37
        'Bahamas', 'Bangladesh', 'Barbados', 'Barein', 'Belize', 'Benin',
38
        'Bielorrússia', 'Birmânia', 'Bolívia', 'Bósnia e Herzegovina',
39
        'Botsuana', 'Brasil', 'Brunei', 'Bulgária', 'Burkina Faso',
40
        'Burundi', 'Butão', 'Bélgica', 'Cabo Verde', 'Camboja', 'Camarões',
41
        'Canadá', 'Cazaquistão', 'Chad', 'Chile', 'China', 'Chipre',
42
        'Colômbia', 'Comoras', 'Congo', 'Coréia do Norte', 'Coréia do Sul',
43
        'Costa Rica', 'Costa do Marfim', 'Croácia', 'Cuba', 'Dinamarca',
44
        'Djibouti', 'Domênica', 'Equador', 'Egito', 'El Salvador',
45
        'Emirados Árabes Unidos', 'Eritrea', 'Eslováquia', 'Eslovênia',
46
        'Espanha', 'Estados Unidos da América', 'Estônia', 'Etiópia',
47
        'Filipinas', 'Finlândia', 'Fiji', 'França', 'Gabão', 'Gâmbia',
48
        'Georgia', 'Gana', 'Granada', 'Grécia', 'Guatemala',
49
        'Guiné Equatorial', 'Guiné Bissau', 'Guiana', 'Haiti', 'Honduras',
50
        'Hungria', 'Índia', 'Indonésia', 'Iraque', 'Irlanda', 'Irã',
51
        'Islândia', 'Ilhas Marshall', 'Ilhas Maurício', 'Ilhas Salomão',
52
        'Ilhas Samoa', 'Israel', 'Itália', 'Jamaica', 'Japão', 'Jordânia',
53
        'Kiribati', 'Kwait', 'Laos', 'Lesoto', 'Letônia', 'Libéria', 'Líbia',
54
        'Liechtenstein', 'Lituânia', 'Luxemburgo', 'Líbano', 'Macedônia',
55
        'Madagascar', 'Malásia', 'Malauí', 'Maldivas', 'Mali', 'Malta',
56
        'Marrocos', 'Mauritânia', 'Micronésia', 'Moldávia', 'Mongólia',
57
        'Montenegro', 'Moçambique', 'México', 'Mônaco', 'Namíbia', 'Nauru',
58
        'Nepal', 'Nicarágua', 'Nigéria', 'Noruega', 'Nova Guiné',
59
        'Nova Zelândia', 'Níger', 'Omã', 'Qatar', 'Quênia', 'Quirguistão',
60
        'Paquistão', 'Palaos', 'Panamá', 'Papua Nova Guiné', 'Paraguai',
61
        'Países Baixos', 'Peru', 'Polônia', 'Portugal', 'Reino Unido',
62
        'Reino Unido da Grã Bretanha e Irlanda do Norte',
63
        'República Centroafricana', 'República Checa',
64
        'República Democrática do Congo', 'República Dominicana', 'Ruanda',
65
        'Romênia', 'Rússia', 'San Cristõvao e Neves', 'San Marino',
66
        'São Vicente e as Granadinas', 'Santa Luzia', 'São Tomé e Príncipe',
67
        'Senegal', 'Sérvia', 'Seychelles', 'Serra Leoa', 'Singapura', 'Síria',
68
        'Somália', 'Sri Lanka', 'Suazilândia', 'Sudão', 'Suécia', 'Suiça',
69
        'Suriname', 'Tailândia', 'Tanzânia', 'Tajiquistão', 'Timor Leste',
70
        'Togo', 'Tonga', 'Trinidad e Tobago', 'Turcomenistão', 'Turquia',
71
        'Tuvalu', 'Tunísia', 'Ucrânia', 'Uganda', 'Uruguai', 'Uzbequistão',
72
        'Vaticano', 'Vanuatu', 'Venezuela', 'Vietnã', 'Yemen', 'Zâmbia',
73
        'Zimbábue',
74
    ];
75
    protected static $cityFormats = [
76
        '{{cityPrefix}} {{firstName}} {{citySuffix}}',
77
        '{{cityPrefix}} {{firstName}}',
78
        '{{firstName}} {{citySuffix}}',
79
        '{{lastName}} {{citySuffix}}',
80
    ];
81
    protected static $streetNameFormats = [
82
        '{{streetPrefix}} {{firstName}}',
83
        '{{streetPrefix}} {{lastName}}',
84
        '{{streetPrefix}} {{firstName}} {{lastName}}',
85
    ];
86
    protected static $streetAddressFormats = [
87
        '{{streetName}}, {{buildingNumber}}',
88
        '{{streetName}}, {{buildingNumber}}. {{secondaryAddress}}',
89
    ];
90
    protected static $addressFormats = [
91
        "{{postcode}}, {{streetAddress}}\n{{city}} - {{stateAbbr}}",
92
    ];
93
    protected static $secondaryAddressFormats = [
94
        'Bloco A', 'Bloco B', 'Bloco C', 'Bc. # Ap. ##', 'Bc. ## Ap. ##',
95
        '#º Andar', '##º Andar', '###º Andar', 'Apto #', 'Apto ##', 'Apto ###',
96
        'Apto ####', 'F', 'Fundos', 'Anexo',
97
    ];
98
 
99
    /**
100
     * @example 'Avenida'
101
     */
102
    public static function streetPrefix()
103
    {
104
        return static::randomElement(static::$streetPrefix);
105
    }
106
 
107
    /**
108
     * @example 'São'
109
     */
110
    public static function cityPrefix()
111
    {
112
        return static::randomElement(static::$cityPrefix);
113
    }
114
 
115
    /**
116
     * @example '6º Andar'
117
     */
118
    public static function secondaryAddress()
119
    {
120
        return static::numerify(static::randomElement(static::$secondaryAddressFormats));
121
    }
122
 
123
    /**
124
     * @example 'Brasília'
125
     */
126
    public static function state()
127
    {
128
        return static::randomElement(static::$state);
129
    }
130
 
131
    /**
132
     * @example 'DF'
133
     */
134
    public static function stateAbbr()
135
    {
136
        return static::randomElement(static::$stateAbbr);
137
    }
138
 
139
    /**
140
     * @example 'Nordeste'
141
     */
142
    public static function region()
143
    {
144
        return static::randomElement(static::$region);
145
    }
146
 
147
    /**
148
     * @example 'NE'
149
     */
150
    public static function regionAbbr()
151
    {
152
        return static::randomElement(static::$regionAbbr);
153
    }
154
}