aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Config/ConfigManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Config/ConfigManager.php')
-rw-r--r--lib/private/Config/ConfigManager.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/private/Config/ConfigManager.php b/lib/private/Config/ConfigManager.php
index 67466617941..ed516abdcbf 100644
--- a/lib/private/Config/ConfigManager.php
+++ b/lib/private/Config/ConfigManager.php
@@ -9,13 +9,13 @@ declare(strict_types=1);
namespace OC\Config;
use JsonException;
-use NCU\Config\Exceptions\TypeConflictException;
-use NCU\Config\IUserConfig;
-use NCU\Config\Lexicon\ConfigLexiconEntry;
-use NCU\Config\Lexicon\Preset;
-use NCU\Config\ValueType;
use OC\AppConfig;
use OCP\App\IAppManager;
+use OCP\Config\Exceptions\TypeConflictException;
+use OCP\Config\IUserConfig;
+use OCP\Config\Lexicon\Entry;
+use OCP\Config\Lexicon\Preset;
+use OCP\Config\ValueType;
use OCP\IAppConfig;
use OCP\IConfig;
use OCP\Server;
@@ -50,10 +50,11 @@ class ConfigManager {
*
* This method should be mainly called during a new upgrade or when a new app is enabled.
*
- * @see ConfigLexiconEntry
+ * @param string|null $appId when set to NULL the method will be executed for all enabled apps of the instance
+ *
* @internal
* @since 32.0.0
- * @param string|null $appId when set to NULL the method will be executed for all enabled apps of the instance
+ * @see Entry
*/
public function migrateConfigLexiconKeys(?string $appId = null): void {
if ($appId === null) {
@@ -166,7 +167,7 @@ class ConfigManager {
*
* @throws TypeConflictException if previous value does not fit the expected type
*/
- private function migrateAppConfigValue(string $appId, ConfigLexiconEntry $entry): void {
+ private function migrateAppConfigValue(string $appId, Entry $entry): void {
$value = $this->appConfig->getValueMixed($appId, $entry->getRename(), lazy: null);
switch ($entry->getValueType()) {
case ValueType::STRING:
@@ -196,7 +197,7 @@ class ConfigManager {
*
* @throws TypeConflictException if previous value does not fit the expected type
*/
- private function migrateUserConfigValue(string $userId, string $appId, ConfigLexiconEntry $entry): void {
+ private function migrateUserConfigValue(string $userId, string $appId, Entry $entry): void {
$value = $this->userConfig->getValueMixed($userId, $appId, $entry->getRename(), lazy: null);
switch ($entry->getValueType()) {
case ValueType::STRING:
@@ -237,7 +238,7 @@ class ConfigManager {
return (float)$value;
}
- public function convertToBool(string $value, ?ConfigLexiconEntry $entry = null): bool {
+ public function convertToBool(string $value, ?Entry $entry = null): bool {
if (in_array(strtolower($value), ['true', '1', 'on', 'yes'])) {
$valueBool = true;
} elseif (in_array(strtolower($value), ['false', '0', 'off', 'no'])) {
@@ -245,7 +246,7 @@ class ConfigManager {
} else {
throw new TypeConflictException('Value cannot be converted to boolean');
}
- if ($entry?->hasOption(ConfigLexiconEntry::RENAME_INVERT_BOOLEAN) === true) {
+ if ($entry?->hasOption(Entry::RENAME_INVERT_BOOLEAN) === true) {
$valueBool = !$valueBool;
}