Merge pull request #3942 from colemanw/chainSelect
[civicrm-core.git] / CRM / Event / BAO / ParticipantStatusType.php
index 2eac0299cb14a71cccf17c978ad38d7fe2e0a03e..930bfd1e622c52ab7c028d60e16971a2230658fe 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
 class CRM_Event_BAO_ParticipantStatusType extends CRM_Event_DAO_ParticipantStatusType {
+  /**
+   * @param $params
+   *
+   * @return $this|null
+   */
   static function add(&$params) {
     if (empty($params)) {
       return NULL;
@@ -42,6 +47,11 @@ class CRM_Event_BAO_ParticipantStatusType extends CRM_Event_DAO_ParticipantStatu
     return $dao->save();
   }
 
+  /**
+   * @param $params
+   *
+   * @return $this|null
+   */
   static function &create(&$params) {
     $transaction = new CRM_Core_Transaction();
     $statusType = self::add($params);
@@ -53,6 +63,11 @@ class CRM_Event_BAO_ParticipantStatusType extends CRM_Event_DAO_ParticipantStatu
     return $statusType;
   }
 
+  /**
+   * @param $id
+   *
+   * @return bool
+   */
   static function deleteParticipantStatusType($id) {
     // return early if there are participants with this status
     $participant = new CRM_Event_DAO_Participant;
@@ -70,6 +85,12 @@ class CRM_Event_BAO_ParticipantStatusType extends CRM_Event_DAO_ParticipantStatu
     return TRUE;
   }
 
+  /**
+   * @param $params
+   * @param $defaults
+   *
+   * @return CRM_Event_DAO_ParticipantStatusType|null
+   */
   static function retrieve(&$params, &$defaults) {
     $result = NULL;
 
@@ -83,11 +104,22 @@ class CRM_Event_BAO_ParticipantStatusType extends CRM_Event_DAO_ParticipantStatu
     return $result;
   }
 
+  /**
+   * @param $id
+   * @param $isActive
+   *
+   * @return bool
+   */
   static function setIsActive($id, $isActive) {
     return CRM_Core_DAO::setFieldValue('CRM_Event_BAO_ParticipantStatusType', $id, 'is_active', $isActive);
   }
 
-  public function process($params) {
+  /**
+   * @param $params
+   *
+   * @return array
+   */
+  public static function process($params) {
 
     $returnMessages = array();