Improve contribution import error handling
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 12 Sep 2022 23:54:26 +0000 (11:54 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 13 Sep 2022 01:16:55 +0000 (13:16 +1200)
CRM/Contact/Import/Parser/Contact.php
CRM/Contribute/Import/Parser/Contribution.php

index 11f59ffb5a7795519ec8cf968f5e0a06dc0efadf..48169889fa47ee2b03c1fcdf96f790e2db3c4bf3 100644 (file)
@@ -1778,7 +1778,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser {
   }
 
   /**
-   * @param $outcome
+   * @param int|null|string $outcome
    *
    * @return string
    */
index 46940b7343becfb4f383bbdf70ec62cbb38a3907..39abb7576611ef13f28b3569fb28af38152ab4bb 100644 (file)
@@ -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',