Use a switch with direct return (no break) for clarity. Assigning a value and re-assigning it in certain cases is always less readable then just returning a single result for one specific condition. There is no "default case" here, just three options with three corresponding values.