Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
57 | 15 | private function turn($key, callable $closure = null) |
|
58 | { |
||
59 | 15 | $key = 'heyman_ignore_'.$key; |
|
60 | |||
61 | 15 | $current = config($key); |
|
62 | 15 | $this->changeMode($key); |
|
63 | |||
64 | 15 | if (is_null($closure)) { |
|
65 | 14 | return; |
|
66 | } |
||
67 | 1 | $result = $closure(); |
|
68 | 1 | config()->set($key, $current); |
|
69 | |||
70 | 1 | return $result; |
|
71 | } |
||
84 |