Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 6 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
35 | 69 | public function isEnabled($key, $defaultValue = false) |
|
36 | { |
||
37 | try { |
||
38 | 69 | if ($this->config->has($key)) { |
|
39 | 52 | return (bool) $this->config->get($key, $defaultValue); |
|
40 | } else { |
||
41 | 9 | return (bool) $defaultValue; |
|
42 | } |
||
43 | 8 | } catch (Exception $e) { |
|
44 | 8 | return (bool) $defaultValue; |
|
45 | } |
||
46 | } |
||
47 | } |
||
48 |