Inspectopedia
 
2024.3

Conditional can be pushed inside branch expression

Info
New
Last modified: 03 December 2024

Reports conditional expressions with then and else branches that are similar enough so that the expression can be moved inside. This action shortens the code.

Example:

After the quick-fix is applied:

New in 2017.2