From 5c766a0b761b7db59157013f713b2382a229c15d Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 19 Jan 2015 20:03:41 -0800 Subject: [PATCH] INFRA-132 - Misc --- CRM/Contact/BAO/Contact.php | 4 ++-- CRM/Contact/Form/Contact.php | 2 +- CRM/Core/BAO/Address.php | 5 ++--- CRM/Core/BAO/CustomField.php | 7 +++---- CRM/Core/BAO/CustomGroup.php | 8 +++----- CRM/Core/BAO/Discount.php | 2 +- CRM/Core/BAO/OptionValue.php | 2 +- CRM/Core/BAO/Setting.php | 20 ++++++++++---------- CRM/Core/BAO/Tag.php | 4 ++-- CRM/Core/Form.php | 6 +++--- CRM/Core/Payment/BaseIPN.php | 8 ++++---- CRM/Core/Payment/PayPalImpl.php | 2 +- CRM/Core/Permission/WordPress.php | 2 +- CRM/Event/BAO/Participant.php | 2 +- api/api.php | 2 +- api/v3/Address.php | 2 -- api/v3/Case.php | 2 +- api/v3/ContributionRecur.php | 6 +----- api/v3/Email.php | 5 +---- api/v3/GroupNesting.php | 1 - api/v3/LineItem.php | 3 --- api/v3/MailingEventQueue.php | 3 +-- api/v3/MembershipType.php | 2 +- api/v3/ParticipantPayment.php | 3 --- api/v3/SurveyRespondant.php | 1 - 25 files changed, 41 insertions(+), 63 deletions(-) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 8c1731f84c..e556aa0690 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -3133,7 +3133,7 @@ LEFT JOIN civicrm_address add2 ON ( add1.master_id = add2.id ) * @param int $contactId * * @return array - * Dates - ('created_date' => $, 'modified_date' => $) + * Dates - ('created_date' => $, 'modified_date' => $) */ public static function getTimestamps($contactId) { $timestamps = CRM_Core_DAO::executeQuery( @@ -3301,7 +3301,7 @@ LEFT JOIN civicrm_address add2 ON ( add1.master_id = add2.id ) * @param array $props * whatever is known about this dao object. * - * @return Array|bool + * @return array|bool */ public static function buildOptions($fieldName, $context = NULL, $props = array()) { $params = array(); diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index cb7122d0a4..7e6ef24df5 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -1066,7 +1066,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { * @param array $fields * The hierarchical value representation of this location. * - * @return boolean + * @return bool * true if data exists, false otherwise */ public static function blockDataExists(&$fields) { diff --git a/CRM/Core/BAO/Address.php b/CRM/Core/BAO/Address.php index 093c72bd5e..d6866ad381 100644 --- a/CRM/Core/BAO/Address.php +++ b/CRM/Core/BAO/Address.php @@ -405,8 +405,7 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address { * @param array $params * (reference ) an assoc array of name/value pairs. * - * @return boolean - * + * @return bool */ public static function dataExists(&$params) { //check if location type is set if not return false @@ -1251,7 +1250,7 @@ SELECT is_primary, * @param array $props * whatever is known about this dao object. * - * @return Array|bool + * @return array|bool */ public static function buildOptions($fieldName, $context = NULL, $props = array()) { $params = array(); diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index 9e00a72393..8bd142da0a 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -700,8 +700,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField { * The custom field ID. * * @return CRM_Core_DAO_CustomField - * $field the field object - * public + * The field object. */ public static function getFieldObject($fieldID) { $field = new CRM_Core_DAO_CustomField(); @@ -1920,8 +1919,8 @@ SELECT $columnName * @param int $newGroupID * FK to civicrm_custom_group. * - * @return array( - * string) or TRUE + * @return array + * array(string) or TRUE */ public static function _moveFieldValidate($fieldID, $newGroupID) { $errors = array(); diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php index c65935f198..0cee4a3381 100644 --- a/CRM/Core/BAO/CustomGroup.php +++ b/CRM/Core/BAO/CustomGroup.php @@ -651,7 +651,7 @@ ORDER BY civicrm_custom_group.weight, * * @param bool $getCount * - * @return boolean + * @return bool * does this entity have data in this custom table */ static public function customGroupDataExistsForEntity($entityID, $table, $getCount = FALSE) { @@ -1242,9 +1242,8 @@ ORDER BY civicrm_custom_group.weight, * @param bool $force * whether to force the deletion, even if there are custom fields. * - * @return boolean + * @return bool * false if field exists for this group, true if group gets deleted. - * */ public static function deleteGroup($group, $force = FALSE) { @@ -1695,8 +1694,7 @@ ORDER BY civicrm_custom_group.weight, * @param array $removeCustomFieldTypes * Remove custom fields of a type eg: array("Individual") ;. * - * - * @return boolean + * @return bool * false if it matches else true */ public static function checkCustomField($customFieldId, &$removeCustomFieldTypes) { diff --git a/CRM/Core/BAO/Discount.php b/CRM/Core/BAO/Discount.php index 496b8cf21d..325dabb7f1 100644 --- a/CRM/Core/BAO/Discount.php +++ b/CRM/Core/BAO/Discount.php @@ -47,7 +47,7 @@ class CRM_Core_BAO_Discount extends CRM_Core_DAO_Discount { * @param int $entityId * @param string $entityTable * - * @return boolean + * @return bool */ public static function del($entityId, $entityTable) { // delete all discount records with the selected discounted id diff --git a/CRM/Core/BAO/OptionValue.php b/CRM/Core/BAO/OptionValue.php index e29148c0df..f0ce92cbfc 100644 --- a/CRM/Core/BAO/OptionValue.php +++ b/CRM/Core/BAO/OptionValue.php @@ -231,7 +231,7 @@ class CRM_Core_BAO_OptionValue extends CRM_Core_DAO_OptionValue { * * @param int $optionValueId * - * @return boolean + * @return bool * */ public static function del($optionValueId) { diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index 250e1e1aaf..ada8d3eecc 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -79,7 +79,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * @param int $domainID * @param bool $force * - * @return boolean + * @return bool * true if item is already in cache */ public static function inCache( @@ -637,14 +637,14 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * * @return array * the following information as appropriate for each setting - * - name - * - type - * - default - * - add (CiviCRM version added) - * - is_domain - * - is_contact - * - description - * - help_text + * - name + * - type + * - default + * - add (CiviCRM version added) + * - is_domain + * - is_contact + * - description + * - help_text */ public static function getSettingSpecification( $componentID = NULL, @@ -1111,7 +1111,7 @@ AND domain_id = %3 /** * Civicrm_setting didn't exist before 4.1.alpha1 and this function helps taking decisions during upgrade * - * @return boolean + * @return bool */ public static function isUpgradeFromPreFourOneAlpha1() { if (CRM_Core_Config::isUpgradeMode()) { diff --git a/CRM/Core/BAO/Tag.php b/CRM/Core/BAO/Tag.php index 68f3b316f2..730fd8d3af 100644 --- a/CRM/Core/BAO/Tag.php +++ b/CRM/Core/BAO/Tag.php @@ -319,7 +319,7 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { * @param int $id * Tag id. * - * @return boolean + * @return bool */ public static function del($id) { // since this is a destructive operation, lets make sure @@ -408,7 +408,7 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { * @param array $params * (reference ) an assoc array of name/value pairs. * - * @return boolean + * @return bool */ public static function dataExists(&$params) { // Disallow empty values except for the number zero. diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 4f35d1ab3b..7d868d1916 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -409,7 +409,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { /** * Performs the server side validation * @since 1.0 - * @return boolean + * @return bool * true if no error found * @throws HTML_QuickForm_Error */ @@ -643,7 +643,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { /** * Boolean function to determine if this is a one form page * - * @return boolean + * @return bool */ public function isSimpleForm() { return $this->_state->getType() & (CRM_Core_State::START | CRM_Core_State::FINISH); @@ -1570,7 +1570,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * - cid from the url if the caller has ACL permission to view * - fallback is logged in user (or ? NULL if no logged in user) (@todo wouldn't 0 be more intuitive?) * - * @return NULL|integer + * @return NULL|int */ public function getContactID() { $tempID = CRM_Utils_Request::retrieve('cid', 'Positive', $this); diff --git a/CRM/Core/Payment/BaseIPN.php b/CRM/Core/Payment/BaseIPN.php index f0f0499009..dd66874cd2 100644 --- a/CRM/Core/Payment/BaseIPN.php +++ b/CRM/Core/Payment/BaseIPN.php @@ -86,7 +86,7 @@ class CRM_Core_Payment_BaseIPN { * Boolean Return FALSE if the relevant objects don't exist. * @param int $paymentProcessorID * Id of the payment processor ID in use. - * @return boolean + * @return bool */ public function validateData(&$input, &$ids, &$objects, $required = TRUE, $paymentProcessorID = NULL) { @@ -135,7 +135,7 @@ class CRM_Core_Payment_BaseIPN { * @param int $paymentProcessorID * @param array $error_handling * - * @return boolean + * @return bool */ public function loadObjects(&$input, &$ids, &$objects, $required, $paymentProcessorID, $error_handling = NULL) { if (empty($error_handling)) { @@ -185,7 +185,7 @@ class CRM_Core_Payment_BaseIPN { * @param array $objects * @param object $transaction * @param array $input - * @return boolean + * @return bool */ public function failed(&$objects, &$transaction, $input = array()) { $contribution = &$objects['contribution']; @@ -265,7 +265,7 @@ class CRM_Core_Payment_BaseIPN { * Handled pending contribution status * @param array $objects * @param object $transaction - * @return boolean + * @return bool */ public function pending(&$objects, &$transaction) { $transaction->commit(); diff --git a/CRM/Core/Payment/PayPalImpl.php b/CRM/Core/Payment/PayPalImpl.php index 2ab4853b2a..4404f71034 100644 --- a/CRM/Core/Payment/PayPalImpl.php +++ b/CRM/Core/Payment/PayPalImpl.php @@ -426,7 +426,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment { * @param string $method * Method to check for. * - * @return boolean + * @return bool */ public function isSupported($method = 'cancelSubscription') { if ($this->_paymentProcessor['payment_processor_type'] != 'PayPal') { diff --git a/CRM/Core/Permission/WordPress.php b/CRM/Core/Permission/WordPress.php index 663644d7b5..97cbf01c1b 100644 --- a/CRM/Core/Permission/WordPress.php +++ b/CRM/Core/Permission/WordPress.php @@ -43,7 +43,7 @@ class CRM_Core_Permission_WordPress extends CRM_Core_Permission_Base { * @param string $str * The permission to check. * - * @return boolean + * @return bool * true if yes, else false */ public function check($str) { diff --git a/CRM/Event/BAO/Participant.php b/CRM/Event/BAO/Participant.php index 32a611db0b..6c49c109fe 100644 --- a/CRM/Event/BAO/Participant.php +++ b/CRM/Event/BAO/Participant.php @@ -2167,7 +2167,7 @@ WHERE (li.entity_table = 'civicrm_participant' AND li.entity_id = {$participantI * @param array $props * whatever is known about this dao object. * - * @return Array|bool + * @return array|bool */ public static function buildOptions($fieldName, $context = NULL, $props = array()) { $params = array('condition' => array()); diff --git a/api/api.php b/api/api.php index 3d526247ec..9425c81057 100644 --- a/api/api.php +++ b/api/api.php @@ -89,7 +89,7 @@ function _civicrm_api3_api_getfields(&$apiRequest) { * * @param $result * - * @return boolean + * @return bool * true if error, false otherwise */ function civicrm_error($result) { diff --git a/api/v3/Address.php b/api/v3/Address.php index 65ae3b95ff..6cc1bfdc1e 100644 --- a/api/v3/Address.php +++ b/api/v3/Address.php @@ -142,13 +142,11 @@ function civicrm_api3_address_delete($params) { * * @param mixed[] (reference ) input parameters * - * {@example AddressGet.php 0} * @param array $params * An associative array of name/value pairs. * * @return array * details of found addresses else error - * {@getfields address_get} */ function civicrm_api3_address_get(&$params) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, TRUE, 'Address'); diff --git a/api/v3/Case.php b/api/v3/Case.php index c8aa5ca9a7..bb551985a7 100644 --- a/api/v3/Case.php +++ b/api/v3/Case.php @@ -368,7 +368,7 @@ function civicrm_api3_case_update($params) { * 'move_to_trash' => bool (defaults to false) * * @throws API_Exception - * @return boolean + * @return bool * true if success, else false */ function civicrm_api3_case_delete($params) { diff --git a/api/v3/ContributionRecur.php b/api/v3/ContributionRecur.php index 08b69df2d1..6b82a8a660 100644 --- a/api/v3/ContributionRecur.php +++ b/api/v3/ContributionRecur.php @@ -43,7 +43,6 @@ * * @return array * api result array - * {@getfields contribution_recur_create} */ function civicrm_api3_contribution_recur_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); @@ -73,7 +72,6 @@ function _civicrm_api3_contribution_recur_create_spec(&$params) { * * @return array * API result Array of matching contribution_recurs - * {@getfields contribution_recur_get} */ function civicrm_api3_contribution_recur_get($params) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); @@ -85,7 +83,7 @@ function civicrm_api3_contribution_recur_get($params) { * @param array $params * (reference) array containing id of the recurring contribution. * - * @return boolean + * @return bool * returns true is successfully cancelled */ function civicrm_api3_contribution_recur_cancel($params) { @@ -105,8 +103,6 @@ function civicrm_api3_contribution_recur_cancel($params) { * * @return array * API result array - * message otherwise - * {@getfields contribution_recur_delete} */ function civicrm_api3_contribution_recur_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); diff --git a/api/v3/Email.php b/api/v3/Email.php index 34636e58e8..f4d16f4de4 100644 --- a/api/v3/Email.php +++ b/api/v3/Email.php @@ -46,7 +46,6 @@ * * @return array * API result array - * {@getfields email_create} */ function civicrm_api3_email_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); @@ -73,9 +72,8 @@ function _civicrm_api3_email_create_spec(&$params) { * * @example EmailDelete.php Standard Delete Example * - * @return boolean + * @return bool * | error true if successfull, error otherwise - * {@getfields email_delete} */ function civicrm_api3_email_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); @@ -94,7 +92,6 @@ function civicrm_api3_email_delete($params) { * * @return array * api result array - * {@getfields email_get} */ function civicrm_api3_email_get($params) { diff --git a/api/v3/GroupNesting.php b/api/v3/GroupNesting.php index a6643f1af5..c0bf9d7e6a 100644 --- a/api/v3/GroupNesting.php +++ b/api/v3/GroupNesting.php @@ -60,7 +60,6 @@ function civicrm_api3_group_nesting_get($params) { * * @return array * TBD - * {@getfields GroupNesting_create * @todo Work out the return value. */ function civicrm_api3_group_nesting_create($params) { diff --git a/api/v3/LineItem.php b/api/v3/LineItem.php index e26cc62d43..77095c305b 100644 --- a/api/v3/LineItem.php +++ b/api/v3/LineItem.php @@ -44,7 +44,6 @@ * * @return array * api result array - * {@getfields line_item_create} */ function civicrm_api3_line_item_create($params) { $params = CRM_Contribute_BAO_Contribution::checkTaxAmount($params, TRUE); @@ -75,7 +74,6 @@ function _civicrm_api3_line_item_create_spec(&$params) { * * @return array * Array of matching line_items - * {@getfields line_item_get} */ function civicrm_api3_line_item_get($params) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); @@ -93,7 +91,6 @@ function civicrm_api3_line_item_get($params) { * * @return array * API result array - * {@getfields line_item_delete} */ function civicrm_api3_line_item_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); diff --git a/api/v3/MailingEventQueue.php b/api/v3/MailingEventQueue.php index adada75eb3..3663123667 100644 --- a/api/v3/MailingEventQueue.php +++ b/api/v3/MailingEventQueue.php @@ -34,17 +34,16 @@ * $Id$ * */ + /** * Handle a confirm event * * @param array $params * Associative array of property. - * name/value pairs to insert in new 'survey' * * @throws Exception * @return array * api result array - * {@getfields mailing_event_confirm_create} */ function civicrm_api3_mailing_event_queue_create($params) { if (!array_key_exists('id', $params) && !array_key_exists('email_id', $params) && !array_key_exists('phone_id', $params)) { diff --git a/api/v3/MembershipType.php b/api/v3/MembershipType.php index 2ba0b8a8f7..483fb710f7 100644 --- a/api/v3/MembershipType.php +++ b/api/v3/MembershipType.php @@ -100,7 +100,7 @@ function civicrm_api3_membership_type_get($params) { * * @param array $params * - * @return boolean + * @return bool * true if success, else false */ function civicrm_api3_membership_type_delete($params) { diff --git a/api/v3/ParticipantPayment.php b/api/v3/ParticipantPayment.php index be5ff03ba8..d71dbc9999 100644 --- a/api/v3/ParticipantPayment.php +++ b/api/v3/ParticipantPayment.php @@ -44,12 +44,9 @@ * * @param array $params * An associative array of name/value property values of civicrm_participant_payment. - * @example ParticipantPaymentCreate.php - * {@example ParticipantPaymentCreate.php 0} * * @return array * Array of newly created payment property values. - * {@getfields ParticipantPayment_create} */ function civicrm_api3_participant_payment_create($params) { diff --git a/api/v3/SurveyRespondant.php b/api/v3/SurveyRespondant.php index 11cd9170de..86da40035e 100644 --- a/api/v3/SurveyRespondant.php +++ b/api/v3/SurveyRespondant.php @@ -48,7 +48,6 @@ function _civicrm_api3_survey_respondant_deprecation() { * (reference ) input parameters. * * @return array - * contribution_id of created or updated record */ function civicrm_api3_survey_respondant_get(&$params) { -- 2.25.1