Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public static function getClass() |
||
18 | { |
||
19 | if (false === ($alias = getenv(self::ENV_VAR))) { |
||
20 | throw new \LogicException('Cannot obtain kernel alias from "' . self::ENV_VAR . '"" ENV variable'); |
||
21 | } |
||
22 | |||
23 | if (!array_key_exists($alias, self::$map)) { |
||
24 | throw new \LogicException('Invalid kernel alias: ' . $alias); |
||
25 | } |
||
26 | |||
27 | return self::$map[$alias]; |
||
28 | } |
||
29 | } |
||
30 |