| Conditions | 5 |
| Paths | 4 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 8.125 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 1 | protected function getConfig($name, $default = null) |
|
| 30 | { |
||
| 31 | 1 | if (!function_exists('config') || !function_exists('app')) { |
|
| 32 | return $default; |
||
| 33 | } |
||
| 34 | try { |
||
| 35 | 1 | $config = config(); |
|
| 36 | 1 | } catch (\Exception $e) { |
|
| 37 | 1 | return $default; |
|
| 38 | } |
||
| 39 | $configName = "cache.{$name}"; |
||
| 40 | if (!$config->has($configName)) { |
||
| 41 | return $default; |
||
| 42 | } |
||
| 43 | |||
| 44 | return $config->get($configName)->toArray(); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.