From f47539f62e7ceef033b47c0aa56a5b066ee88bce Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 30 Jan 2017 10:53:06 +1300 Subject: [PATCH] Comment fixes --- CRM/Contact/BAO/Contact.php | 4 ++-- CRM/Core/BAO/Phone.php | 4 +++- CRM/Core/BAO/PrevNextCache.php | 33 ++++++++++++++++++++------------- CRM/Core/BAO/Tag.php | 19 ++++++++++++++----- 4 files changed, 39 insertions(+), 21 deletions(-) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 7f834eb93f..ff9301f1fd 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -3371,8 +3371,8 @@ LEFT JOIN civicrm_address add2 ON ( add1.master_id = add2.id ) * Ensures that is_primary gets assigned to another object if available * Also calls pre/post hooks * - * @var object $type - * @var int $id + * @param string $type + * @param int $id * @return bool */ public static function deleteObjectWithPrimary($type, $id) { diff --git a/CRM/Core/BAO/Phone.php b/CRM/Core/BAO/Phone.php index d3e74c0124..180a4425dd 100644 --- a/CRM/Core/BAO/Phone.php +++ b/CRM/Core/BAO/Phone.php @@ -171,7 +171,9 @@ ORDER BY civicrm_phone.is_primary DESC, phone_id ASC "; } /** - * Get all the phone numbers for a specified location_block id, with the primary phone being first + * Get all the phone numbers for a specified location_block id, with the primary phone being first. + * + * This is called from CRM_Core_BAO_Block as a calculated function. * * @param array $entityElements * The array containing entity_id and. diff --git a/CRM/Core/BAO/PrevNextCache.php b/CRM/Core/BAO/PrevNextCache.php index b6e19a8c6b..17f4251e29 100644 --- a/CRM/Core/BAO/PrevNextCache.php +++ b/CRM/Core/BAO/PrevNextCache.php @@ -29,22 +29,22 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2017 - * $Id$ - * */ /** - * BAO object for civicrm_prevnext_cache table + * BAO object for civicrm_prevnext_cache table. */ class CRM_Core_BAO_PrevNextCache extends CRM_Core_DAO_PrevNextCache { /** - * @param $cacheKey - * @param $id1 - * @param $id2 + * Get the previous and next keys. + * + * @param string $cacheKey + * @param int $id1 + * @param int $id2 * @param int $mergeId - * @param NULL $join - * @param NULL $where + * @param string $join + * @param string $where * @param bool $flip * * @return array @@ -113,8 +113,10 @@ WHERE cacheKey = %3 AND } /** + * Delete an item from the prevnext cache table based on the entity. + * * @param int $id - * @param NULL $cacheKey + * @param string $cacheKey * @param string $entityTable */ public static function deleteItem($id = NULL, $cacheKey = NULL, $entityTable = 'civicrm_contact') { @@ -136,9 +138,11 @@ WHERE cacheKey = %3 AND } /** - * @param $id1 - * @param $id2 - * @param NULL $cacheKey + * Delete from the previous next cache table for a pair of ids. + * + * @param int $id1 + * @param int $id2 + * @param string $cacheKey * @param bool $isViceVersa * @param string $entityTable */ @@ -224,6 +228,7 @@ WHERE cacheKey = %3 AND * @param bool $includeConflicts * Should we return rows that have already been idenfified as having a conflict. * When this is TRUE you should be careful you do not set up a loop. + * @param array $params * * @return array */ @@ -321,7 +326,9 @@ FROM civicrm_prevnext_cache pn } /** - * @param $cacheKey + * Get count of matching rows. + * + * @param string $cacheKey * @param string $join * @param string $where * @param string $op diff --git a/CRM/Core/BAO/Tag.php b/CRM/Core/BAO/Tag.php index 936998aa99..31722e897d 100644 --- a/CRM/Core/BAO/Tag.php +++ b/CRM/Core/BAO/Tag.php @@ -29,11 +29,14 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2017 - * $Id$ - * */ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { + /** + * @var array + */ + protected $tree; + /** * Class constructor. */ @@ -63,7 +66,9 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { } /** - * @param null $usedFor + * Get tag tree. + * + * @param string $usedFor * @param bool $excludeHidden * * @return mixed @@ -76,7 +81,9 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { } /** - * Build a nested array from hierarchical tags. Supports infinite levels of nesting. + * Build a nested array from hierarchical tags. + * + * Supports infinite levels of nesting. * @param null $usedFor * @param bool $excludeHidden */ @@ -97,7 +104,7 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { $sql .= " ORDER BY parent_id,name"; - $dao = CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE); + $dao = CRM_Core_DAO::executeQuery($sql, array(), TRUE, NULL, FALSE, FALSE); $refs = array(); $this->tree = array(); @@ -119,6 +126,8 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { } /** + * Get tags used for the given entity/entities. + * * @param array $usedFor * @param bool $buildSelect * @param bool $all -- 2.25.1