Merge pull request #22704 from braders/remove-invalidprofiles-template-variable
[civicrm-core.git] / CRM / Utils / Address.php
index 90163f01174727465aacc7746009ef63f6fdef92..efba5738dc16b4462c8fd69753336463ccecb958 100644 (file)
@@ -34,7 +34,7 @@ class CRM_Utils_Address {
    *   If true indicates, the address to be built in hcard-microformat standard.
    * @param bool $mailing
    *   If true indicates, the call has been made from mailing label.
-   * @param null $tokenFields
+   * @param string[] $tokenFields
    *
    * @return string
    *   formatted address string
@@ -141,8 +141,8 @@ class CRM_Utils_Address {
         'contact.contact_source' => $fields['contact_source'] ?? NULL,
         'contact.external_identifier' => $fields['external_identifier'] ?? NULL,
         'contact.contact_id' => $fields['id'] ?? NULL,
-        'contact.household_name' => $fields['display_name'] ?? NULL,
-        'contact.organization_name' => $fields['display_name'] ?? NULL,
+        'contact.household_name' => $fields['household_name'] ?? NULL,
+        'contact.organization_name' => $fields['organization_name'] ?? NULL,
         'contact.legal_name' => $fields['legal_name'] ?? NULL,
         'contact.preferred_communication_method' => $fields['preferred_communication_method'] ?? NULL,
         'contact.communication_style' => $fields['communication_style'] ?? NULL,
@@ -265,7 +265,7 @@ class CRM_Utils_Address {
   }
 
   /**
-   * @param $format
+   * @param string $format
    *
    * @return array
    */