The office of alderman or justice of the peace shall be incompatible with the office of treasurer or tax collector or assessor of any city, borough, town or township of the first class and with the office of secretary or secretary-treasurer or tax collector or assessor of any township of the second class.
65 P.S. § 5.1