Faker\Provider\ja_JP\Person::kanaName PHP Method

kanaName() public method

public kanaName ( string | null $gender = null ) : string
$gender string | null 'male', 'female' or null for any
return string
    public function kanaName($gender = null)
    {
        if ($gender === static::GENDER_MALE) {
            $format = static::randomElement(static::$maleKanaNameFormats);
        } elseif ($gender === static::GENDER_FEMALE) {
            $format = static::randomElement(static::$femaleKanaNameFormats);
        } else {
            $format = static::randomElement(array_merge(static::$maleKanaNameFormats, static::$femaleKanaNameFormats));
        }
        return $this->generator->parse($format);
    }