Total Complexity | 12 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class Gender implements \Validate\Contracts\Validate |
||
8 | { |
||
9 | use GetDataTrait; |
||
10 | |||
11 | public static function toDatabase($gender) |
||
14 | } |
||
15 | |||
16 | public static function filter(string $gender) |
||
25 | } |
||
26 | |||
27 | public static function toUser($gender) |
||
28 | { |
||
29 | if($gender == 'M') { |
||
30 | return 'Masculino'; |
||
31 | } |
||
32 | |||
33 | if($gender == 'F') { |
||
34 | return 'Feminino'; |
||
35 | } |
||
36 | |||
37 | return 'Unissex'; |
||
38 | } |
||
39 | |||
40 | public static function validate($gender) |
||
49 | } |
||
50 | |||
51 | public static function isSame(string $to, string $from) |
||
57 |