| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| 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 | if (is_null($closure)) { |
||
| 65 | 15 | return; |
|
| 66 | } |
||
| 67 | 15 | $result = $closure(); |
|
| 68 | 14 | config()->set($key, $current); |
|
| 69 | |||
| 70 | 1 | return $result; |
|
| 71 | 1 | } |
|
| 84 |