Apply suggestions from code review

Switch to `isWritable`

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Philipp 2023-03-27 00:17:40 +02:00 committed by Philipp
parent 90a5814a7f
commit 36e21cacc9
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
9 changed files with 26 additions and 26 deletions

View file

@ -66,7 +66,7 @@ interface IManageConfigValues
*
* @return bool true, if set is disabled
*/
public function isSetDisabled(string $cat, string $key): bool;
public function isWritable(string $cat, string $key): bool;
/**
* Sets a configuration value for system config

View file

@ -81,9 +81,9 @@ class DatabaseConfig implements IManageConfigValues
}
/** {@inheritDoc} */
public function isSetDisabled(string $cat, string $key): bool
public function isWritable(string $cat, string $key): bool
{
return $this->cache->getSource($cat, $key) >= Cache::SOURCE_ENV;
return $this->cache->getSource($cat, $key) < Cache::SOURCE_ENV;
}
/** {@inheritDoc} */

View file

@ -69,9 +69,9 @@ class ReadOnlyFileConfig implements IManageConfigValues
}
/** {@inheritDoc} */
public function isSetDisabled(string $cat, string $key): bool
public function isWritable(string $cat, string $key): bool
{
return $this->configCache->getSource($cat, $key) >= Cache::SOURCE_ENV;
return $this->configCache->getSource($cat, $key) < Cache::SOURCE_ENV;
}
/** {@inheritDoc} */