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

[NFC] Minor cleanup, return preferred parameter #12900

Merged
merged 1 commit into from
Oct 7, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor code clean up - no actual impact

Before

$result returned from Contribute_BAO_ContributionRecur::create

After

$recurring returned from Contribute_BAO_ContributionRecur::create

Technical Details

The result parameter is the same as $recurring (save()) returns $this. But
it's more correct to return $recurring than result as
a) it's defined as a Contribute_BAO_ContributionRecur object which is correct.
b) it's the object passed through hooks

Comments

The result parameter is the same as $recurring (save()) returns $this. But
it's more correct to return $recurring than result as
a) it's defined as a Contribute_BAO_ContributionRecur object which is correct.
b) it's the object passed through hooks
@civibot
Copy link

civibot bot commented Oct 7, 2018

(Standard links)

@eileenmcnaughton
Copy link
Contributor Author

@mattwire as discussed

@mattwire
Copy link
Contributor

mattwire commented Oct 7, 2018

This is basically code cleanup. It does have a small impact in that $recurring will now hold the result of any changes made by the hook but this is the correct/expected behaviour. Ok to merge

@eileenmcnaughton
Copy link
Contributor Author

fails unrelated, merigng based on Matt review

@eileenmcnaughton eileenmcnaughton merged commit 38c997d into civicrm:master Oct 7, 2018
@eileenmcnaughton eileenmcnaughton deleted the recur_tidy branch October 7, 2018 20:58
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