| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | 3 | public static function make(array $options, LoaderFactory $loader = null): ConfigInterface |
|
| 11 | { |
||
| 12 | 3 | $factory = new static($loader); |
|
| 13 | 3 | $type = array_path($options, 'type', 'php'); |
|
| 14 | |||
| 15 | 3 | if (!empty($options['environment'])) { |
|
| 16 | 2 | return $factory->forEnvironment($options['directory'], $options['environment'], $type); |
|
| 17 | } |
||
| 18 | |||
| 19 | 1 | return $factory->forDirectory($options['directory'], $type); |
|
| 20 | } |
||
| 21 | |||
| 43 |