Remove require_onces
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 19 Mar 2023 20:42:24 +0000 (09:42 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 19 Mar 2023 20:44:13 +0000 (09:44 +1300)
CRM/Contribute/Import/Parser/Contribution.php
CRM/Import/Parser.php

index fcbc856cafadc1624df9f7a959ae9ca278275ce2..098bb90e6d23f8c2e73dbeed892e7f840b45b62d 100644 (file)
@@ -526,13 +526,11 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser {
    *   pairs to insert in new contact.
    * @param array $values
    *   The reformatted properties that we can use internally.
-   * @param bool $create
    *
    * @throws \CRM_Core_Exception
    */
-  private function deprecatedFormatParams($params, &$values, $create = FALSE): void {
+  private function deprecatedFormatParams($params, &$values): void {
     // copy all the contribution fields as is
-    require_once 'api/v3/utils.php';
     if (empty($params['pledge_id'])) {
       return;
     }
@@ -567,7 +565,6 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser {
     }
 
     // we need to check if oldest payment amount equal to contribution amount
-    require_once 'CRM/Pledge/BAO/PledgePayment.php';
     $pledgePaymentDetails = CRM_Pledge_BAO_PledgePayment::getOldestPledgePayment($values['pledge_id']);
 
     if ($pledgePaymentDetails['amount'] == $totalAmount) {
index 6ad0e41dddf9b47d3822b65ef895b327c2e4580d..a40f15cab927cfa37c4acceaf0463f21b81bd0c9 100644 (file)
@@ -1055,7 +1055,6 @@ abstract class CRM_Import_Parser implements UserJobInterface {
     }
 
     // first add core contact values since for other Civi modules they are not added
-    require_once 'CRM/Contact/BAO/Contact.php';
     $contactFields = CRM_Contact_DAO_Contact::fields();
     _civicrm_api3_store_values($contactFields, $values, $params);