rspec/rules/S1774/description.adoc
Rudy Regazzoni 42e27b9916
Modify S1774: Migrate to LayC - remove ternary expression (#3288)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-10-19 10:28:33 +02:00

4 lines
394 B
Plaintext

Ternary expressions, while concise, can often lead to code that is difficult to read and understand, especially when they are nested or complex.
Prioritizing readability fosters maintainability and reduces the likelihood of bugs.
Therefore, they should be removed in favor of more explicit control structures, such as `if`/`else` statements, to improve the clarity and readability of the code.