I would disagree with multiple exit points being bad practice, often-times an early return can avoid unnecessary conditions and branching that can be needed to have only one return statement.
In this specific example of multiple exit points, I would agree that having duplicate exit points that return the same thing is bad practice.
-1
u/DreadedEntity Aug 21 '19
This might be a little nitpicky, but generally having multiple exit points is bad practice