Inspectopedia
 
2024.3

If-Then foldable to '?:'

Info
New
Last modified: 03 December 2024

Reports if-then expressions that can be folded into elvis (?:) expressions.

Example:

The quick fix converts the if-then expression into an elvis (?:) expression: