The Rambam paskens like Rav that עד הכאה. The סמ"ג however paskens like R' Yochanan and asks on the Rambam why he didn't pasken like R' Yochanan.
The Kesef Mishna has an interesting answer. The Gemara says כתנאי and בן עזאי says עד כדי נזיפה like R' Yochanan. It was clear to the Rambam that we don't pasken like בן עזאי and therefore we can ignore R' Yochanan so he was left with a machlokes Rav and Shmuel and he paskened like Rav.
What does Rav mean when he says עד הכאה? The Rambam interprets it literally however, the בה"ל in Siman תר"ח quotes the Chinuch (רל"ט) that it is only עד שישהיה קרוב להכותו.