Change signature of CRM_Core_Payment::doRefund(&$params) to not receive $params as a reference
This is a proposal by @mattwire which is mostly stylistic
pros - we have been moving away from receiving as reference - less scope for people to try to achieve odd things in there
cons - less consistent with doPayment - would need to do a civi universe or whatever that things is of Tims to find what processors might need to be patched to cope - less opportunity for payment processors to tweak things