ConfigLexiconStrictness.php 900 B

123456789101112131415161718192021222324252627282930
  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 NCU\Config\Lexicon;
  8. /**
  9. * Strictness regarding using not-listed config keys
  10. *
  11. * - **ConfigLexiconStrictness::IGNORE** - fully ignore
  12. * - **ConfigLexiconStrictness::NOTICE** - ignore and report
  13. * - **ConfigLexiconStrictness::WARNING** - silently block (returns $default) and report
  14. * - **ConfigLexiconStrictness::EXCEPTION** - block (throws exception) and report
  15. *
  16. * @experimental 31.0.0
  17. */
  18. enum ConfigLexiconStrictness {
  19. /** @experimental 31.0.0 */
  20. case IGNORE; // fully ignore
  21. /** @experimental 31.0.0 */
  22. case NOTICE; // ignore and report
  23. /** @experimental 31.0.0 */
  24. case WARNING; // silently block (returns $default) and report
  25. /** @experimental 31.0.0 */
  26. case EXCEPTION; // block (throws exception) and report
  27. }