| Conditions | 5 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 3 | public static function setConfig($config = null, bool $force = false) |
|
| 22 | { |
||
| 23 | 3 | if ( ! $force && ! empty(self::$config)) { |
|
| 24 | 1 | return; |
|
| 25 | } |
||
| 26 | |||
| 27 | 2 | if (is_array($config)) { |
|
| 28 | 1 | self::$config = $config; |
|
| 29 | 1 | } elseif (is_string($config)) { |
|
| 30 | 1 | self::$config = require $config ?? self::DEFAULT_CONFIG_PATH; |
|
| 31 | } |
||
| 61 |