Security Deposit Not Returned — Pennsylvania

I publish illustrative scenarios prepared by my practice. All participants and conversations are fictional. The fictional posts are not posts by real users, accounts of client experiences, or reports of actual results.
Illustrative scenario prepared by my practice.
For informational purposes only. This is not legal advice. Laws vary by jurisdiction. Consult a qualified attorney for advice specific to your situation.
Hypothetical question

I'm dealing with a situation in Pennsylvania and need some guidance.

noise complaint retaliation by landlord. I've been dealing with this for about 5 months now and the situation isn't improving.

I have been in this property for 7 years. My monthly rent is $1,858. I have a written lease.

What's the typical outcome in situations like this?