Sast error: Break should only be used inside a loop
