mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-03-22 16:29:55 +01:00
Merge pull request #99 from alchy58/sanitize-email-whitespaces
Remove spaces in others generated emails.
This commit is contained in:
commit
4a1e258d06
@ -38,7 +38,7 @@ class Internet extends \Faker\Provider\Base
|
||||
*/
|
||||
public function safeEmail()
|
||||
{
|
||||
return $this->userName() . '@example.' . static::randomElement(static::$safeEmailTld);
|
||||
return preg_replace('/\s/', '', $this->userName() . '@example.' . static::randomElement(static::$safeEmailTld));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -46,7 +46,7 @@ class Internet extends \Faker\Provider\Base
|
||||
*/
|
||||
public function freeEmail()
|
||||
{
|
||||
return $this->userName() . '@' . static::freeEmailDomain();
|
||||
return preg_replace('/\s/', '', $this->userName() . '@' . static::freeEmailDomain());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -54,7 +54,7 @@ class Internet extends \Faker\Provider\Base
|
||||
*/
|
||||
public function companyEmail()
|
||||
{
|
||||
return $this->userName() . '@' . $this->domainName();
|
||||
return preg_replace('/\s/', '', $this->userName() . '@' . $this->domainName());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user