Improve encapsulation

This commit is contained in:
Philipp 2023-01-11 22:00:29 +01:00
parent 11a8bd17e3
commit fef10e8a57
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
4 changed files with 21 additions and 24 deletions

View file

@ -57,7 +57,7 @@ class ConfigTransaction implements ISetConfigValuesTransactionally
/** {@inheritDoc} */
public function delete(string $cat, string $key): ISetConfigValuesTransactionally
{
$this->cache->delete($cat, $key, Cache::SOURCE_DATA);
$this->cache->delete($cat, $key);
$this->changedConfig = true;
return $this;
@ -72,7 +72,7 @@ class ConfigTransaction implements ISetConfigValuesTransactionally
}
try {
$this->config->load($this->cache);
$this->config->setCacheAndSave($this->cache);
$this->cache = clone $this->config->getCache();
} catch (\Exception $e) {
throw new ConfigPersistenceException('Cannot save config', $e);