TestConfigLexicon_N.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace Tests\lib\Config;
  8. use NCU\Config\IUserConfig;
  9. use NCU\Config\Lexicon\ConfigLexiconEntry;
  10. use NCU\Config\Lexicon\ConfigLexiconStrictness;
  11. use NCU\Config\Lexicon\IConfigLexicon;
  12. use NCU\Config\ValueType;
  13. use OCP\IAppConfig;
  14. class TestConfigLexicon_N implements IConfigLexicon {
  15. public const APPID = 'lexicon_test_n';
  16. public function getStrictness(): ConfigLexiconStrictness {
  17. return ConfigLexiconStrictness::NOTICE;
  18. }
  19. public function getAppConfigs(): array {
  20. return [
  21. new ConfigLexiconEntry('key1', ValueType::STRING, 'abcde', 'test key', true, IAppConfig::FLAG_SENSITIVE),
  22. new ConfigLexiconEntry('key2', ValueType::INT, 12345, 'test key', false)
  23. ];
  24. }
  25. public function getUserConfigs(): array {
  26. return [
  27. new ConfigLexiconEntry('key1', ValueType::STRING, 'abcde', 'test key', true, IUserConfig::FLAG_SENSITIVE),
  28. new ConfigLexiconEntry('key2', ValueType::INT, 12345, 'test key', false)
  29. ];
  30. }
  31. }