| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class FieldSettingsManager extends AbstractSettingsManager |
||
| 8 | { |
||
| 9 | public function apply(array $settings = []): SettingsManagerContract |
||
| 10 | { |
||
| 11 | $this->model->settings = $settings; |
||
| 12 | $this->model->save(); |
||
| 13 | |||
| 14 | return $this; |
||
| 15 | } |
||
| 16 | |||
| 17 | public function delete(string $path = null): SettingsManagerContract |
||
| 18 | { |
||
| 19 | if (!$path) { |
||
| 20 | $settings = []; |
||
| 21 | } else { |
||
| 22 | $settings = $this->all(); |
||
| 23 | array_forget($settings, $path); |
||
| 24 | } |
||
| 25 | |||
| 26 | $this->apply($settings); |
||
| 27 | |||
| 28 | return $this; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function set(string $path, $value): SettingsManagerContract |
||
| 37 | } |
||
| 38 | } |
||
| 39 |