[Import] [Ref] Iterate through the mapping of fields rather than a 'count'
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 5 May 2022 22:24:33 +0000 (10:24 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 6 May 2022 04:27:23 +0000 (16:27 +1200)
commit4473c68da0f021a1818231d5d15e500fe0bee458
tree45a72dfd7f2af334b6b245e1fa579f9cb3bd7ab7
parentaa3ca5c0169e18df3e1935533109097dfebab6ad
[Import] [Ref] Iterate through the mapping of fields rather than a 'count'

The mapper holds an array of mappings for each of the active fields.
The active field count holds a count of this array - switching to
a foreach loop means we can stop calculating extra stuff.

This PR doesn't start ripping that out - for legibility reasons - but it
will take out a whole lotta code....
CRM/Contact/Import/Form/MapField.php
CRM/Contact/Import/Parser/Contact.php
tests/phpunit/CRM/Contact/Import/Form/MapFieldTest.php
tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php