Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function invoke(string $configPath): ConsoleConfigInterface |
||
22 | { |
||
23 | $configArray = json_decode(file_get_contents($configPath), true); |
||
24 | if (! is_array($configArray)) { |
||
25 | throw new InvalidConfigException('Unable to parse JSON config'); |
||
26 | } |
||
27 | |||
28 | return new ConsoleConfig($configArray); |
||
29 | } |
||
31 |