Interplay of tidal evolution and stellar wind braking in the rotation of stars hosting massive close-in planets