Cleared Sonar Major findings for missing curly braces.

Additionally this method was refactored to have a single return.