| Total Complexity | 6 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 86.67% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Prefix implements PrefixInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $malePrefix; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $femalePrefix; |
||
| 20 | |||
| 21 | 4 | public function __construct(string $malePrefix = null, string $femalePrefix = null) |
|
| 22 | { |
||
| 23 | 4 | $this->malePrefix = $malePrefix ?? 'Уважаемый'; |
|
| 24 | 4 | $this->femalePrefix = $femalePrefix ?? 'Уважаемая'; |
|
| 25 | 4 | } |
|
| 26 | |||
| 27 | 2 | public function getMalePrefix(): string |
|
| 28 | { |
||
| 29 | 2 | return $this->malePrefix; |
|
| 30 | } |
||
| 31 | |||
| 32 | 3 | public function getFemalePrefix(): string |
|
| 35 | } |
||
| 36 | |||
| 37 | 1 | public function getPrefixByGender(Gender $gender): string |
|
| 46 | } |
||
| 47 | } |
||
| 49 |