[REF] towards cleanup of update membership code
authoreileen <emcnaughton@wikimedia.org>
Mon, 4 Mar 2019 04:11:20 +0000 (17:11 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 4 Mar 2019 22:34:00 +0000 (11:34 +1300)
commit5ed1203902d7bbade9341a8df800c88d33044736
tree58434ca6f6d1ee5682abfbd02911a081e5f7a632
parentfcc6fd6a83daec8b9cfac365c7f9dd05945fa0ce
[REF] towards cleanup of update membership code

This PR limits itself to siphoning off how the memberships are fetched & having that function
- return as an array of arrays rather than an array of objects
- index the array by id rather than membership type

This is a step towards the changes in https://github.com/civicrm/civicrm-core/pull/12542

& it should allow a separation of concerns relating to the LOADING of memberships from the
processing.

I note that the PR I'm looking at changes what gets loaded & that should be it's own PR
but also that there is an extraneous if() here - I didn't alter that because
it is a big white space change & doing on it's own will make that easy to review
CRM/Contribute/BAO/Contribution.php