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