From d6bab87e402f447a95690f466c22aa89fef59df2 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 11 Aug 2022 10:07:42 +1200 Subject: [PATCH] Remove unreachable legacy code --- CRM/Contribute/Import/Parser/Contribution.php | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/CRM/Contribute/Import/Parser/Contribution.php b/CRM/Contribute/Import/Parser/Contribution.php index ca4fdb8aef..160cde26c9 100644 --- a/CRM/Contribute/Import/Parser/Contribution.php +++ b/CRM/Contribute/Import/Parser/Contribution.php @@ -289,7 +289,6 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser { if (isset($params['total_amount']) && $params['total_amount'] == 0) { $params['total_amount'] = '0.00'; } - $this->formatInput($params, $formatted); $paramValues = []; foreach ($params as $key => $field) { @@ -574,32 +573,6 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser { return $this->_newContributions; } - /** - * Format input params to suit api handling. - * - * Over time all the parts of deprecatedFormatParams - * and all the parts of the import function on this class that relate to - * reformatting input should be moved here and tests should be added in - * CRM_Contribute_Import_Parser_ContributionTest. - * - * @param array $params - * @param array $formatted - */ - public function formatInput(&$params, &$formatted = []) { - foreach ($params as $key => $val) { - // @todo - call formatDateFields instead. - if ($val) { - switch ($key) { - - case 'pledge_payment': - $params[$key] = CRM_Utils_String::strtobool($val); - break; - - } - } - } - } - /** * take the input parameter list as specified in the data model and * convert it into the same format that we use in QF and BAO object -- 2.25.1