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] Follow up cleanup #17788

Merged
merged 1 commit into from
Jul 13, 2020
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jul 11, 2020

Overview

This removes an IF block that relies on the always-true parameter

I'm pretty sure it just wasn't done last round as all the white space created a lot of noise

Before

If -> else exists but the condition for the IF is always true because this is the only place $cancelSubscription is referred to

https://github.com/civicrm/civicrm-core/pull/17788/files#diff-30a8e5b11544ab10573dea3f36cb9db2L202

After

Block removed

Technical Details

This is best viewed with the w=1 parameter - https://github.com/civicrm/civicrm-core/pull/17788/files?w=1 as it is otherwise hard to read. There are small additional cleanups:

  • comments
  • use statement along with shorter declaration later on
  • preferred functions on session (CRM_Core_Session::singleton())

Comments

This removes an IF block that relies on the always-true parameter

I'm pretty sure it just wasn't done last round as all the white space created a lot of noise
@civibot
Copy link

civibot bot commented Jul 11, 2020

(Standard links)

@civibot civibot bot added the master label Jul 11, 2020
@eileenmcnaughton
Copy link
Contributor Author

test this please

@@ -87,7 +87,7 @@ class CRM_Contribute_Form_ContributionRecur extends CRM_Core_Form {
/**
* Details of the subscription (recurring contribution) to be altered.
*
* @var array
* @var \CRM_Core_DAO
*/
protected $subscriptionDetails = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

It does seem to be a DAO, so now this initialization is weird.

Otherwise agree with everything in the PR and did a quick r-run seems ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@demeritcowboy ouch - but TBH I'd rather punt on that as the change is right & I'm not touching this form other than comments

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok

@seamuslee001
Copy link
Contributor

merging as per @demeritcowboy 's review

@seamuslee001 seamuslee001 merged commit 53ae66a into civicrm:master Jul 13, 2020
@seamuslee001 seamuslee001 deleted the update branch July 13, 2020 00:34
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