| Total Complexity | 5 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class TtsVoiceFormat |
||
| 14 | { |
||
| 15 | const GENDER_MALE = 'm'; |
||
| 16 | const GENDER_FEMALE = 'f'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Language to which the voice corresponds |
||
| 20 | * |
||
| 21 | * @var Language |
||
| 22 | */ |
||
| 23 | private $language = null; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Gender to which the voice corresponds |
||
| 27 | * |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | private $gender = ''; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * TtsVoiceFormat constructor |
||
| 34 | * |
||
| 35 | * @param Language $language |
||
| 36 | * @param string $gender |
||
| 37 | * |
||
| 38 | * @throws InvalidGenderCodeException |
||
| 39 | */ |
||
| 40 | public function __construct(Language $language, string $gender) |
||
| 41 | { |
||
| 42 | $this->language = $language; |
||
| 43 | |||
| 44 | $this->setGender($gender); |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return Language |
||
| 49 | */ |
||
| 50 | public function getLanguage(): Language |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public function getGender(): string |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @param string $gender |
||
| 65 | * |
||
| 66 | * @throws InvalidGenderCodeException |
||
| 67 | */ |
||
| 68 | private function setGender(string $gender) |
||
| 79 |