[REF][PHP8.2] Declare properties in HouseholdSummary report
authorBradley Taylor <hello@brad-taylor.co.uk>
Sat, 2 Dec 2023 20:42:46 +0000 (20:42 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sat, 2 Dec 2023 21:38:29 +0000 (21:38 +0000)
CRM/Report/Form/Contribute/HouseholdSummary.php

index 4003b58cee10960cf0ffe74b01949a1ac8fb3d8d..165d9bf973dbe0cf53e84186eb1a299e6077ce21 100644 (file)
@@ -20,6 +20,30 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
 
   protected $_summary = NULL;
 
+  /**
+   * @var array
+   * @internal
+   */
+  public $relationTypes;
+
+  /**
+   * @var int
+   * @internal
+   */
+  public $relationshipId;
+
+  /**
+   * @var string
+   * @internal
+   */
+  public $householdContact;
+
+  /**
+   * @var string
+   * @internal
+   */
+  public $otherContact;
+
   /**
    * Class constructor.
    */
@@ -407,6 +431,8 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
    */
   public function alterDisplay(&$rows) {
     $type = substr($this->_params['relationship_type_id_value'], -3);
+    $previousHousehold = NULL;
+    $previousContact = NULL;
 
     $entryFound = FALSE;
     $flagHousehold = $flagContact = 0;
@@ -426,16 +452,16 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
       ) {
         if ($value = $row['civicrm_contact_household_household_name']) {
           if ($rowNum == 0) {
-            $priviousHousehold = $value;
+            $previousHousehold = $value;
           }
           else {
-            if ($priviousHousehold == $value) {
+            if ($previousHousehold == $value) {
               $flagHousehold = 1;
-              $priviousHousehold = $value;
+              $previousHousehold = $value;
             }
             else {
               $flagHousehold = 0;
-              $priviousHousehold = $value;
+              $previousHousehold = $value;
             }
           }
 
@@ -460,16 +486,16 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
       ) {
         if ($value = $row['civicrm_contact_id']) {
           if ($rowNum == 0) {
-            $priviousContact = $value;
+            $previousContact = $value;
           }
           else {
-            if ($priviousContact == $value) {
+            if ($previousContact == $value) {
               $flagContact = 1;
-              $priviousContact = $value;
+              $previousContact = $value;
             }
             else {
               $flagContact = 0;
-              $priviousContact = $value;
+              $previousContact = $value;
             }
           }