From: Eileen McNaughton Date: Sun, 1 Feb 2015 21:31:54 +0000 (+1300) Subject: fix a few comments X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1cd3ffa90c14ea3bfe3939b59f7b7927dc045b94;p=civicrm-core.git fix a few comments --- diff --git a/CRM/Contact/Form/Search/Custom/FullText/Participant.php b/CRM/Contact/Form/Search/Custom/FullText/Participant.php index 7a4503a924..59e1f0b612 100644 --- a/CRM/Contact/Form/Search/Custom/FullText/Participant.php +++ b/CRM/Contact/Form/Search/Custom/FullText/Participant.php @@ -41,6 +41,9 @@ class CRM_Contact_Form_Search_Custom_FullText_Participant extends CRM_Contact_Fo parent::__construct('Participant', ts('Participants')); } + /** + * @return bool + */ public function isActive() { $config = CRM_Core_Config::singleton(); return in_array('CiviEvent', $config->enableComponents) && diff --git a/CRM/Contact/Form/Search/Custom/MultipleValues.php b/CRM/Contact/Form/Search/Custom/MultipleValues.php index c15246565a..0e23374810 100644 --- a/CRM/Contact/Form/Search/Custom/MultipleValues.php +++ b/CRM/Contact/Form/Search/Custom/MultipleValues.php @@ -141,6 +141,14 @@ class CRM_Contact_Form_Search_Custom_MultipleValues extends CRM_Contact_Form_Sea return NULL; } + /** + * @param int $offset + * @param int $rowcount + * @param null $sort + * @param bool $returnSQL + * + * @return string + */ public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL, $returnSQL = FALSE) { return $this->all($offset, $rowcount, $sort, FALSE, TRUE); } diff --git a/CRM/Contact/Form/Search/Custom/PostalMailing.php b/CRM/Contact/Form/Search/Custom/PostalMailing.php index 3635a85cba..66859d27e3 100644 --- a/CRM/Contact/Form/Search/Custom/PostalMailing.php +++ b/CRM/Contact/Form/Search/Custom/PostalMailing.php @@ -62,6 +62,14 @@ class CRM_Contact_Form_Search_Custom_PostalMailing extends CRM_Contact_Form_Sear $form->assign('elements', array('group_id')); } + /** + * @param int $offset + * @param int $rowcount + * @param null $sort + * @param bool $returnSQL + * + * @return string + */ public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL, $returnSQL = FALSE) { return $this->all($offset, $rowcount, $sort, FALSE, TRUE); } diff --git a/CRM/Contact/Form/Search/Custom/Sample.php b/CRM/Contact/Form/Search/Custom/Sample.php index 1c9caca8ef..14abe4b379 100644 --- a/CRM/Contact/Form/Search/Custom/Sample.php +++ b/CRM/Contact/Form/Search/Custom/Sample.php @@ -93,6 +93,14 @@ class CRM_Contact_Form_Search_Custom_Sample extends CRM_Contact_Form_Search_Cust return $summary; } + /** + * @param int $offset + * @param int $rowcount + * @param null $sort + * @param bool $returnSQL + * + * @return string + */ public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL, $returnSQL = FALSE) { return $this->all($offset, $rowcount, $sort, FALSE, TRUE); } diff --git a/CRM/Contact/Form/Search/Custom/ZipCodeRange.php b/CRM/Contact/Form/Search/Custom/ZipCodeRange.php index debe5277a9..414aa3b062 100644 --- a/CRM/Contact/Form/Search/Custom/ZipCodeRange.php +++ b/CRM/Contact/Form/Search/Custom/ZipCodeRange.php @@ -83,6 +83,14 @@ class CRM_Contact_Form_Search_Custom_ZipCodeRange extends CRM_Contact_Form_Searc return $summary; } + /** + * @param int $offset + * @param int $rowcount + * @param null $sort + * @param bool $returnSQL + * + * @return string + */ public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL, $returnSQL = FALSE) { return $this->all($offset, $rowcount, $sort, FALSE, TRUE); } diff --git a/CRM/Contribute/Exception/InactiveContributionPageException.php b/CRM/Contribute/Exception/InactiveContributionPageException.php index d8e67d6210..5c8b82e65f 100644 --- a/CRM/Contribute/Exception/InactiveContributionPageException.php +++ b/CRM/Contribute/Exception/InactiveContributionPageException.php @@ -9,12 +9,21 @@ class CRM_Contribute_Exception_InactiveContributionPageException extends Exception { private $id; + /** + * @param string $message + * @param int $id + */ public function __construct($message, $id) { parent::__construct(ts($message)); $this->id = $id; CRM_Core_Error::debug_log_message('inactive contribution page access attempted - page number ' . $id); } + /** + * Get Contribution page ID. + * + * @return int + */ public function getID() { return $this->id; } diff --git a/CRM/Core/BAO/RecurringEntity.php b/CRM/Core/BAO/RecurringEntity.php index f214e164ee..0b74ca82d1 100644 --- a/CRM/Core/BAO/RecurringEntity.php +++ b/CRM/Core/BAO/RecurringEntity.php @@ -35,6 +35,9 @@ require_once 'packages/When/When.php'; +/** + * Class CRM_Core_BAO_RecurringEntity + */ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity { const RUNNING = 1; diff --git a/CRM/Core/CodeGen/Util/Smarty.php b/CRM/Core/CodeGen/Util/Smarty.php index ce11d28b3f..eff08a8782 100644 --- a/CRM/Core/CodeGen/Util/Smarty.php +++ b/CRM/Core/CodeGen/Util/Smarty.php @@ -1,5 +1,8 @@ ID=123; + * echo $object->delete(); // builds a conditon + * + * $object = new mytable(); + * $object->whereAdd('age > 12'); + * $object->limit(1); + * $object->orderBy('age DESC'); + * $object->delete(true); // dont use object vars, use the conditions, limit and order. + * + * @param bool $useWhere (optional) If DB_DATAOBJECT_WHEREADD_ONLY is passed in then + * we will build the condition only using the whereAdd's. Default is to + * build the condition only using the object parameters. + * + * * @return mixed Int (No. of rows affected) on success, false on failure, 0 on no data affected + */ public function delete($useWhere = FALSE) { $result = parent::delete($useWhere); diff --git a/CRM/Core/FileSearchInterface.php b/CRM/Core/FileSearchInterface.php index da37d7c056..dd41550b1c 100644 --- a/CRM/Core/FileSearchInterface.php +++ b/CRM/Core/FileSearchInterface.php @@ -1,5 +1,8 @@ setPageTitle(ts('Scheduled Reminder')); } + /** + * @return string + */ public function getTemplateFileName() { return 'CRM/Admin/Page/ScheduleReminders.tpl'; } diff --git a/CRM/Group/Page/AJAX.php b/CRM/Group/Page/AJAX.php index 5482b3f52b..2a346f8eac 100644 --- a/CRM/Group/Page/AJAX.php +++ b/CRM/Group/Page/AJAX.php @@ -36,6 +36,11 @@ * This class contains the functions that are called using AJAX (jQuery) */ class CRM_Group_Page_AJAX { + /** + * Get list of groups. + * + * @return array + */ public static function getGroupList() { $params = $_REQUEST;