From: Eileen McNaughton Date: Mon, 2 Feb 2015 02:15:48 +0000 (+1300) Subject: a few comment fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7a9ab4993d3308aa102d4c3ae7a9dba39a0c7199;p=civicrm-core.git a few comment fixes --- diff --git a/CRM/Contact/Form/Search/Interface.php b/CRM/Contact/Form/Search/Interface.php index f99e40190b..08f25e5f2d 100644 --- a/CRM/Contact/Form/Search/Interface.php +++ b/CRM/Contact/Form/Search/Interface.php @@ -35,14 +35,17 @@ interface CRM_Contact_Form_Search_Interface { /** - * The constructor gets the submitted form values + * The constructor gets the submitted form values. * - * @param $formValues + * @param array $formValues */ public function __construct(&$formValues); /** - * Builds the quickform for this search + * Builds the quickform for this search. + * + * @param CRM_Core_Form $form + * @return */ public function buildForm(&$form); @@ -54,27 +57,45 @@ interface CRM_Contact_Form_Search_Interface { */ /** - * Count of records that match the current input parameters - * Used by pager + * Count of records that match the current input parameters. + * + * Used by pager. */ public function count(); /** - * Summary information for the query that can be displayed in the template + * Summary information for the query that can be displayed in the template. + * * This is useful to pass total / sub total information if needed */ public function summary(); /** - * List of contact ids that match the current input parameters + * List of contact ids that match the current input parameters. + * * Used by different tasks. Will be also used to optimize the * 'all' query below to avoid excessive LEFT JOIN blowup + * + * @param int $offset + * @param int $rowcount + * @param null $sort + * + * @return */ public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL); /** - * Retrieve all the values that match the current input parameters + * Retrieve all the values that match the current input parameters. + * * Used by the selector + * + * @param int $offset + * @param int $rowcount + * @param null $sort + * @param bool $includeContactIDs + * @param bool $justIDs + * + * @return */ public function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE); @@ -88,22 +109,26 @@ interface CRM_Contact_Form_Search_Interface { */ /** - * The from clause for the query + * The from clause for the query. */ public function from(); /** - * The where clause for the query + * The where clause for the query. + * + * @param bool $includeContactIDs + * + * @return */ public function where($includeContactIDs = FALSE); /** - * The template FileName to use to display the results + * The template FileName to use to display the results. */ public function templateFile(); /** - * Returns an array of column headers and field names and sort options + * Returns an array of column headers and field names and sort options. */ public function &columns(); diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index a936639b5e..97d53a1dbe 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -1739,6 +1739,10 @@ LEFT JOIN civicrm_contribution contribution ON ( componentPayment.contribution_ /** * Returns all contribution related object ids. + * + * @param $contributionId + * + * @return array */ public static function getComponentDetails($contributionId) { $componentDetails = $pledgePayment = array(); @@ -3561,10 +3565,18 @@ WHERE con.id = {$contributionId} return CRM_Utils_Array::value('financial_account_id', $result); } + /** + * Check tax amount. + * + * @param array $params + * @param bool $isLineItem + * + * @return mixed + */ public static function checkTaxAmount($params, $isLineItem = FALSE) { $taxRates = CRM_Core_PseudoConstant::getTaxRates(); - // Update contribution + // Update contribution. if (!empty($params['id'])) { $id = $params['id']; $values = $ids = array(); diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 67300ced8c..e19f9068b0 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -1812,7 +1812,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP /** * @param array $paymentParams - * + * @param $message */ public function cleanupDBAfterPaymentFailure($paymentParams, $message) { //make sure to cleanup db for recurring case. diff --git a/CRM/Contribute/StateMachine/Search.php b/CRM/Contribute/StateMachine/Search.php index da6a677ec9..1c0dc22631 100644 --- a/CRM/Contribute/StateMachine/Search.php +++ b/CRM/Contribute/StateMachine/Search.php @@ -43,6 +43,9 @@ class CRM_Contribute_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); diff --git a/CRM/Core/BAO/FinancialTrxn.php b/CRM/Core/BAO/FinancialTrxn.php index 869a633c5d..0d98f34580 100644 --- a/CRM/Core/BAO/FinancialTrxn.php +++ b/CRM/Core/BAO/FinancialTrxn.php @@ -360,6 +360,7 @@ WHERE ceft.entity_id = %1"; * @param array $params * To create trxn entries. * + * @return bool */ public static function recordFees($params) { $expenseTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Expense Account is' ")); diff --git a/CRM/Core/BAO/PrevNextCache.php b/CRM/Core/BAO/PrevNextCache.php index cb5bcef2e9..9a2b23122a 100644 --- a/CRM/Core/BAO/PrevNextCache.php +++ b/CRM/Core/BAO/PrevNextCache.php @@ -249,6 +249,8 @@ WHERE cacheKey $op %1 * @param int $rgid * @param int $gid * @param NULL $cacheKeyString + * + * @return bool */ public static function refillCache($rgid = NULL, $gid = NULL, $cacheKeyString = NULL) { if (!$cacheKeyString && $rgid) { diff --git a/CRM/Core/ClassLoader.php b/CRM/Core/ClassLoader.php index e92bf888dc..b68cc3d6b9 100644 --- a/CRM/Core/ClassLoader.php +++ b/CRM/Core/ClassLoader.php @@ -101,6 +101,11 @@ class CRM_Core_ClassLoader { require_once "$civicrm_base_path/vendor/autoload.php"; } + /** + * Initialize HTML purifier class. + * + * @param string $prepend + */ public function initHtmlPurifier($prepend) { if (class_exists('HTMLPurifier_Bootstrap')) { // HTMLPurifier is already initialized, e.g. by the Drupal module. diff --git a/CRM/Core/CodeGen/Util/Smarty.php b/CRM/Core/CodeGen/Util/Smarty.php index eff08a8782..8ab0b2adcb 100644 --- a/CRM/Core/CodeGen/Util/Smarty.php +++ b/CRM/Core/CodeGen/Util/Smarty.php @@ -44,6 +44,11 @@ class CRM_Core_CodeGen_Util_Smarty { $this->smarty = NULL; } + /** + * Get templates_c directory. + * + * @return string + */ public function getCompileDir() { if ($this->compileDir === NULL) { $this->compileDir = CRM_Core_CodeGen_Util_File::createTempDir('templates_c_'); @@ -51,6 +56,11 @@ class CRM_Core_CodeGen_Util_Smarty { return $this->compileDir; } + /** + * Get smarty instance. + * + * @return \Smarty + */ public function getSmarty() { if ($this->smarty === NULL) { require_once 'Smarty/Smarty.class.php'; diff --git a/CRM/Core/Component.php b/CRM/Core/Component.php index 85c6930867..0cc72ce62c 100644 --- a/CRM/Core/Component.php +++ b/CRM/Core/Component.php @@ -222,6 +222,8 @@ class CRM_Core_Component { /** * @param $config * @param bool $oldMode + * + * @return null */ public static function addConfig(&$config, $oldMode = FALSE) { $info = self::_info(); diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 32fb178dd9..5a96a775d1 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1408,6 +1408,16 @@ FROM civicrm_domain return $newObject; } + /** + * Cascade update through related entities. + * + * @param string $daoName + * @param $fromId + * @param $toId + * @param array $newData + * + * @return null + */ public static function cascadeUpdate($daoName, $fromId, $toId, $newData = array()) { $object = new $daoName(); $object->id = $fromId; diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index cbe49b178c..1ecbbede88 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1696,6 +1696,8 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * that small pieces of duplication are not being refactored into separate functions because their only shared parent * is this form. Inserting a class FrontEndForm.php between the contribution & event & this class would allow functions like this * and a dozen other small ones to be refactored into a shared parent with the reduction of much code duplication + * + * @param $onlinePaymentProcessorEnabled */ public function addCIDZeroOptions($onlinePaymentProcessorEnabled) { $this->assign('nocid', TRUE); diff --git a/CRM/Core/Form/RecurringEntity.php b/CRM/Core/Form/RecurringEntity.php index 40f96a5b46..8dbed40139 100644 --- a/CRM/Core/Form/RecurringEntity.php +++ b/CRM/Core/Form/RecurringEntity.php @@ -74,6 +74,9 @@ class CRM_Core_Form_RecurringEntity { */ public static $_hasParent = FALSE; + /** + * @param $entityTable + */ public static function preProcess($entityTable) { self::$_entityId = (int) CRM_Utils_Request::retrieve('id', 'Positive'); self::$_entityTable = $entityTable; diff --git a/CRM/Core/I18n/NativeGettext.php b/CRM/Core/I18n/NativeGettext.php index 0f721512ae..996d1192b6 100644 --- a/CRM/Core/I18n/NativeGettext.php +++ b/CRM/Core/I18n/NativeGettext.php @@ -45,6 +45,11 @@ class CRM_Core_I18n_NativeGettext { /** * Based on php-gettext, since native gettext does not support this as is. + * + * @param $context + * @param $text + * + * @return string */ public function pgettext($context, $text) { $key = $context . chr(4) . $text; diff --git a/CRM/Core/InnoDBIndexer.php b/CRM/Core/InnoDBIndexer.php index 5b0dafa381..7751aa5632 100644 --- a/CRM/Core/InnoDBIndexer.php +++ b/CRM/Core/InnoDBIndexer.php @@ -108,15 +108,26 @@ class CRM_Core_InnoDBIndexer { */ protected $isActive; + /** + * Class constructor. + * + * @param $isActive + * @param $indices + */ public function __construct($isActive, $indices) { $this->isActive = $isActive; $this->indices = $this->normalizeIndices($indices); } + /** + * Fix schema differences. + * + * Limitation: This won't pick up stale indices on tables which are not + * declared in $this->indices. That's not much of an issue for now b/c + * we have a static list of tables. + */ public function fixSchemaDifferences() { - // Limitation: This won't pick up stale indices on tables which are not - // declared in $this->indices. That's not much of an issue for now b/c - // we have a static list of tables. + // foreach ($this->indices as $tableName => $ign) { $todoSqls = $this->reconcileIndexSqls($tableName); foreach ($todoSqls as $todoSql) { diff --git a/CRM/Core/Menu.php b/CRM/Core/Menu.php index 59359e353f..8338850db7 100644 --- a/CRM/Core/Menu.php +++ b/CRM/Core/Menu.php @@ -164,6 +164,7 @@ class CRM_Core_Menu { * @param boolen $fetchFromXML * Fetch the menu items from xml and not from cache. * + * @return array */ public static function &items($fetchFromXML = FALSE) { return self::xmlItems($fetchFromXML); diff --git a/CRM/Core/Payment/AuthorizeNetIPN.php b/CRM/Core/Payment/AuthorizeNetIPN.php index b794d2f66e..011fb7f408 100644 --- a/CRM/Core/Payment/AuthorizeNetIPN.php +++ b/CRM/Core/Payment/AuthorizeNetIPN.php @@ -206,6 +206,8 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { /** * @param $input * @param $ids + * + * @return bool */ public function getInput(&$input, &$ids) { $input['amount'] = $this->retrieve('x_amount', 'String'); diff --git a/CRM/Core/Payment/PayPalIPN.php b/CRM/Core/Payment/PayPalIPN.php index d8c26ec843..0d2996af73 100644 --- a/CRM/Core/Payment/PayPalIPN.php +++ b/CRM/Core/Payment/PayPalIPN.php @@ -69,6 +69,8 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN { * @param $ids * @param $objects * @param $first + * + * @return bool */ public function recur(&$input, &$ids, &$objects, $first) { if (!isset($input['txnType'])) { @@ -225,6 +227,8 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN { * @param $objects * @param bool $recur * @param bool $first + * + * @return bool */ public function single( &$input, &$ids, &$objects, @@ -342,6 +346,8 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN { /** * @param $input * @param $ids + * + * @return bool */ public function getInput(&$input, &$ids) { if (!$this->getBillingID($ids)) { diff --git a/CRM/Core/Payment/PayPalProIPN.php b/CRM/Core/Payment/PayPalProIPN.php index 2e433b95f0..e4f05d1773 100644 --- a/CRM/Core/Payment/PayPalProIPN.php +++ b/CRM/Core/Payment/PayPalProIPN.php @@ -327,6 +327,8 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN { * @param $objects * @param bool $recur * @param bool $first + * + * @return bool */ public function single(&$input, &$ids, &$objects, $recur = FALSE, $first = FALSE) { $contribution = &$objects['contribution']; diff --git a/CRM/Core/Payment/PaymentExpress.php b/CRM/Core/Payment/PaymentExpress.php index 0aba51b29e..ad7244aab7 100644 --- a/CRM/Core/Payment/PaymentExpress.php +++ b/CRM/Core/Payment/PaymentExpress.php @@ -128,6 +128,8 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment { * * @param array $params * Assoc array of input parameters for this transaction. + * + * @return array|void */ public function doDirectPayment(&$params) { CRM_Core_Error::fatal(ts('This function is not implemented')); diff --git a/CRM/Core/QuickForm/GroupMultiSelect.php b/CRM/Core/QuickForm/GroupMultiSelect.php index 2a4c15edf1..8bc800e59d 100644 --- a/CRM/Core/QuickForm/GroupMultiSelect.php +++ b/CRM/Core/QuickForm/GroupMultiSelect.php @@ -35,7 +35,7 @@ */ class CRM_Core_QuickForm_GroupMultiSelect extends CRM_Core_QuickForm_NestedAdvMultiSelect { /** - * Returns the HTML generated for the advanced mutliple select component + * Returns the HTML generated for the advanced multiple select component * * @return string * @since version 0.4.0 (2005-06-25) diff --git a/CRM/Custom/Import/Controller.php b/CRM/Custom/Import/Controller.php index 5db234e1bc..a5053f34ef 100644 --- a/CRM/Custom/Import/Controller.php +++ b/CRM/Custom/Import/Controller.php @@ -5,7 +5,11 @@ */ class CRM_Custom_Import_Controller extends CRM_Core_Controller { /** - * Class constructor + * Class constructor. + * + * @param string $title + * @param bool|int $action + * @param bool $modal */ public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) { parent::__construct($title, $modal); diff --git a/CRM/Custom/Import/Parser/Api.php b/CRM/Custom/Import/Parser/Api.php index 71f6e225c5..aa439a46e1 100644 --- a/CRM/Custom/Import/Parser/Api.php +++ b/CRM/Custom/Import/Parser/Api.php @@ -18,7 +18,11 @@ class CRM_Custom_Import_Parser_Api extends CRM_Custom_Import_Parser { protected $_params = array(); /** - * Class constructor + * Class constructor. + * + * @param array $mapperKeys + * @param null $mapperLocType + * @param null $mapperPhoneType */ public function __construct(&$mapperKeys, $mapperLocType = NULL, $mapperPhoneType = NULL) { parent::__construct(); diff --git a/CRM/Event/Cart/BAO/EventInCart.php b/CRM/Event/Cart/BAO/EventInCart.php index 25aae6aad8..26d5721b74 100644 --- a/CRM/Event/Cart/BAO/EventInCart.php +++ b/CRM/Event/Cart/BAO/EventInCart.php @@ -47,6 +47,8 @@ class CRM_Event_Cart_BAO_EventInCart extends CRM_Event_Cart_DAO_EventInCart impl /** * @param bool $useWhere + * + * @return mixed|void */ public function delete($useWhere = FALSE) { $this->load_associations(); diff --git a/CRM/Event/Controller/Registration.php b/CRM/Event/Controller/Registration.php index 085196b0a6..4624882638 100644 --- a/CRM/Event/Controller/Registration.php +++ b/CRM/Event/Controller/Registration.php @@ -35,7 +35,11 @@ class CRM_Event_Controller_Registration extends CRM_Core_Controller { /** - * Class constructor + * Class constructor. + * + * @param null $title + * @param bool|int $action + * @param bool $modal */ public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) { parent::__construct($title, $modal); diff --git a/CRM/Event/Form/ManageEvent/Repeat.php b/CRM/Event/Form/ManageEvent/Repeat.php index f57ebb00e6..3e1103f37f 100644 --- a/CRM/Event/Form/ManageEvent/Repeat.php +++ b/CRM/Event/Form/ManageEvent/Repeat.php @@ -193,7 +193,10 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent { /** * This function checks if there was any registraion for related event ids, * and returns array of ids with no regsitrations + * * @param string or int or object... $eventID + * + * @return array */ public static function checkRegistrationForEvents($eventID) { $eventIdsWithNoRegistration = array();