From c3993d73f68281bbce8ab30f74f542c3a95d2262 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 20 Mar 2023 09:42:24 +1300 Subject: [PATCH] Remove require_onces --- CRM/Contribute/Import/Parser/Contribution.php | 5 +---- CRM/Import/Parser.php | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CRM/Contribute/Import/Parser/Contribution.php b/CRM/Contribute/Import/Parser/Contribution.php index fcbc856caf..098bb90e6d 100644 --- a/CRM/Contribute/Import/Parser/Contribution.php +++ b/CRM/Contribute/Import/Parser/Contribution.php @@ -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) { diff --git a/CRM/Import/Parser.php b/CRM/Import/Parser.php index 6ad0e41ddd..a40f15cab9 100644 --- a/CRM/Import/Parser.php +++ b/CRM/Import/Parser.php @@ -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); -- 2.25.1