Skip to content

Conversation

@BeanBois
Copy link

@BeanBois BeanBois commented Nov 30, 2025

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • [x ] Refactor
  • Chore
  • CI/CD or Tests

What this PR does / why we need it:

Fix #332
The updateStatus function relies on much conditional checking, even though within each condition, code is pretty much the same. This PR redelegates the unnecessary conditional checkings within the updateStatus function, and only does so when it is necessary. Effectively, there is lesser code repetition, and the code becomes more maintainable.

Pre-submission checklist:

  • [ x] Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: resolve cyclomatic complexity problem.

1 participant