| Total Complexity | 6 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Config |
||
| 6 | { |
||
| 7 | /** @const string */ |
||
| 8 | const DEFAULT_CONFIG_PATH = __DIR__ . '/config/default.php'; |
||
| 9 | |||
| 10 | /** @var array */ |
||
| 11 | protected static $config = []; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Load default application configs. |
||
| 15 | * |
||
| 16 | * @param string|null $path |
||
| 17 | * |
||
| 18 | * @return void |
||
| 19 | */ |
||
| 20 | public static function setConfig($path = null) |
||
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Get config. |
||
| 29 | * |
||
| 30 | * @param string|null $key Key to extract. |
||
| 31 | * |
||
| 32 | * @return mixed |
||
| 33 | */ |
||
| 34 | public static function get(string $key = null) |
||
| 56 |