From ad7979f42df6624fcf42c17636f06828947e33e3 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 13 Sep 2022 11:54:26 +1200 Subject: [PATCH] Improve contribution import error handling --- CRM/Contact/Import/Parser/Contact.php | 2 +- CRM/Contribute/Import/Parser/Contribution.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index 11f59ffb5a..48169889fa 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -1778,7 +1778,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser { } /** - * @param $outcome + * @param int|null|string $outcome * * @return string */ diff --git a/CRM/Contribute/Import/Parser/Contribution.php b/CRM/Contribute/Import/Parser/Contribution.php index 46940b7343..39abb75766 100644 --- a/CRM/Contribute/Import/Parser/Contribution.php +++ b/CRM/Contribute/Import/Parser/Contribution.php @@ -486,11 +486,11 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser { /** * Get the status to record. * - * @param int|null $code + * @param int|null|string $code * * @return string */ - protected function getStatus(?int $code): string { + protected function getStatus($code): string { $errorMapping = [ self::SOFT_CREDIT_ERROR => 'soft_credit_error', self::PLEDGE_PAYMENT_ERROR => 'pledge_payment_error', -- 2.25.1