Pennsylvania has an entire title of Code dedicated to fences.
§ 41 From and after the passage of this act, owners of improved and occupied land shall erect and maintain an equal part of all line or division fences between them, nor shall any such owner be relieved from liability under the provisions of this act except by the consent of the adjoining owner. And if any owner of such improved and occupied land shall fail or neglect to erect or maintain his, her, or their share of such line or division fence the party aggrieved shall notify the county surveyor or, if there is no county surveyor in the county, then a county surveyor of any adjoining county, or, if the county surveyor in any adjoining county refuses to act, a surveyor appointed by a judge of the court of common pleas, who shall act as a fence viewer and whose duty it shall be to examine such line or division fence, so complained of; and if he finds said fence sufficient, the complainant shall pay the cost of his service; but if he finds such fence insufficient, he shall so report to a justice of the peace or alderman, residing in the county where such fence is located, designating points and distances of such fence, whether a new fence is required or whether the old one can be repaired, and the probable costs of a new, or the repair of the old, fence; and said justice or alderman shall notify the delinquent owner of such improved and occupied land of the surveyor's report, and that his part of said fence, as found by the surveyor, be erected or repaired within forty days from the date of such notice; and if such notice be not complied with, the aggrieved party may cause said line or division fence to be erected or repaired, and the costs thereof collected, including the charge of the surveyor, from the delinquent owner of such improved and occupied land, as other debts are collected by law. The surveyor shall be entitled to such payment for acting as a fence viewer as he may fix, not, however, exceeding twenty-five dollars. Where the surveyor reports that he finds the fence complained of sufficient, the amount payable to the surveyor shall be paid by the complainant, but where he reports the fence insufficient, the amount payable to him shall be paid by the delinquent owner of such improved or occupied land: Provided, That no owner of improved land shall be compelled to build or repair fence during the months of December, January, February, and March: And provided further, That nothing herein contained shall be construed to apply to railroad companies.