1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-22 16:29:55 +01:00

Remove BC break

This commit is contained in:
Tim Düsterhus 2013-03-04 17:32:57 +01:00
parent b3ebffeeed
commit b7b8b5cb43

@ -37,7 +37,7 @@ class Internet extends \Faker\Provider\Base
*/
public final function safeEmail()
{
return preg_replace('/\s/', '', $this->userName() . '@' . $this->safeEmailDomain());
return preg_replace('/\s/', '', $this->userName() . '@' . static::safeEmailDomain());
}
/**
@ -66,9 +66,8 @@ class Internet extends \Faker\Provider\Base
/**
* @example 'example.org'
* @param boolean $knownTLD If set to true only domains with a well known TLD (i.e. com, org and net) are returned.
*/
public final function safeEmailDomain($knownTLD = false)
public static final function safeEmailDomain()
{
$domains = array(
'example.com',
@ -76,16 +75,7 @@ class Internet extends \Faker\Provider\Base
'example.net'
);
if (!$knownTLD) {
$domains[] = '*.example';
$domains[] = '*.test';
$domains[] = '*.invalid';
$domains[] = '*.lan';
}
$domain = static::randomElement($domains);
return str_replace('*', $this->domainWord(), $domain);
return static::randomElement($domains);
}
/**
* @example 'jdoe'