Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public static function create(string $environment): EnvironmentInterface |
||
12 | { |
||
13 | if ('prod' === $environment) { |
||
14 | return new ProdEnvironment(); |
||
15 | } |
||
16 | |||
17 | if ('dev' === $environment) { |
||
18 | return new DevEnvironment(); |
||
19 | } |
||
20 | |||
21 | throw new InvalidEnvironmentNameException(sprintf('Invalid environment %s', $environment)); |
||
22 | } |
||
24 |