Apply suggestions from code review
Switch to `isWritable` Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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} */
|
||||
|
||||
@@ -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} */
|
||||
|
||||
Reference in New Issue
Block a user