Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
55 | public static function getNetwork($name): ?NetworkEnum |
||
56 | { |
||
57 | $cleanedName = strtolower(trim($name)); |
||
58 | if (!key_exists($cleanedName, self::$telcoms)) |
||
59 | throw new ClubKonnectErrorException("No Telcom available with the name '$name'", 999); |
||
60 | if (!key_exists($cleanedName, self::$cache)) { |
||
61 | self::$cache[$cleanedName] = new NetworkEnum(self::$telcoms[$cleanedName], $cleanedName); |
||
62 | } |
||
63 | return self::$cache[$cleanedName]; |
||
64 | } |
||
65 | |||
71 |