diff --git a/src/Faker/Provider/uk_UA/Color.php b/src/Faker/Provider/uk_UA/Color.php new file mode 100644 index 00000000..197cc3b6 --- /dev/null +++ b/src/Faker/Provider/uk_UA/Color.php @@ -0,0 +1,23 @@ +generator->parse($format)) - ) - ); + return static::toLower(static::toAscii(static::bothify($this->generator->parse($format)))); } /** @@ -25,10 +37,11 @@ class Internet extends \Faker\Provider\Internet */ public function domainWord() { - $company = $this->generator->format('companyUrl'); - $company = str_replace(' ', '-', $company); - $company = Transliteration::transliterate($company); + $company = $this->generator->format('company'); + $companyElements = explode(' ', $company); + $company = $companyElements[0]; + $company = preg_replace('/\W/u', '', $company); - return $company; + return static::toLower(static::toAscii($company)); } } diff --git a/src/Faker/Provider/uk_UA/Transliteration.php b/src/Faker/Provider/uk_UA/Transliteration.php deleted file mode 100644 index 654f22b0..00000000 --- a/src/Faker/Provider/uk_UA/Transliteration.php +++ /dev/null @@ -1,60 +0,0 @@ -"", - "`"=>"", - "а"=>"a","А"=>"a", - "б"=>"b","Б"=>"b", - "в"=>"v","В"=>"v", - "г"=>"g","Г"=>"g", - "д"=>"d","Д"=>"d", - "е"=>"e","Е"=>"e", - "ж"=>"zh","Ж"=>"zh", - "з"=>"z","З"=>"z", - "и"=>"i","И"=>"i", - "й"=>"y","Й"=>"y", - "к"=>"k","К"=>"k", - "л"=>"l","Л"=>"l", - "м"=>"m","М"=>"m", - "н"=>"n","Н"=>"n", - "о"=>"o","О"=>"o", - "п"=>"p","П"=>"p", - "р"=>"r","Р"=>"r", - "с"=>"s","С"=>"s", - "т"=>"t","Т"=>"t", - "у"=>"u","У"=>"u", - "ф"=>"f","Ф"=>"f", - "х"=>"h","Х"=>"h", - "ц"=>"c","Ц"=>"c", - "ч"=>"ch","Ч"=>"ch", - "ш"=>"sh","Ш"=>"sh", - "щ"=>"sch","Щ"=>"sch", - "ъ"=>"","Ъ"=>"", - "ы"=>"y","Ы"=>"y", - "ь"=>"","Ь"=>"", - "э"=>"e","Э"=>"e", - "ю"=>"yu","Ю"=>"yu", - "я"=>"ya","Я"=>"ya", - "і"=>"i","І"=>"i", - "ї"=>"yi","Ї"=>"yi", - "є"=>"e","Є"=>"e" - ); - - return strtr($string, $replace); - } -}