Didn't you just shift the branch to the calculateDiscount() function?

Not necessarily.

   return 1 - user.isPremiumMember * 0.1;
would also cut it.