[Ref] Remove never-passed parameter
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 16 Jul 2021 05:55:57 +0000 (17:55 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 16 Jul 2021 05:56:44 +0000 (17:56 +1200)
this function is called from only one place & it does not pass in financialTrxnValues

CRM/Contribute/BAO/Contribution.php

index 7dab1582bebf8477db263bfb9a1b363abdc584cf..a823b1aa97e9f0708cb12e2419fde3dc0d0751a9 100644 (file)
@@ -3376,12 +3376,10 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
    *   Contribution object, line item array and params for trxn.
    *
    *
-   * @param array $financialTrxnValues
-   *
    * @return null|\CRM_Core_BAO_FinancialTrxn
    */
-  public static function recordFinancialAccounts(&$params, $financialTrxnValues = NULL) {
-    $skipRecords = $update = $return = FALSE;
+  public static function recordFinancialAccounts(&$params) {
+    $skipRecords = $return = FALSE;
     $isUpdate = !empty($params['prevContribution']);
 
     $additionalParticipantId = [];
@@ -3491,10 +3489,6 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
         $trxnParams['payment_processor_id'] = $params['payment_processor'];
       }
 
-      // consider external values passed for recording transaction entry
-      if (!empty($financialTrxnValues)) {
-        $trxnParams = array_merge($trxnParams, $financialTrxnValues);
-      }
       if (empty($trxnParams['payment_processor_id'])) {
         unset($trxnParams['payment_processor_id']);
       }