File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,12 @@ public static function generate_person( string $country_code = '' ) {
109109 $ first_name = $ faker ->firstName ( $ faker ->randomElement ( array ( 'male ' , 'female ' ) ) );
110110 $ last_name = $ faker ->lastName ();
111111
112+ if ( $ faker ->randomDigit () < 3 ) {
113+ // 30% chance for no capitalization.
114+ $ first_name = strtolower ( $ first_name );
115+ $ last_name = strtolower ( $ last_name );
116+ }
117+
112118 $ person = array (
113119 'first_name ' => $ first_name ,
114120 'last_name ' => $ last_name ,
@@ -177,6 +183,11 @@ public static function generate_company( string $country_code = '' ) {
177183 }
178184 }
179185
186+ if ( $ faker ->randomDigit () < 3 ) {
187+ // 30% chance for no capitalization.
188+ $ last_names = array_map ( 'strtolower ' , $ last_names );
189+ }
190+
180191 // Make sure all the company-related strings draw from the same set of last names that were previously generated.
181192 $ person_provider = self ::get_provider_instance ( $ faker , 'Person ' );
182193 $ reflected_provider = new \ReflectionClass ( $ person_provider );
You can’t perform that action at this time.
0 commit comments