diff --git a/src/Faker/Provider/bg_BG/Internet.php b/src/Faker/Provider/bg_BG/Internet.php index 8a81be60..d68d5eec 100644 --- a/src/Faker/Provider/bg_BG/Internet.php +++ b/src/Faker/Provider/bg_BG/Internet.php @@ -7,4 +7,27 @@ class Internet extends \Faker\Provider\Internet protected static $safeEmailTld = array('org', 'com', 'net', 'bg'); protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com', 'mail.bg', 'abv.bg', 'dir.bg'); protected static $tld = array('bg', 'bg', 'bg', 'bg', 'bg', 'bg', 'com', 'biz', 'info', 'net', 'org'); + + /** + * @example 'jdoe' + */ + public function userName() + { + $format = static::randomElement(static::$userNameFormats); + return static::bothify($this->generator->parse($format)); + } + + /** + * @example 'faber' + */ + public function domainWord() + { + $company = $this->generator->format('company'); + $companyElements = explode(' ', $company); + $company = $companyElements[0]; + $company = preg_replace('/\W/', '', $company); + + return $company; + } + } diff --git a/src/Faker/Provider/bg_BG/Person.php b/src/Faker/Provider/bg_BG/Person.php index 1c6e6422..b177cb2c 100644 --- a/src/Faker/Provider/bg_BG/Person.php +++ b/src/Faker/Provider/bg_BG/Person.php @@ -83,8 +83,7 @@ class Person extends \Faker\Provider\Person public static function firstName() { - $gender = static::randomElement(array('Male', 'Female')); - return call_user_func(array('static', 'firstName'.$gender)); + return mt_rand(1, 100) <= 50 ? static::firstNameMale() : static::firstNameFemale(); } public static function firstNameMale() @@ -99,8 +98,7 @@ class Person extends \Faker\Provider\Person public static function lastName() { - $gender = static::randomElement(array('Male', 'Female')); - return call_user_func(array('static', 'lastName'.$gender)); + return mt_rand(1, 100) <= 50 ? static::lastNameMale() : static::lastNameFemale(); } public static function lastNameMale() diff --git a/src/Faker/Provider/fr_FR/Internet.php b/src/Faker/Provider/fr_FR/Internet.php new file mode 100644 index 00000000..66427650 --- /dev/null +++ b/src/Faker/Provider/fr_FR/Internet.php @@ -0,0 +1,47 @@ +generator->parse($format)))); + } + + /** + * @example 'faber' + */ + public function domainWord() + { + $company = $this->generator->format('company'); + $companyElements = explode(' ', $company); + $company = $companyElements[0]; + $company = preg_replace('/\W/', '', $company); + + return strtolower(static::toAscii($company)); + } + + +} \ No newline at end of file diff --git a/src/Faker/Provider/fr_FR/PhoneNumber.php b/src/Faker/Provider/fr_FR/PhoneNumber.php new file mode 100644 index 00000000..e1bac2ee --- /dev/null +++ b/src/Faker/Provider/fr_FR/PhoneNumber.php @@ -0,0 +1,14 @@ +generator->parse($format)); + } + + /** + * @example 'faber' + */ + public function domainWord() + { + $company = $this->generator->format('company'); + $companyElements = explode(' ', $company); + $company = $companyElements[0]; + $company = preg_replace('/,/', '', $company); + + return $company; + } + +}