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