Skip to content
This repository
Browse code

Remove BC break

  • Loading branch information...
commit b7b8b5cb43a038e6356eacdaf8c170b4e3872639 1 parent b3ebffe
Tim Düsterhus authored March 04, 2013

Showing 1 changed file with 3 additions and 13 deletions. Show diff stats Hide diff stats

  1. 16  src/Faker/Provider/Internet.php
16  src/Faker/Provider/Internet.php
@@ -37,7 +37,7 @@ public function email()
37 37
      */
38 38
     public final function safeEmail()
39 39
     {
40  
-        return preg_replace('/\s/', '', $this->userName() . '@' . $this->safeEmailDomain());
  40
+        return preg_replace('/\s/', '', $this->userName() . '@' . static::safeEmailDomain());
41 41
     }
42 42
 
43 43
     /**
@@ -66,9 +66,8 @@ public static function freeEmailDomain()
66 66
     
67 67
     /**
68 68
      * @example 'example.org'
69  
-     * @param boolean $knownTLD If set to true only domains with a well known TLD (i.e. com, org and net) are returned.
70 69
      */
71  
-    public final function safeEmailDomain($knownTLD = false)
  70
+    public static final function safeEmailDomain()
72 71
     {
73 72
         $domains = array(
74 73
             'example.com',
@@ -76,16 +75,7 @@ public static function freeEmailDomain()
76 75
             'example.net'
77 76
         );
78 77
 
79  
-        if (!$knownTLD) {
80  
-            $domains[] = '*.example';
81  
-            $domains[] = '*.test';
82  
-            $domains[] = '*.invalid';
83  
-            $domains[] = '*.lan';
84  
-        }
85  
-
86  
-        $domain = static::randomElement($domains);
87  
-
88  
-        return str_replace('*', $this->domainWord(), $domain);
  78
+        return static::randomElement($domains);
89 79
     }
90 80
     /**
91 81
      * @example 'jdoe'

0 notes on commit b7b8b5c

Please sign in to comment.
Something went wrong with that request. Please try again.