The iPhone is not used as a disk so you can disconnect it at anytime without any damage. You do not have to eject it first.
It's definitely better if you eject it before pulling the cable but it most likely won't screw anything up if it's just sitting there charging. I've pulled mine out without ejecting a few times and no harm done.
There is absolutely no need to eject it. It's 100% safe to unplug it as long as it's not syncing. I bet there's an Apple document about this.
Edit: Page 11 of the user guide:
View attachment 155083