Merge pull request #22458 from eileenmcnaughton/test
[civicrm-core.git] / CRM / Event / BAO / Participant.php
index 618927d8c5688fc97635f649b7a2f4f6c14db82b..ed4ef1e67ebc7f84aee60a712ee477ef92851628 100644 (file)
@@ -44,12 +44,6 @@ class CRM_Event_BAO_Participant extends CRM_Event_DAO_Participant {
     'Pending from approval' => ['Registered', 'Cancelled'],
   ];
 
-  /**
-   */
-  public function __construct() {
-    parent::__construct();
-  }
-
   /**
    * Takes an associative array and creates a participant object.
    *
@@ -798,7 +792,7 @@ WHERE  civicrm_participant.id = {$participantId}
    *
    * @param array $defaults
    * @param string $property
-   * @param string $lookup
+   * @param string[] $lookup
    * @param bool $reverse
    *
    * @return bool
@@ -1236,7 +1230,7 @@ UPDATE  civicrm_participant
 
     //get all required contacts detail.
     if (!empty($contactIds)) {
-      $contactDetails = civicrm_api3('Contact', 'get', ['id' => ['IN' => $contactIds, 'return' => 'display_name']])['values'];
+      $contactDetails += civicrm_api3('Contact', 'get', ['id' => ['IN' => $contactIds, 'return' => 'display_name']])['values'];
     }
 
     //get all required events detail.
@@ -1477,7 +1471,7 @@ UPDATE  civicrm_participant
    *
    * @return string
    */
-  public function updateStatusMessage($participantId, $statusChangeTo, $fromStatusId) {
+  public static function updateStatusMessage($participantId, $statusChangeTo, $fromStatusId) {
     $statusMsg = NULL;
     $results = self::transitionParticipants([$participantId],
       $statusChangeTo, $fromStatusId, TRUE
@@ -1596,8 +1590,7 @@ UPDATE  civicrm_participant
    * @param int $newStatusId
    *   New status.
    *
-   * @return bool
-   *   true if allowed
+   * @return array
    */
   public static function getValidAdditionalIds($participantId, $oldStatusId, $newStatusId) {