| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 7 | public function set() |
|
| 34 | { |
||
| 35 | 7 | $settings = glsr(OptionManager::class)->all(); |
|
| 36 | 7 | $currentSettings = glsr(Helper::class)->removeEmptyArrayValues($settings); |
|
| 37 | 7 | $defaultSettings = array_replace_recursive($this->get(), $currentSettings); |
|
| 38 | 7 | $updatedSettings = array_replace_recursive($settings, $defaultSettings); |
|
| 39 | 7 | update_option(OptionManager::databaseKey(), $updatedSettings); |
|
| 40 | 7 | return $defaultSettings; |
|
| 41 | } |
||
| 66 |