Inspectopedia
 
2024.3

If-Then foldable to '?.'

Info
New
Last modified: 03 December 2024

Reports if-then expressions that can be folded into safe-access (?.) expressions.

Example:

The quick fix converts the if-then expression into a safe-access (?.) expression: