Total Complexity | 8 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Config |
||
6 | { |
||
7 | /** @const string */ |
||
8 | private const DEFAULT_CONFIG_PATH = __DIR__ . '/Config/server.php'; |
||
9 | |||
10 | /** @var array */ |
||
11 | protected static $config = []; |
||
12 | |||
13 | /** |
||
14 | * Load default application configs. |
||
15 | * |
||
16 | * @param string|array $config |
||
17 | * @param bool $force |
||
18 | * |
||
19 | * @return void |
||
20 | */ |
||
21 | 4 | public static function set($config = null, bool $force = false) |
|
31 | } |
||
32 | 2 | } |
|
33 | |||
34 | /** |
||
35 | * Get config. |
||
36 | * |
||
37 | * @param string|null $key Key to extract. |
||
38 | * |
||
39 | * @return mixed |
||
40 | */ |
||
41 | 6 | public static function get(string $key = null) |
|
63 |