Description
SonarQube:
Merging collapsible if statements increases the code's readability.
Problem:
"If" statements broken into several parts.
Solution:
Merging "if" statements into one.
Where the problem occurs:
- https://github.com/openmrs/openmrs-module-registrationapp/blob/1.19.0/omod/src/main/java/org/openmrs/module/registrationapp/page/controller/EditSectionPageController.java#L237-L238
- https://github.com/openmrs/openmrs-module-registrationapp/blob/1.19.0/omod/src/main/java/org/openmrs/module/registrationapp/RegistrationAppUiUtils.java#L160-L162
- https://github.com/openmrs/openmrs-module-registrationapp/blob/1.19.0/omod/src/main/java/org/openmrs/module/registrationapp/RegistrationAppUiUtils.java#L168-L170
Support materials:
- explanation of the problem by SonarQube: https://sonar.openmrs.org/coding_rules#rule_key=squid%3AS1066