Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | final class JSONConfDriver implements ConfDriverInterface |
||
6 | { |
||
7 | /** @var string $mainConfFile Path and file name of the top configuration file. */ |
||
8 | private string $mainConfFile; |
||
9 | |||
10 | /** @var string $confLocation Path of the configuration files. */ |
||
11 | private string $confLocation; |
||
12 | |||
13 | /** |
||
14 | * JSONConfDriver constructor. |
||
15 | * |
||
16 | * @param string $mainConfFile |
||
17 | * @param string $confLocation |
||
18 | */ |
||
19 | 2 | public function __construct(string $mainConfFile, string $confLocation) |
|
23 | 2 | } |
|
24 | |||
25 | /** |
||
26 | * Load and parse a configuration file and return an array. |
||
27 | * |
||
28 | * @param string | null $file If null, then load the main configuration file |
||
29 | * |
||
30 | * @return array |
||
31 | */ |
||
32 | /** |
||
33 | * @param string | null $file |
||
34 | * |
||
35 | * @return array |
||
36 | * @throws \JsonException |
||
37 | */ |
||
38 | 2 | public function parseConfigurationFile(?string $file = null): array |
|
46 |