Merge pull request #4997 from monishdeb/CRM-15536
[civicrm-core.git] / CRM / Core / BAO / IM.php
index 382abb86c406a8dc0a65c88a7164c79ea8572c3a..a66907ad6a264773be80908c245943acf06ce3b3 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -46,7 +46,6 @@ class CRM_Core_BAO_IM extends CRM_Core_DAO_IM {
    *
    * @return object
    *   CRM_Core_BAO_IM object on success, null otherwise
-   * @static
    */
   public static function add(&$params) {
     $hook = empty($params['id']) ? 'create' : 'edit';
@@ -64,10 +63,9 @@ class CRM_Core_BAO_IM extends CRM_Core_DAO_IM {
    * Given the list of params in the params array, fetch the object
    * and store the values in the values array
    *
-   * @param array entityBlock input parameters to find object
+   * @param array $entityBlock input parameters to find object
    *
-   * @return boolean
-   * @static
+   * @return bool
    */
   public static function &getValues($entityBlock) {
     return CRM_Core_BAO_Block::getValues('im', $entityBlock);
@@ -83,7 +81,6 @@ class CRM_Core_BAO_IM extends CRM_Core_DAO_IM {
    *
    * @return array
    *   the array of im details
-   * @static
    */
   public static function allIMs($id, $updateBlankLocInfo = FALSE) {
     if (!$id) {
@@ -103,8 +100,8 @@ ORDER BY
   civicrm_im.is_primary DESC, im_id ASC ";
     $params = array(1 => array($id, 'Integer'));
 
-    $ims   = $values = array();
-    $dao   = CRM_Core_DAO::executeQuery($query, $params);
+    $ims = $values = array();
+    $dao = CRM_Core_DAO::executeQuery($query, $params);
     $count = 1;
     while ($dao->fetch()) {
       $values = array(
@@ -131,22 +128,17 @@ ORDER BY
    *
    * @param array $entityElements
    *   The array containing entity_id and.
-   * entity_table name
+   *   entity_table name
    *
    * @return array
    *   the array of im details
-   * @static
    */
   public static function allEntityIMs(&$entityElements) {
     if (empty($entityElements)) {
       return NULL;
     }
-
-
     $entityId = $entityElements['entity_id'];
     $entityTable = $entityElements['entity_table'];
-
-
     $sql = "SELECT cim.name as im, ltype.name as locationType, cim.is_primary as is_primary, cim.id as im_id, cim.location_type_id as locationTypeId
 FROM civicrm_loc_block loc, civicrm_im cim, civicrm_location_type ltype, {$entityTable} ev
 WHERE ev.id = %1
@@ -177,4 +169,5 @@ ORDER BY cim.is_primary DESC, im_id ASC ";
   public static function del($id) {
     return CRM_Contact_BAO_Contact::deleteObjectWithPrimary('IM', $id);
   }
+
 }