[REF] Duplicate & unshare processFormContribution
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 19 Dec 2021 22:17:57 +0000 (11:17 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 19 Dec 2021 22:17:57 +0000 (11:17 +1300)
commit2414241f772d01f0b91ad6e8b7f83c87ce343c56
tree0305b4f2ae41170a4a1344f7e760adc796aab28d
parent08814830e9061bdb39bb6a926d0c1c38e5d81a16
[REF] Duplicate & unshare processFormContribution

The only way I've managed to break up these big toxic functions is divide & conquer. While it seems
counter-intuitive to not doing things in more than one place in practice much of the
code is form-relevant and the the code before, during and after these functions
does a whole lot of extra work to share stuff that they don't really have in common.

This dates back pre-api when the only copy of the business logic often was on the forms....
CRM/Contribute/Form/Contribution.php
CRM/Contribute/Form/Contribution/Confirm.php