Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] Clarify variable & tighten use. #17016

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor code tidy up in heavily tested dedupe code

Before

$customTableToCopyFrom is always an array - but the code handles the possibility it is null

After

$customTableToCopyFrom is strictly an array and possibility of null handling is removed

Technical Details

moveContactBelongings is only called from one place which passes in all the function variables, so we don't need defaults.

The last parameter, is retrieved from self::getAffectedCustomTables which always returns an
array - so all the handling for it being NULL can be removed....

Comments

moveContactBelongings is only called from one place which passes in all the function variables, so we don't need defaults.

The last parameter,  is retrieved from self::getAffectedCustomTables which  always returns an
array - so all the handling for it being NULL can be removed....
@civibot
Copy link

civibot bot commented Apr 8, 2020

(Standard links)

@civibot civibot bot added the master label Apr 8, 2020
@colemanw
Copy link
Member

colemanw commented Apr 8, 2020

Code looks good and tests should cover it.

@eileenmcnaughton eileenmcnaughton merged commit 1fd3665 into civicrm:master Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants