Skip to content

Commit

Permalink
Merge pull request #17093 from eileenmcnaughton/cont
Browse files Browse the repository at this point in the history
[NFC] Remove calculation of unused parameter
  • Loading branch information
seamuslee001 authored Apr 20, 2020
2 parents e6c8c50 + 60843b8 commit 178b7e3
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions CRM/Contribute/Form/AdditionalInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,16 +282,8 @@ public static function postProcessCommon(&$params, &$formatted, &$form) {
$params['receipt_date'] = $formatted['receipt_date'] = date('YmdHis');
}

//special case to handle if all checkboxes are unchecked
$customFields = CRM_Core_BAO_CustomField::getFields('Contribution',
FALSE,
FALSE,
CRM_Utils_Array::value('financial_type_id',
$params
)
);
$formatted['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
CRM_Utils_Array::value('id', $params, NULL),
$params['id'] ?? NULL,
'Contribution'
);
}
Expand All @@ -307,6 +299,7 @@ public static function postProcessCommon(&$params, &$formatted, &$form) {
* is it credit card contribution.
*
* @return array
* @throws \CRM_Core_Exception
*/
public static function emailReceipt(&$form, &$params, $ccContribution = FALSE) {
$form->assign('receiptType', 'contribution');
Expand Down Expand Up @@ -368,7 +361,7 @@ public static function emailReceipt(&$form, &$params, $ccContribution = FALSE) {

$date = CRM_Utils_Date::format($params['credit_card_exp_date']);
$date = CRM_Utils_Date::mysqlToIso($date);
$form->assign('credit_card_type', CRM_Utils_Array::value('credit_card_type', $params));
$form->assign('credit_card_type', $params['credit_card_type'] ?? NULL);
$form->assign('credit_card_exp_date', $date);
$form->assign('credit_card_number',
CRM_Utils_System::mungeCreditCard($params['credit_card_number'])
Expand Down

0 comments on commit 178b7e3

Please sign in to comment.