Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-02-09-11-44-07
[civicrm-core.git] / CRM / Core / BAO / IM.php
index 9e5b1788fbe4bc001d4a9c56dfa88f6ffedf83b1..2f3830d419f220258cc2c9951783424cf7a5de60 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        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -39,7 +39,7 @@
 class CRM_Core_BAO_IM extends CRM_Core_DAO_IM {
 
   /**
-   * Takes an associative array and adds im
+   * Takes an associative array and adds im.
    *
    * @param array $params
    *   (reference ) an assoc array of name/value pairs.
@@ -63,9 +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
+   * @return bool
    */
   public static function &getValues($entityBlock) {
     return CRM_Core_BAO_Block::getValues('im', $entityBlock);
@@ -137,12 +137,8 @@ ORDER BY
     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
@@ -168,9 +164,10 @@ ORDER BY cim.is_primary DESC, im_id ASC ";
   }
 
   /**
-   * Call common delete function
+   * Call common delete function.
    */
   public static function del($id) {
     return CRM_Contact_BAO_Contact::deleteObjectWithPrimary('IM', $id);
   }
+
 }