Man ticketed for spitting on sidewalk