1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-04-21 16:01:56 +02:00

Fix lastName specific gender for ru_RU locale

This commit is contained in:
Omniglies 2019-08-15 22:04:57 +07:00
parent 176ae74eaa
commit 2a3a5804f8

View File

@ -165,13 +165,7 @@ class Person extends \Faker\Provider\Person
*/
public function lastName($gender = null)
{
if ($gender === static::GENDER_FEMALE) {
$lastNameRandomElement = static::randomElement(static::$lastName).'a';
}else{
$lastNameRandomElement = static::randomElement(static::$lastName);
}
return $this->generator->parse($lastNameRandomElement);
return ($gender === static::GENDER_FEMALE) ?
static::randomElement(static::$lastName) . 'a' : static::randomElement(static::$lastName);
}
}