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\ar_EG;
4
 
5
use Faker\Calculator\Luhn;
6
 
7
class Company extends \Faker\Provider\Company
8
{
9
    protected static $formats = [
10
        '{{companyPrefix}} {{cityName}}',
11
        '{{companyPrefix}} {{lastName}}',
12
        '{{cityName}} {{companySuffix}}',
13
        '{{lastName}} {{companySuffix}}',
14
        '{{companyPrefix}} {{lastName}} {{companySuffix}}',
15
        '{{companyPrefix}} {{cityName}} {{companySuffix}}',
16
    ];
17
 
18
    protected static $catchPhraseWords = [
19
        ['الخدمات', 'الحلول', 'الانظمة'],
20
        [
21
            'الذهبية', 'الذكية', 'المتطورة', 'المتقدمة', 'الدولية', 'المتخصصه', 'السريعة',
22
            'المثلى', 'الابداعية', 'المتكاملة', 'المتغيرة', 'المثالية',
23
        ],
24
    ];
25
 
26
    protected static $companyPrefix = ['شركة', 'مؤسسة', 'مجموعة', 'مكتب', 'أكاديمية', 'معرض'];
27
 
28
    protected static $companySuffix = [
29
        ' ش.م.م',
30
        ' للتجاره العامه',
31
        'للأجهزة الطبيه',
32
        'للتوريدات',
33
        'للمقاولات',
34
        'للتطوير العقاري',
35
        'للدعايه و الاعلان',
36
        'للحلول المتقدمه',
37
        'للخدمات الدولية',
38
        'الدولية',
39
        'للانظمة المتكاملة',
40
    ];
41
 
42
    /**
43
     * @example 'مؤسسة'
44
     *
45
     * @return string
46
     */
47
    public function companyPrefix()
48
    {
49
        return static::randomElement(self::$companyPrefix);
50
    }
51
 
52
    /**
53
     * @example 'الحلول المتقدمة'
54
     */
55
    public function catchPhrase()
56
    {
57
        $result = [];
58
 
59
        foreach (static::$catchPhraseWords as &$word) {
60
            $result[] = static::randomElement($word);
61
        }
62
 
63
        return implode(' ', $result);
64
    }
65
 
66
    /**
67
     * example 010101010
68
     */
69
    public static function companyTaxIdNumber()
70
    {
71
        $partialValue = static::numerify(str_repeat('#', 9));
72
 
73
        return Luhn::generateLuhnNumber($partialValue);
74
    }
75
 
76
    /**
77
     * example 010101
78
     */
79
    public static function companyTradeRegisterNumber()
80
    {
81
        $partialValue = static::numerify(str_repeat('#', 6));
82
 
83
        return Luhn::generateLuhnNumber($partialValue);
84
    }
85
}