It is not from a Pennsylvania court, but I cannot see our courts finding any differently than Illinois.
A teacher's supervisor agreed to give the teacher a raise in return for the teacher kicking-back half the net increase to the supervisor. After the teacher retired, she was very upset when the Illinois agency responsible for pension calculations excluded that amount from her calculation. She challenged that finding. The basis for her claim was that she was never charged or convicted of any wrongdoing, but the court found against her.
Lesson for today? Apparently, illegal payments -- well, if discovered -- will not count towards pensions in Illinois (and likely in PA, too).
The case is Adams v. Board of Trustees of the Teachers' Retirement System of the State of Illinois, 2011 WL 670291 (Ill.App. 4 Dist.).