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] Extract & share code to determine revenue recognition date. #16388

Merged
merged 1 commit into from
Jan 28, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor code extraction

Before

Code not shared, less efficient method used in one place

After

Code shared

Technical Details

We have moved the code to build contributionParams back to this form so we can start consolidating it within the form, not with an unrelated form

This also starts the process of consolidating building the 'contribution params' array

Comments

@civibot
Copy link

civibot bot commented Jan 26, 2020

(Standard links)

@civibot civibot bot added the master label Jan 26, 2020
@@ -1884,7 +1882,6 @@ protected function preparePaidEventProcessing($params): array {
}

$params['fee_level'] = $params['amount_level'];
$contributionParams['total_amount'] = $params['amount'];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved up higher

@eileenmcnaughton
Copy link
Contributor Author

test this please

}
}
if ($this->isPaymentOnExistingContribution()) {
$contributionParams['total_amount'] = $this->getParticipantValue('fee_amount');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved up higher

@eileenmcnaughton
Copy link
Contributor Author

test this please

@seamuslee001
Copy link
Contributor

@eileenmcnaughton there is a style issue here

===========================[ Identify Files ]===========================
PHP Files:
 * CRM/Event/Form/Participant.php
===============================[ php -l ]===============================
===============================[ phpcs  ]===============================


FILE: ...est/web/sites/all/modules/civicrm/CRM/Event/Form/Participant.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1834 | ERROR | [x] Expected 1 space after ":"; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Time: 502ms; Memory: 26MB

Found PHP errors

@seamuslee001
Copy link
Contributor

This looks like a good straight forward extraction adding merge on pass

@seamuslee001
Copy link
Contributor

Test fails look like they relate @eileenmcnaughton

This also starts the process of consolidating building the 'contribution params' array
@yashodha
Copy link
Contributor

@eileenmcnaughton The test failure isn't related, right?

@eileenmcnaughton
Copy link
Contributor Author

sigh no

@eileenmcnaughton eileenmcnaughton merged commit 4d5b93c into civicrm:master Jan 28, 2020
@eileenmcnaughton eileenmcnaughton deleted the event_ref branch January 28, 2020 20:10
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.

3 participants