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\es_PE;
4
 
5
class Address extends \Faker\Provider\es_ES\Address
6
{
7
    protected static $cityPrefix = ['San', 'Puerto', 'Gral.', 'Don'];
8
    protected static $citySuffix = ['Alta', 'Baja', 'Norte', 'Este', ' Sur', ' Oeste'];
9
    protected static $buildingNumber = ['%####', '%###', '%##', '%#', '%'];
10
    protected static $streetPrefix = ['Jr.', 'Av.', 'Cl.', 'Urb.'];
11
    protected static $streetSuffix = [''];
12
    protected static $postcode = ['LIMA ##'];
13
    protected static $state = [
14
        'Lima', 'Callao', 'Arequipa', 'Cuzco', 'Piura', 'Iquitos', 'Huaraz', 'Tacna', 'Ayacucho', 'Pucallpa', 'Trujillo', 'Chimbote', 'Ica', 'Moquegua', 'Puno', 'Tarapoto', 'Cajamarca', 'Lambayeque', 'Huanuco', 'Jauja', 'Tumbes', 'Madre de Dios',
15
    ];
16
    protected static $cityFormats = [
17
        '{{cityPrefix}} {{firstName}} {{lastName}}',
18
        '{{cityPrefix}} {{firstName}}',
19
        '{{firstName}} {{citySuffix}}',
20
        '{{lastName}} {{citySuffix}}',
21
    ];
22
    protected static $streetNameFormats = [
23
        '{{streetPrefix}} {{firstName}} {{lastName}}',
24
    ];
25
    protected static $streetAddressFormats = [
26
        '{{streetName}} # {{buildingNumber}} ',
27
        '{{streetName}} # {{buildingNumber}} {{secondaryAddress}}',
28
    ];
29
    protected static $addressFormats = [
30
        "{{streetAddress}}\n{{city}}, {{state}}",
31
    ];
32
    protected static $secondaryAddressFormats = ['Dpto. ###', 'Hab. ###', 'Piso #', 'Piso ##'];
33
 
34
    /**
35
     * @example ''
36
     */
37
    public static function cityPrefix()
38
    {
39
        return static::randomElement(static::$cityPrefix);
40
    }
41
 
42
    /**
43
     * @example 'Jr.'
44
     */
45
    public static function streetPrefix()
46
    {
47
        return static::randomElement(static::$streetPrefix);
48
    }
49
 
50
    /**
51
     * @example 'Dpto. 402'
52
     */
53
    public static function secondaryAddress()
54
    {
55
        return static::numerify(static::randomElement(static::$secondaryAddressFormats));
56
    }
57
 
58
    /**
59
     * @example 'Lima'
60
     */
61
    public static function state()
62
    {
63
        return static::randomElement(static::$state);
64
    }
65
}