Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 4 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
56 | 5 | public static function createConfig($path) |
|
57 | { |
||
58 | 5 | $config = new Config(); |
|
59 | |||
60 | // load global config |
||
61 | 5 | $file = new JsonFile($path); |
|
62 | 5 | if ($file->exists()) { |
|
63 | 4 | $config->merge($file->read()); |
|
64 | 4 | } |
|
65 | |||
66 | 5 | $config->setConfigSource(new JsonConfigSource($file)); |
|
67 | |||
68 | 5 | return $config; |
|
69 | } |
||
70 | } |
||
71 |