| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function delete(string $path = null): SettingsManagerContract |
||
| 23 | { |
||
| 24 | if (!$path) { |
||
| 25 | if ($this->model->modelSettings) { |
||
| 26 | $this->model->modelSettings->delete(); |
||
| 27 | } |
||
| 28 | } else { |
||
| 29 | $settings = $this->all(); |
||
| 30 | array_forget($settings, $path); |
||
| 31 | $this->apply($settings); |
||
| 32 | } |
||
| 33 | |||
| 34 | return $this; |
||
| 35 | } |
||
| 45 |