Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Commit

Permalink
Move lowercasing out of transliterate()
Browse files Browse the repository at this point in the history
Also fixes the missing lowercasing with the "no intl-ext" fallback.
  • Loading branch information
vlakoff committed Oct 4, 2015
1 parent 1003a57 commit cd1b2ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Faker/Provider/Internet.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static function toAscii($string)

private static function transliterate($string)
{
$transId = 'Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC; Lower();';
$transId = 'Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC;';
if (function_exists('transliterator_transliterate') && $transliterator = \Transliterator::create($transId)) {
$transString = $transliterator->transliterate($string);
} else {
Expand Down Expand Up @@ -225,7 +225,7 @@ public function userName()
$format = static::randomElement(static::$userNameFormats);
$username = static::bothify($this->generator->parse($format));

return static::transliterate($username);
return static::toLower(static::transliterate($username));
}
/**
* @example 'fY4èHdZv68'
Expand All @@ -252,7 +252,7 @@ public function domainWord()
{
$lastName = $this->generator->format('lastName');

return static::transliterate($lastName);
return static::toLower(static::transliterate($lastName));
}

/**
Expand Down

0 comments on commit cd1b2ce

Please sign in to comment.