Conditions | 5 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5.2742 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
25 | 4 | public static function get(string $key, $default = null) |
|
26 | { |
||
27 | 4 | $key = sprintf('%s.%s', static::CONFIG_NAMESPACE, $key); |
|
28 | 4 | if (static::$config !== null) { |
|
29 | 3 | return static::$config->get($key, $default); |
|
30 | } |
||
31 | 1 | if (!function_exists('app')) { |
|
32 | return $default; |
||
33 | } |
||
34 | 1 | if (!function_exists('config') || !app()->has('config')) { |
|
35 | 1 | return $default; |
|
36 | } |
||
37 | return config($key, $default); |
||
38 | } |
||
48 |