Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.2098 |
Changes | 0 |
1 | <?php |
||
37 | 1 | public function getPrefixByGender(Gender $gender): string |
|
38 | { |
||
39 | 1 | switch ($gender->getValue()) { |
|
40 | 1 | case Gender::GENDER_MALE: |
|
41 | return $this->getMalePrefix(); |
||
42 | 1 | case Gender::GENDER_FEMALE: |
|
43 | 1 | return $this->getFemalePrefix(); |
|
44 | default: |
||
45 | throw new \LogicException(\sprintf('Invalid type %s', $gender->getValue())); |
||
46 | } |
||
49 |