From 74dd5ab5cd8592b4fe72f4e1875ffb101c0b8d83 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 24 May 2022 11:21:19 +1200 Subject: [PATCH] Remove unreachable code --- CRM/Contact/Import/Parser/Contact.php | 36 +-------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index bf2bb5853e..06a1fbb9f2 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -214,42 +214,8 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser { return $fieldMetaData['label']; } } - elseif ($isSerialized && $dataType === 'StateProvince') { - $mulValues = explode(',', $value); - foreach ($mulValues as $stateValue) { - if ($stateValue) { - if (self::in_value(trim($stateValue), CRM_Core_PseudoConstant::stateProvinceAbbreviation()) || self::in_value(trim($stateValue), CRM_Core_PseudoConstant::stateProvince())) { - continue; - } - else { - return $fieldMetaData['label']; - } - } - } - } - elseif ($isSerialized && $dataType == 'Country') { - $mulValues = explode(',', $value); - foreach ($mulValues as $countryValue) { - if ($countryValue) { - CRM_Core_PseudoConstant::populate($countryNames, 'CRM_Core_DAO_Country', TRUE, 'name', 'is_active'); - CRM_Core_PseudoConstant::populate($countryIsoCodes, 'CRM_Core_DAO_Country', TRUE, 'iso_code'); - $limitCodes = CRM_Core_BAO_Country::countryLimit(); - - $error = TRUE; - foreach ([$countryNames, $countryIsoCodes, $limitCodes] as $values) { - if (in_array(trim($countryValue), $values)) { - $error = FALSE; - break; - } - } - - if ($error) { - return $fieldMetaData['label']; - } - } - } - } } + return NULL; } -- 2.25.1