mirror of
https://github.com/friendica/friendica
synced 2025-04-29 03:04:22 +02:00
Apply suggestions from code review
Switch to `isWritable` Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
90a5814a7f
commit
36e21cacc9
9 changed files with 26 additions and 26 deletions
|
@ -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} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue