Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
Gender | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
getSalutation | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 |
1 | <?php |
2 | namespace Apie\CommonValueObjects; |
3 | |
4 | enum Gender: string |
5 | { |
6 | case MALE = 'M'; |
7 | case FEMALE = 'F'; |
8 | |
9 | final public function getSalutation(): string |
10 | { |
11 | return self::MALE === $this ? 'Mr.' : 'Mrs.'; |
12 | } |
13 | } |