No owner of real property within the corporate limits of the City nor any agent having control of the same shall permit any gate to be or to remain so constructed as to enable the same to be swung over or across any portion of the sidewalk in front of such premises unless such gate is hung on self-closing hinges or has attached thereto weights, springs or other devices, so that such gate shall swing back from the sidewalk and not obstruct the same.