From d1b0d05ec1b6bd4ecbeb474641387e44fd0ba504 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 2 Feb 2015 20:46:44 +1300 Subject: [PATCH] more comment fixes --- api/v3/Attachment.php | 3 ++- api/v3/ContactType.php | 1 - api/v3/ContributionRecur.php | 8 ++++---- api/v3/CustomGroup.php | 2 +- api/v3/Dashboard.php | 2 +- api/v3/DashboardContact.php | 1 - api/v3/Extension.php | 8 ++++---- api/v3/GroupContact.php | 1 + api/v3/LineItem.php | 2 +- api/v3/Mailing.php | 3 +++ api/v3/MailingContact.php | 2 +- api/v3/MailingGroup.php | 3 ++- api/v3/MembershipBlock.php | 5 ++--- api/v3/MembershipStatus.php | 12 ++++-------- api/v3/ParticipantStatusType.php | 16 +++++----------- api/v3/PaymentProcessor.php | 13 ++++--------- api/v3/PaymentProcessorType.php | 4 +++- api/v3/Pledge.php | 1 - api/v3/Profile.php | 10 ++++++++-- api/v3/RelationshipType.php | 1 + api/v3/System.php | 6 ++++-- 21 files changed, 51 insertions(+), 53 deletions(-) diff --git a/api/v3/Attachment.php b/api/v3/Attachment.php index a77cc1adaf..829235fde6 100644 --- a/api/v3/Attachment.php +++ b/api/v3/Attachment.php @@ -432,7 +432,8 @@ function _civicrm_api3_attachment_getfields() { $spec['description'] = $fileFields['description']; $spec['upload_date'] = $fileFields['upload_date']; $spec['entity_table'] = $entityFileFields['entity_table']; - $spec['entity_table']['title'] = CRM_Utils_Array::value('title', $spec['entity_table'], 'Entity Table') . ' (write-once)'; // would be hard to securely handle changes + // Would be hard to securely handle changes. + $spec['entity_table']['title'] = CRM_Utils_Array::value('title', $spec['entity_table'], 'Entity Table') . ' (write-once)'; $spec['entity_id'] = $entityFileFields['entity_id']; $spec['entity_id']['title'] = CRM_Utils_Array::value('title', $spec['entity_id'], 'Entity ID') . ' (write-once)'; // would be hard to securely handle changes $spec['url'] = array( diff --git a/api/v3/ContactType.php b/api/v3/ContactType.php index 9200a210b8..116fd8f037 100644 --- a/api/v3/ContactType.php +++ b/api/v3/ContactType.php @@ -90,7 +90,6 @@ function civicrm_api3_contact_type_get($params) { * * @return array * API Result Array - * */ function civicrm_api3_contact_type_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); diff --git a/api/v3/ContributionRecur.php b/api/v3/ContributionRecur.php index 0933e59cf2..41e8bbaf06 100644 --- a/api/v3/ContributionRecur.php +++ b/api/v3/ContributionRecur.php @@ -62,7 +62,7 @@ function _civicrm_api3_contribution_recur_create_spec(&$params) { } /** - * Returns array of contribution_recurs matching a set of one or more group properties + * Returns array of contribution_recurs matching a set of one or more group properties. * * @param array $params * Array of one or more valid. @@ -77,10 +77,10 @@ function civicrm_api3_contribution_recur_get($params) { } /** - * Cancel a recurring contribution of existing contribution_recur.id + * Cancel a recurring contribution of existing contribution_recur.id. * * @param array $params - * (reference) array containing id of the recurring contribution. + * Array containing id of the recurring contribution. * * @return bool * returns true is successfully cancelled @@ -91,7 +91,7 @@ function civicrm_api3_contribution_recur_cancel($params) { } /** - * delete an existing contribution_recur + * Delete an existing contribution_recur. * * This method is used to delete any existing contribution_recur. id of the group * to be deleted is required field in $params array diff --git a/api/v3/CustomGroup.php b/api/v3/CustomGroup.php index 0fcba799c0..dbe0bfb4cd 100644 --- a/api/v3/CustomGroup.php +++ b/api/v3/CustomGroup.php @@ -40,7 +40,7 @@ * * The 'extends' value accepts an array or a comma separated string. * e.g array( - 'Individual','Contact') or 'Individual,Contact' + * 'Individual','Contact') or 'Individual,Contact' * See the CRM Data Model for custom_group property definitions * $params['class_name'] is a required field, class being extended. * diff --git a/api/v3/Dashboard.php b/api/v3/Dashboard.php index 2b820c68e4..af73c3aac4 100644 --- a/api/v3/Dashboard.php +++ b/api/v3/Dashboard.php @@ -71,7 +71,7 @@ function _civicrm_api3_dashboard_create_spec(&$params) { } /** - * Gets a CiviCRM Dashlets according to parameters + * Gets a CiviCRM Dashlets according to parameters. * * @param array $params * diff --git a/api/v3/DashboardContact.php b/api/v3/DashboardContact.php index e96ef599e8..53bef6a33a 100644 --- a/api/v3/DashboardContact.php +++ b/api/v3/DashboardContact.php @@ -40,7 +40,6 @@ * @param array $params * * @return array - * */ function civicrm_api3_dashboard_contact_create($params) { if (empty($params['id'])) { diff --git a/api/v3/Extension.php b/api/v3/Extension.php index 80fb704ec3..7ca3d97a0d 100644 --- a/api/v3/Extension.php +++ b/api/v3/Extension.php @@ -68,7 +68,7 @@ function civicrm_api3_extension_install($params) { } /** - * Upgrade an extension - runs upgrade_N hooks and system.flush + * Upgrade an extension - runs upgrade_N hooks and system.flush. * * @return array * API result @@ -251,13 +251,12 @@ function civicrm_api3_extension_refresh($params) { } /** - * Get a list of available extensions + * Get a list of available extensions. * * @param array $params * * @return array * API result - * @example ExtensionGet.php */ function civicrm_api3_extension_get($params) { $statuses = CRM_Extension_System::singleton()->getManager()->getStatuses(); @@ -277,10 +276,11 @@ function civicrm_api3_extension_get($params) { } /** - * Determine the list of extension keys + * Determine the list of extension keys. * * @param array $params * API request params with 'key' or 'keys'. + * * @return array * Array of extension keys * @throws API_Exception diff --git a/api/v3/GroupContact.php b/api/v3/GroupContact.php index 6afb6c26e8..bb90583b84 100644 --- a/api/v3/GroupContact.php +++ b/api/v3/GroupContact.php @@ -145,6 +145,7 @@ function _civicrm_api3_group_contact_delete_spec(&$params) { } /** + * Get pending group contacts. * * @param array $params * diff --git a/api/v3/LineItem.php b/api/v3/LineItem.php index 28214af7f5..4d7732ea97 100644 --- a/api/v3/LineItem.php +++ b/api/v3/LineItem.php @@ -67,7 +67,7 @@ function _civicrm_api3_line_item_create_spec(&$params) { } /** - * Returns array of line_items matching a set of one or more group properties + * Returns array of line_items matching a set of one or more group properties. * * @param array $params * Array of one or more valid property_name=>value pairs. If $params is set. diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 02c87b469e..3d159ec4f6 100755 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -128,6 +128,7 @@ function civicrm_api3_mailing_delete($params) { * Handle a get event. * * @param array $params + * * @return array */ function civicrm_api3_mailing_get($params) { @@ -251,6 +252,8 @@ function civicrm_api3_mailing_event_confirm($params) { } /** + * Declare deprecated functions. + * * @deprecated api notice * @return array * Array of deprecated actions diff --git a/api/v3/MailingContact.php b/api/v3/MailingContact.php index d259f194b6..cc8d00841d 100644 --- a/api/v3/MailingContact.php +++ b/api/v3/MailingContact.php @@ -277,7 +277,7 @@ INNER JOIN civicrm_mailing_event_bounce meb ON meb.event_queue_id = meq.id } /** - * Get count of all the mailings that a contact was involved with + * Get count of all the mailings that a contact was involved with. * * @param array $params * Input parameters per getfields diff --git a/api/v3/MailingGroup.php b/api/v3/MailingGroup.php index 8eb6673bd9..eacb3b169c 100644 --- a/api/v3/MailingGroup.php +++ b/api/v3/MailingGroup.php @@ -74,7 +74,8 @@ function civicrm_api3_mailing_group_event_domain_unsubscribe($params) { } /** - * Handle a resubscription event + * Handle a re-subscription event. + * * @deprecated * * @param array $params diff --git a/api/v3/MembershipBlock.php b/api/v3/MembershipBlock.php index ed21a65ff6..a5d200512d 100644 --- a/api/v3/MembershipBlock.php +++ b/api/v3/MembershipBlock.php @@ -33,11 +33,10 @@ * * @copyright CiviCRM LLC (c) 2004-2014 * @version $Id: MembershipBlock.php 30171 2010-10-14 09:11:27Z mover $ - * */ /** - * API to Create or update a Membership Type + * API to Create or update a Membership Type. * * @param array $params * An associative array of name/value property values of civicrm_membership_block. @@ -80,7 +79,7 @@ function civicrm_api3_membership_block_get($params) { } /** - * Deletes an existing membership type + * Deletes an existing membership type. * * This API is used for deleting a membership type * Required parameters : id of a membership type diff --git a/api/v3/MembershipStatus.php b/api/v3/MembershipStatus.php index 3738d41ee4..78f2d77bec 100644 --- a/api/v3/MembershipStatus.php +++ b/api/v3/MembershipStatus.php @@ -33,20 +33,16 @@ * * @copyright CiviCRM LLC (c) 2004-2014 * @version $Id: MembershipStatus.php 30171 2010-10-14 09:11:27Z mover $ - * */ /** - * Create a Membership Status - * - * This API is used for creating a Membership Status + * Create a Membership Status. * * @param array $params - * An associative array of name/value property values of civicrm_membership_status. + * Array of name/value property values of civicrm_membership_status. * * @return array * Array of newly created membership status property values. - * {@getfields MembershipStatus_create} */ function civicrm_api3_membership_status_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); @@ -69,7 +65,7 @@ function civicrm_api3_membership_status_get($params) { } /** - * Update an existing membership status + * Update an existing membership status. * * This api is used for updating an existing membership status. * Required parameters : id of a membership status @@ -81,7 +77,7 @@ function civicrm_api3_membership_status_get($params) { * @return array * Array of updated membership status property values */ -function &civicrm_api3_membership_status_update($params) { +function civicrm_api3_membership_status_update($params) { civicrm_api3_verify_mandatory($params, NULL, array('id')); //don't allow duplicate names. diff --git a/api/v3/ParticipantStatusType.php b/api/v3/ParticipantStatusType.php index 9b8870f876..f08ee8dd7d 100644 --- a/api/v3/ParticipantStatusType.php +++ b/api/v3/ParticipantStatusType.php @@ -34,27 +34,25 @@ */ /** - * create/update participant_status + * Create/update participant_status. * * This API is used to create new participant_status or update any of the existing * In case of updating existing participant_status, id of that particular participant_status must * be in $params array. * * @param array $params - * Associative array of property. + * Array of property. * name/value pairs to insert in new 'participant_status' * * @return array * participant_status array - * {@getfields ParticipantStatusType_create} - * @example ParticipantStatusTypeCreate.php */ function civicrm_api3_participant_status_type_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } /** - * Returns array of participant_statuses matching a set of one or more group properties + * Returns array of participant_statuses matching a set of one or more group properties. * * @param array $params * Array of one or more valid. @@ -63,27 +61,23 @@ function civicrm_api3_participant_status_type_create($params) { * * @return array * Array of matching participant_statuses - * {@getfields ParticipantStatusType_get} - * @example ParticipantStatusTypeGet.php */ function civicrm_api3_participant_status_type_get($params) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); } /** - * delete an existing participant_status + * Delete an existing participant_status. * * This method is used to delete any existing participant_status. id of the group * to be deleted is required field in $params array * * @param array $params - * (reference) array containing id of the group. + * Array containing id of the group. * to be deleted * * @return array * api result array - * {@getfields ParticipantStatusType_delete} - * @example ParticipantStatusTypeDelete.php */ function civicrm_api3_participant_status_type_delete($params) { if (CRM_Event_BAO_ParticipantStatusType::deleteParticipantStatusType($params['id'])) { diff --git a/api/v3/PaymentProcessor.php b/api/v3/PaymentProcessor.php index 81424aad1a..1ced6d606e 100644 --- a/api/v3/PaymentProcessor.php +++ b/api/v3/PaymentProcessor.php @@ -35,10 +35,7 @@ */ /** - * Add/Update a PaymentProcessor - * - * Allowed @params array keys are: - * {@getfields payment_processor_create} + * Add/Update a PaymentProcessor. * * @param array $params * @@ -64,10 +61,9 @@ function _civicrm_api3_payment_processor_create_spec(&$params) { } /** - * Deletes an existing PaymentProcessor + * Deletes an existing PaymentProcessor. * * @param array $params - * {@getfields payment_processor_delete} * * @return array * API result Array @@ -77,11 +73,10 @@ function civicrm_api3_payment_processor_delete($params) { } /** - * Retrieve one or more PaymentProcessor + * Retrieve one or more PaymentProcessor. * * @param array $params - * An associative array of name/value pairs. - * {@getfields payment_processor_get} + * Array of name/value pairs. * * @return array * details of found PaymentProcessor diff --git a/api/v3/PaymentProcessorType.php b/api/v3/PaymentProcessorType.php index 138c42d457..5d671ebc66 100644 --- a/api/v3/PaymentProcessorType.php +++ b/api/v3/PaymentProcessorType.php @@ -76,8 +76,10 @@ function _civicrm_api3_payment_processor_type_create_spec(&$params) { } /** - * get all payment_processor types + * Get all payment_processor types. + * * @param array $params + * * @return array */ function civicrm_api3_payment_processor_type_get($params) { diff --git a/api/v3/Pledge.php b/api/v3/Pledge.php index dcbcf40335..190d6288d1 100644 --- a/api/v3/Pledge.php +++ b/api/v3/Pledge.php @@ -154,7 +154,6 @@ function _civicrm_api3_pledge_get_defaults() { * * @param array $values * The reformatted properties that we can use internally. - * */ function _civicrm_api3_pledge_format_params(&$values) { diff --git a/api/v3/Profile.php b/api/v3/Profile.php index 3432a49364..4a3874d69b 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -333,12 +333,14 @@ function _civicrm_api3_profile_submit_spec(&$params, $apirequest) { } /** + * Set profile - deprecated. + * * @deprecated - calling this function directly is deprecated as 'set' is not a clear action * use submit * Update Profile field values. * * @param array $params - * Associative array of property name/value. + * Array of property name/value. * pairs to update profile field values * * @return array @@ -351,11 +353,13 @@ function civicrm_api3_profile_set($params) { } /** + * Apply profile - deprecated. + * * @deprecated - appears to be an internal function - should not be accessible via api * Provide formatted values for profile fields. * * @param array $params - * Associative array of property name/value. + * Array of property name/value. * pairs to profile field values * * @throws API_Exception @@ -395,6 +399,8 @@ function civicrm_api3_profile_apply($params) { /** + * Get pseudo profile 'billing'. + * * This is a function to help us 'pretend' billing is a profile & treat it like it is one. * It gets standard credit card address fields etc * Note this is 'better' that the inbuilt version as it will pull in fallback values diff --git a/api/v3/RelationshipType.php b/api/v3/RelationshipType.php index 29fe4a8941..7e2eb908e8 100644 --- a/api/v3/RelationshipType.php +++ b/api/v3/RelationshipType.php @@ -92,6 +92,7 @@ function _civicrm_api3_relationship_type_create_spec(&$params) { * Get all relationship types. * * @param array $params + * * @return array */ function civicrm_api3_relationship_type_get($params) { diff --git a/api/v3/System.php b/api/v3/System.php index c9d5a62316..92f8c06591 100644 --- a/api/v3/System.php +++ b/api/v3/System.php @@ -126,7 +126,8 @@ function civicrm_api3_system_log($params) { } /** - * Metadata for log function + * Metadata for log function. + * * @param array $params */ function _civicrm_api3_system_log_spec(&$params) { @@ -161,9 +162,10 @@ function _civicrm_api3_system_log_spec(&$params) { } /** - * System.Get API + * System.Get API. * * @param array $params + * * @return array */ function civicrm_api3_system_get($params) { -- 2.25.1