Conditions | 5 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 7.1941 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | protected function getConfig($name, $default = null) |
||
29 | 1 | { |
|
30 | if (!function_exists('config') || !function_exists('app')) { |
||
31 | 1 | return $default; |
|
32 | } |
||
33 | try { |
||
34 | $config = config(); |
||
35 | 1 | } catch (\Exception $e) { |
|
36 | 1 | return $default; |
|
37 | 1 | } |
|
38 | $configName = "cache.{$name}"; |
||
39 | if (!$config->has($configName)) { |
||
40 | return $default; |
||
41 | } |
||
42 | |||
43 | return $config->get($configName)->toArray(); |
||
44 | } |
||
46 |