Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
35 | public function set($key, $value) |
||
36 | { |
||
37 | $aKey = Key::fromString($key); |
||
38 | $aValue = Value::fromString($value); |
||
39 | |||
40 | $setting = $this->find($aKey); |
||
41 | |||
42 | if (null === $setting) { |
||
43 | $setting = Setting::issue($aKey, $aValue, $this->section); |
||
44 | } |
||
45 | |||
46 | $setting->changeValue($aValue); |
||
47 | |||
48 | $this->settingRepository->save($setting); |
||
49 | } |
||
50 | |||
60 |