Add code climate

Fixes #6
Replace ternary statement