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] get rid of variable variable structure #17089

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Apr 16, 2020

Overview

Readability improvement

Before

$$date = 'blah'

After

$params['start_date'] = 'blah'

Technical Details

Variable variables are hard to read

Comments

@civibot
Copy link

civibot bot commented Apr 16, 2020

(Standard links)

@colemanw
Copy link
Member

retest this please

@@ -269,15 +268,11 @@ public static function create(&$params, &$ids = []) {
$excludeIsAdmin = TRUE;
}

$calcStatus = CRM_Member_BAO_MembershipStatus::getMembershipStatusByDate($start_date, $end_date, $join_date,
$calcStatus = CRM_Member_BAO_MembershipStatus::getMembershipStatusByDate($params['start_date'], $params['$end_date'], $params['join_date'],
Copy link
Contributor

Choose a reason for hiding this comment

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

@eileenmcnaughton there is a stray $ in the end_date

$contactmembership = $this->callAPISuccess("membership", "getsingle", [
"contact_id" => $contact["id"],
]);
$contactmembership = $this->callAPISuccessGetSingle('membership', ['contact_id' => $contact["id"],]);
Copy link
Contributor

Choose a reason for hiding this comment

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

minor thing but why the trailing ,? @eileenmcnaughton

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Jenkins didn't think it was minor

@colemanw colemanw merged commit c39503f into civicrm:master Apr 17, 2020
@colemanw colemanw deleted the memdate branch April 17, 2020 12:41
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