Skip to content

refactor(AppConfig): readability improvements for loadConfig()#58757

Draft
joshtrichards wants to merge 11 commits intomasterfrom
jtr/refactor-appconfig-misc
Draft

refactor(AppConfig): readability improvements for loadConfig()#58757
joshtrichards wants to merge 11 commits intomasterfrom
jtr/refactor-appconfig-misc

Conversation

@joshtrichards
Copy link
Member

  • Resolves: #

Summary

Refactors AppConfig::loadConfig() for readability and maintainability without changing intended behavior.

What's changed

  • Improved variable names for intent clarity
  • Extracted some logic into helper methods
  • Added defensive shape checks
  • Added/tightened comments/docblocks

Why

  • Makes loadConfig() easier to reason about and review.
  • Isolates cache hydration and query construction.
  • Preserves behavior/performance characteristics
  • Minor: Adds robustness against malformed/partial local-cache payloads.

TODO

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Reduces repeated indexing and improves scanability.

Signed-off-by: Josh <josh.t.richards@gmail.com>
Unlikely but..

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 34 milestone Mar 6, 2026
@joshtrichards joshtrichards added the ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) label Mar 6, 2026
Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant