Minor refactor of getViolationFor()