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] Remove unused parameters #20301

Merged
merged 1 commit into from
May 19, 2021
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

[REF] Remove unused parameters

Before

We have duplicated this function so it is no longer shared. Many parts do not apply to the class it is now on

After

This takes out some parameters that are never passed in & stops returning things that are unused. Baby step

Technical Details

Comments

test cover in the EntryTest - I made minor cleanups to it for visibility

@civibot civibot bot added the master label May 14, 2021
@civibot
Copy link

civibot bot commented May 14, 2021

(Standard links)

This takes out some parameters that are never passed in & stops returning things that are unused
// @todo stop passing $ids (membership and userId may be set by this point)
$membership = CRM_Member_BAO_Membership::create($memParams, $ids);

// not sure why this statement is here, seems quite odd :( - Lobo: 12/26/2010
// related to: http://forum.civicrm.org/index.php/topic,11416.msg49072.html#msg49072
$membership->find(TRUE);

return [$membership, $renewalMode, $dates];
return $membership;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grepped universe for references to legacyProcessMembership - nothing outside of civicrm-core using it.

@eileenmcnaughton Just to double-check, the legacyProcessMembership in CRM/Contribute/Form/Contribution/Confirm.php and CRM/Batch/Form/Entry.php are essentially independent, right? So it looks like this change to the Batch/Form/Entry.php has no interaction with the Confirm.php one.

If so, I'd say go ahead and merge.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we have unit testes that cover the Confirm.php stuff as well

@seamuslee001
Copy link
Contributor

Merging as per review from @totten and myself

@seamuslee001 seamuslee001 merged commit fd8f3fc into civicrm:master May 19, 2021
@seamuslee001 seamuslee001 deleted the mem_move branch May 19, 2021 05:56
@eileenmcnaughton
Copy link
Contributor Author

thanks @totten & @seamuslee001

@eileenmcnaughton
Copy link
Contributor Author

It looks like converting it to protected would have made this easier & since you've done the review work to establish it it makes sense to to it now before that 'goes cold' - I also transferred hard-coding into the function

#20345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants