aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/AppConfig.php8
-rw-r--r--lib/private/Config/UserConfig.php10
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php
index bb439218015..71c958703e9 100644
--- a/lib/private/AppConfig.php
+++ b/lib/private/AppConfig.php
@@ -436,7 +436,7 @@ class AppConfig implements IAppConfig {
int $type,
): string {
$this->assertParams($app, $key, valueType: $type);
- if (!$this->compareRegisteredConfigValues($app, $key, $lazy, $type, $default)) {
+ if (!$this->matchAndApplyLexiconDefinition($app, $key, $lazy, $type, $default)) {
return $default; // returns default if strictness of lexicon is set to WARNING (block and report)
}
$this->loadConfig($app, $lazy);
@@ -730,7 +730,7 @@ class AppConfig implements IAppConfig {
int $type,
): bool {
$this->assertParams($app, $key);
- if (!$this->compareRegisteredConfigValues($app, $key, $lazy, $type)) {
+ if (!$this->matchAndApplyLexiconDefinition($app, $key, $lazy, $type)) {
return false; // returns false as database is not updated
}
$this->loadConfig(null, $lazy);
@@ -1573,13 +1573,13 @@ class AppConfig implements IAppConfig {
}
/**
- * verify and compare current use of config values with defined lexicon
+ * match and apply current use of config values with defined lexicon
*
* @throws AppConfigUnknownKeyException
* @throws AppConfigTypeConflictException
* @return bool TRUE if everything is fine compared to lexicon or lexicon does not exist
*/
- private function compareRegisteredConfigValues(
+ private function matchAndApplyLexiconDefinition(
string $app,
string $key,
bool &$lazy,
diff --git a/lib/private/Config/UserConfig.php b/lib/private/Config/UserConfig.php
index b2242729d2b..78c43fc4321 100644
--- a/lib/private/Config/UserConfig.php
+++ b/lib/private/Config/UserConfig.php
@@ -711,7 +711,7 @@ class UserConfig implements IUserConfig {
ValueType $type,
): string {
$this->assertParams($userId, $app, $key);
- if (!$this->compareRegisteredConfigValues($app, $key, $lazy, $type, default: $default)) {
+ if (!$this->matchAndApplyLexiconDefinition($app, $key, $lazy, $type, default: $default)) {
return $default; // returns default if strictness of lexicon is set to WARNING (block and report)
}
$this->loadConfig($userId, $lazy);
@@ -1046,7 +1046,7 @@ class UserConfig implements IUserConfig {
ValueType $type,
): bool {
$this->assertParams($userId, $app, $key);
- if (!$this->compareRegisteredConfigValues($app, $key, $lazy, $type, $flags)) {
+ if (!$this->matchAndApplyLexiconDefinition($app, $key, $lazy, $type, $flags)) {
return false; // returns false as database is not updated
}
$this->loadConfig($userId, $lazy);
@@ -1816,12 +1816,12 @@ class UserConfig implements IUserConfig {
}
/**
- * verify and compare current use of config values with defined lexicon
+ * match and apply current use of config values with defined lexicon
*
* @throws UnknownKeyException
* @throws TypeConflictException
*/
- private function compareRegisteredConfigValues(
+ private function matchAndApplyLexiconDefinition(
string $app,
string $key,
bool &$lazy,
@@ -1837,7 +1837,7 @@ class UserConfig implements IUserConfig {
/** @var ConfigLexiconEntry $configValue */
$configValue = $configDetails['entries'][$key];
if ($type === ValueType::MIXED) {
- $type = $configValue->getValueType()->value; // we overwrite if value was requested as mixed
+ $type = $configValue->getValueType(); // we overwrite if value was requested as mixed
} elseif ($configValue->getValueType() !== $type) {
throw new TypeConflictException('The user config key ' . $app . '/' . $key . ' is typed incorrectly in relation to the config lexicon');
}