Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public function codeFromSport($sport) : string |
||
36 | { |
||
37 | $sport = strtolower($sport); |
||
38 | $codes = static::getMap(); |
||
39 | |||
40 | if (array_key_exists($sport, $codes)) { |
||
41 | return $codes[$sport]; |
||
42 | } elseif (array_key_exists(self::OTHER, $codes)) { |
||
43 | return $codes[self::OTHER]; |
||
44 | } |
||
45 | |||
46 | return ''; |
||
47 | } |
||
48 | } |
||
49 |