NFPA 70 (NEC), section 110.26 "Spaces About Electrical Equipment" is the code and section which covers this violation.
Specifically, "the space equal to the equipment's width and depth extending from the floor to a height of 6 ft above the equipment or to the structural ceiling (whichever is lower) is dedicated to the electrical installation. No piping, ducts, or foreign equipment shall be located in this zone." Additionally, there is a "working space" in front of the panel covered by this code section which is usually about 3' (depends on voltage, etc.) and a minimum of 30" wide (or panel width whichever is greater) and up to a height from the floor of 6-1/2 ft minimum (or the height of the equipment, whichever is greater).