| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | 17 | private function turn($key, callable $closure = null) |
|
| 49 | { |
||
| 50 | 17 | $key = 'heyman_ignore_'.$key; |
|
| 51 | |||
| 52 | 17 | $current = config($key); |
|
| 53 | 17 | $this->changeMode($key); |
|
| 54 | |||
| 55 | 17 | if (is_null($closure)) { |
|
| 56 | 16 | return; |
|
| 57 | } |
||
| 58 | 1 | $result = $closure(); |
|
| 59 | 1 | config()->set($key, $current); |
|
| 60 | |||
| 61 | 1 | return $result; |
|
| 62 | } |
||
| 75 |