From 0e2e76cf3a15429ce7c99b92d07cef0ab1684488 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 2 Feb 2015 12:32:51 +1300 Subject: [PATCH] further comment fixes --- CRM/Contact/BAO/Query.php | 22 +++++++++++++++++-- .../Custom/FullText/AbstractPartialQuery.php | 5 +++++ .../Form/Search/Custom/FullText/Case.php | 13 +++++++++++ .../Search/Custom/FullText/Membership.php | 7 ++++++ CRM/Contact/StateMachine/Search.php | 3 +++ 5 files changed, 48 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 6e837043f3..5fbd3cc374 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -1436,6 +1436,8 @@ class CRM_Contact_BAO_Query { * @param int $wildcard * @param bool $useEquals * + * @param string $apiEntity + * * @return array */ public static function convertFormValues(&$formValues, $wildcard = 0, $useEquals = FALSE, $apiEntity = NULL) { @@ -1506,6 +1508,8 @@ class CRM_Contact_BAO_Query { * @param int $wildcard * @param bool $useEquals * + * @param string $apiEntity + * * @return array|null */ public static function &fixWhereValues($id, &$values, $wildcard = 0, $useEquals = FALSE, $apiEntity = NULL) { @@ -2749,6 +2753,7 @@ class CRM_Contact_BAO_Query { /** * @param $value * @param $grouping + * @param string $op */ public function includeContactSubTypes($value, $grouping, $op = 'LIKE') { @@ -3288,12 +3293,12 @@ WHERE id IN ( $groupIDs ) } } - /* + /** * Where/qill clause for greeting fields. * * @param array $values */ - function greetings(&$values) { + public function greetings(&$values) { list($name, $op, $value, $grouping, $wildcard) = $values; $name .= '_display'; @@ -5630,6 +5635,19 @@ AND displayRelType.is_active = 1 return array($presentClause, $presentSimpleFromClause); } + /** + * Build qill for field. + * + * Qill refers to the query detail visible on the UI. + * + * @param $daoName + * @param $fieldName + * @param $fieldValue + * @param $op + * @param array $pseduoExtraParam + * + * @return array + */ public static function buildQillForFieldValue($daoName, $fieldName, $fieldValue, $op, $pseduoExtraParam = array()) { $pseduoOptions = CRM_Core_PseudoConstant::get($daoName, $fieldName, $pseduoExtraParam = array()); $qillOperators = CRM_Core_SelectValues::getSearchBuilderOperators(); diff --git a/CRM/Contact/Form/Search/Custom/FullText/AbstractPartialQuery.php b/CRM/Contact/Form/Search/Custom/FullText/AbstractPartialQuery.php index a1cdfa8fd1..e4a69036f8 100644 --- a/CRM/Contact/Form/Search/Custom/FullText/AbstractPartialQuery.php +++ b/CRM/Contact/Form/Search/Custom/FullText/AbstractPartialQuery.php @@ -55,6 +55,11 @@ abstract class CRM_Contact_Form_Search_Custom_FullText_AbstractPartialQuery { $this->label = $label; } + /** + * Get label. + * + * @return string + */ public function getLabel() { return $this->label; } diff --git a/CRM/Contact/Form/Search/Custom/FullText/Case.php b/CRM/Contact/Form/Search/Custom/FullText/Case.php index a291ce5065..9a02f37bb9 100644 --- a/CRM/Contact/Form/Search/Custom/FullText/Case.php +++ b/CRM/Contact/Form/Search/Custom/FullText/Case.php @@ -34,6 +34,9 @@ */ class CRM_Contact_Form_Search_Custom_FullText_Case extends CRM_Contact_Form_Search_Custom_FullText_AbstractPartialQuery { + /** + * Class constructor. + */ public function __construct() { parent::__construct('Case', ts('Cases')); } @@ -60,8 +63,11 @@ class CRM_Contact_Form_Search_Custom_FullText_Case extends CRM_Contact_Form_Sear } /** + * Prepare queries. + * * @param string $queryText * @param string $entityIDTableName + * * @return array * list tables/queries (for runQueries) */ @@ -111,6 +117,13 @@ GROUP BY et.entity_id return $tables; } + /** + * Move IDs. + * + * @param string $fromTable + * @param string $toTable + * @param int $limit + */ public function moveIDs($fromTable, $toTable, $limit) { $sql = " INSERT INTO {$toTable} diff --git a/CRM/Contact/Form/Search/Custom/FullText/Membership.php b/CRM/Contact/Form/Search/Custom/FullText/Membership.php index 250aeb044a..abf5708c43 100644 --- a/CRM/Contact/Form/Search/Custom/FullText/Membership.php +++ b/CRM/Contact/Form/Search/Custom/FullText/Membership.php @@ -97,6 +97,13 @@ WHERE ({$this->matchText('civicrm_contact c', array('sort_name', 'display_n return $tables; } + /** + * Move IDs. + * + * @param string $fromTable + * @param string $toTable + * @param int $limit + */ public function moveIDs($fromTable, $toTable, $limit) { $sql = " INSERT INTO {$toTable} diff --git a/CRM/Contact/StateMachine/Search.php b/CRM/Contact/StateMachine/Search.php index 606fd52c0f..f1f173a278 100644 --- a/CRM/Contact/StateMachine/Search.php +++ b/CRM/Contact/StateMachine/Search.php @@ -43,6 +43,9 @@ class CRM_Contact_StateMachine_Search extends CRM_Core_StateMachine { /** * Class constructor + * + * @param object $controller + * @param \const|int $action */ public function __construct($controller, $action = CRM_Core_Action::NONE) { parent::__construct($controller, $action); -- 2.25.1