LPS-35170 - replace switch statements with if else blocks