From dc64d047267e30477353bbd8ade2cc5c862ef122 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 2 Feb 2015 21:11:17 +1300 Subject: [PATCH] more api comment fixes --- api/Exception.php | 8 ++++++++ api/api.php | 12 +++++++++--- api/class.api.php | 21 ++++++++++++++++++--- api/v3/ActionSchedule.php | 1 - api/v3/ActivityContact.php | 4 ++-- api/v3/Attachment.php | 7 +++++-- api/v3/CaseType.php | 1 - api/v3/Constant.php | 6 ++++++ api/v3/Contact.php | 8 +++++++- api/v3/Contribution.php | 2 ++ api/v3/ContributionPage.php | 2 +- api/v3/CustomValue.php | 3 +-- api/v3/Dashboard.php | 1 - api/v3/DashboardContact.php | 3 ++- api/v3/Extension.php | 13 +++++-------- api/v3/Generic.php | 2 ++ api/v3/GroupContact.php | 10 +++++++++- api/v3/GroupOrganization.php | 1 - api/v3/LineItem.php | 4 +--- api/v3/Mailing.php | 8 ++++---- api/v3/MailingAB.php | 1 + api/v3/MailingComponent.php | 1 + api/v3/MailingEventQueue.php | 1 + api/v3/MailingGroup.php | 10 +++++++++- api/v3/Membership.php | 6 ++++-- api/v3/MembershipStatus.php | 3 ++- api/v3/MessageTemplate.php | 2 ++ api/v3/ParticipantPayment.php | 2 +- api/v3/Profile.php | 11 ++++++----- api/v3/Relationship.php | 1 - api/v3/RelationshipType.php | 1 + api/v3/ReportInstance.php | 2 +- api/v3/ReportTemplate.php | 5 +---- api/v3/Setting.php | 9 +++++---- api/v3/SurveyRespondant.php | 6 +++++- api/v3/UFGroup.php | 4 +++- api/v3/Website.php | 1 + 37 files changed, 126 insertions(+), 57 deletions(-) diff --git a/api/Exception.php b/api/Exception.php index 517755bae6..2bb9dcdd76 100644 --- a/api/Exception.php +++ b/api/Exception.php @@ -60,6 +60,8 @@ class API_Exception extends Exception { } /** + * Get extra parameters. + * * @return array */ public function getExtraParams() { @@ -67,6 +69,8 @@ class API_Exception extends Exception { } /** + * Get error codes. + * * @return array */ public function getErrorCodes() { @@ -89,6 +93,8 @@ class CiviCRM_API3_Exception extends Exception { private $extraParams = array(); /** + * Class constructor. + * * @param string $message * The human friendly error message. * @param mixed $error_code @@ -125,6 +131,8 @@ class CiviCRM_API3_Exception extends Exception { } /** + * Get extra parameters. + * * @return array */ public function getExtraParams() { diff --git a/api/api.php b/api/api.php index c9b5fbe564..6c263513e8 100644 --- a/api/api.php +++ b/api/api.php @@ -53,7 +53,9 @@ function civicrm_api3($entity, $action, $params = array()) { } /** - * Call getfields from api wrapper. This function ensures that settings that + * Call getfields from api wrapper. + * + * This function ensures that settings that * could alter getfields output (e.g. action for all api & profile_id for * profile api ) are consistently passed in. * @@ -64,6 +66,7 @@ function civicrm_api3($entity, $action, $params = array()) { * @todo other output modifiers include contact_type * * @param array $apiRequest + * * @return array * getfields output */ @@ -165,11 +168,12 @@ function _civicrm_api_replace_variables(&$params, &$parentResult, $separator = ' } /** - * Convert possibly camel name to underscore separated entity name + * Convert possibly camel name to underscore separated entity name. * * @param string $entity * Entity name in various formats e.g. Contribution, contribution, * OptionValue, option_value, UFJoin, uf_join. + * * @return string * Entity name in underscore separated format. * @@ -190,9 +194,11 @@ function _civicrm_api_get_entity_name_from_camel($entity) { } /** - * Having a DAO object find the entity name + * Having a DAO object find the entity name. + * * @param object $bao * DAO being passed in. + * * @return string */ function _civicrm_api_get_entity_name_from_dao($bao) { diff --git a/api/class.api.php b/api/class.api.php index 119b7c1f3d..7a5f72cdec 100644 --- a/api/class.api.php +++ b/api/class.api.php @@ -79,6 +79,8 @@ class civicrm_api3 { /** + * Class constructor. + * * @param array $config API configuration. */ public function __construct($config = NULL) { @@ -126,6 +128,8 @@ class civicrm_api3 { } /** + * Convert to string. + * * @return string */ public function __toString() { @@ -133,9 +137,11 @@ class civicrm_api3 { } /** - * Perform action + * Perform action. + * * @param $action * @param $params + * * @return bool */ public function __call($action, $params) { @@ -149,7 +155,8 @@ class civicrm_api3 { } /** - * As of PHP 5.3.0 + * As of PHP 5.3.0. + * * @param $name * @param $arguments */ @@ -159,10 +166,12 @@ class civicrm_api3 { } /** - * Call via rest + * Call via rest. + * * @param $entity * @param $action * @param array $params + * * @return \stdClass */ public function remoteCall($entity, $action, $params = array()) { @@ -208,6 +217,8 @@ class civicrm_api3 { } /** + * Call api function. + * * @param $entity * @param string $action * @param array $params @@ -296,6 +307,8 @@ class civicrm_api3 { } /** + * Is this an error. + * * @return bool */ public function is_error() { @@ -306,6 +319,7 @@ class civicrm_api3 { * Check if var is set. * * @param string $name + * * @return bool */ public function is_set($name) { @@ -316,6 +330,7 @@ class civicrm_api3 { * Get object. * * @param string $name + * * @return $this */ public function __get($name) { diff --git a/api/v3/ActionSchedule.php b/api/v3/ActionSchedule.php index 6fcd9cb1a5..ed0c42605c 100644 --- a/api/v3/ActionSchedule.php +++ b/api/v3/ActionSchedule.php @@ -72,7 +72,6 @@ function civicrm_api3_action_schedule_create($params) { function _civicrm_api3_action_schedule_create_spec(&$params) { $params['title']['api.required'] = TRUE; $params['mapping_id']['api.required'] = TRUE; - // $params['entity_status']['api.required'] = TRUE; $params['entity_value']['api.required'] = TRUE; } diff --git a/api/v3/ActivityContact.php b/api/v3/ActivityContact.php index c4aecb6cb6..d9220ac8ca 100644 --- a/api/v3/ActivityContact.php +++ b/api/v3/ActivityContact.php @@ -36,7 +36,7 @@ */ /** - * Add a record relating a contact with an activity. + * Add a record relating a contact with an activity. * * @param array $params * @@ -61,7 +61,7 @@ function _civicrm_api3_activity_contact_create_spec(&$params) { } /** - * Deletes an existing ActivityContact record + * Delete an existing ActivityContact record. * * @param array $params * diff --git a/api/v3/Attachment.php b/api/v3/Attachment.php index 829235fde6..455fd96517 100644 --- a/api/v3/Attachment.php +++ b/api/v3/Attachment.php @@ -66,7 +66,6 @@ * @subpackage API_Attachment * @copyright CiviCRM LLC (c) 2004-2014 * $Id: $ - * */ /** @@ -163,7 +162,10 @@ function _civicrm_api3_attachment_get_spec(&$spec) { } /** + * Get attachment. + * * @param array $params + * * @return array * per APIv3 * @throws API_Exception validation errors @@ -308,7 +310,8 @@ function __civicrm_api3_attachment_find($params, $id, $file, $entityFile, $isTru * * @param array $params * - * @return array (0 => int $id, 1 => array $file, 2 => array $entityFile, 3 => string $name, 4 => string $content, + * @return array + * (0 => int $id, 1 => array $file, 2 => array $entityFile, 3 => string $name, 4 => string $content, * 5 => string $moveFile, 6 => $isTrusted, 7 => bool $returnContent) * - array $file: whitelisted fields that can pass through directly to civicrm_file * - array $entityFile: whitelisted fields that can pass through directly to civicrm_entity_file diff --git a/api/v3/CaseType.php b/api/v3/CaseType.php index dfdf62d092..90f8e1b7eb 100644 --- a/api/v3/CaseType.php +++ b/api/v3/CaseType.php @@ -43,7 +43,6 @@ * @throws API_Exception * @return array * API result array - * */ function civicrm_api3_case_type_create($params) { civicrm_api3_verify_mandatory($params, _civicrm_api3_get_DAO(__FUNCTION__)); diff --git a/api/v3/Constant.php b/api/v3/Constant.php index ac42c16533..1b7363e4b0 100644 --- a/api/v3/Constant.php +++ b/api/v3/Constant.php @@ -36,6 +36,8 @@ */ /** + * Declare deprecated api entity. + * * @deprecated api notice * @return string * to indicate this entire api entity is deprecated @@ -45,6 +47,8 @@ function _civicrm_api3_constant_deprecation() { } /** + * Get constant values (deprecated). + * * @deprecated as of CiviCRM 4.4. * It's recommended to use the api getoptions action instead * @@ -136,6 +140,8 @@ function civicrm_api3_constant_get($params) { } /** + * Adjust metadata for constant get action. + * * @param array $params */ function _civicrm_api3_constant_get_spec(&$params) { diff --git a/api/v3/Contact.php b/api/v3/Contact.php index 38b7b31ad5..5d97e5362a 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -1006,7 +1006,13 @@ function _civicrm_api3_contact_getlist_params(&$request) { function _civicrm_api3_contact_getlist_output($result, $request) { $output = array(); if (!empty($result['values'])) { - $addressFields = array_intersect(array('street_address', 'city', 'state_province', 'country'), $request['params']['return']); + $addressFields = array_intersect(array( + 'street_address', + 'city', + 'state_province', + 'country', + ), + $request['params']['return']); foreach ($result['values'] as $row) { $data = array( 'id' => $row[$request['id_field']], diff --git a/api/v3/Contribution.php b/api/v3/Contribution.php index 8b65f55cea..5c696661f5 100644 --- a/api/v3/Contribution.php +++ b/api/v3/Contribution.php @@ -148,6 +148,7 @@ function _civicrm_api3_contribution_create_spec(&$params) { * The main purpose of the API is to provide integrators a level of stability not provided by * the core code or schema - this means we have to provide support for api calls (where possible) * across schema changes. + * * @param array $params */ function _civicrm_api3_contribution_create_legacy_support_45(&$params) { @@ -230,6 +231,7 @@ function civicrm_api3_contribution_get($params) { * * As of v4.4 we support multiple soft credit, so now contribution returns array with 'soft_credit' as key * but we still return first soft credit as a part of contribution array + * * @param $contribution */ function _civicrm_api3_format_soft_credit(&$contribution) { diff --git a/api/v3/ContributionPage.php b/api/v3/ContributionPage.php index a2ac132a9d..5c68330cb5 100644 --- a/api/v3/ContributionPage.php +++ b/api/v3/ContributionPage.php @@ -94,7 +94,7 @@ function civicrm_api3_contribution_page_delete($params) { } /** - * Submit a contribution_page. + * Submit a contribution_page. * * @param array $params * Array per getfields metadata. diff --git a/api/v3/CustomValue.php b/api/v3/CustomValue.php index 66a5dfb84c..748bbde23b 100644 --- a/api/v3/CustomValue.php +++ b/api/v3/CustomValue.php @@ -64,7 +64,6 @@ * @throws Exception * @return array * ['values' => TRUE] or ['is_error' => 1, 'error_message' => 'what went wrong'] - * */ function civicrm_api3_custom_value_create($params) { // @todo it's not clear where the entity_table is used as CRM_Core_BAO_CustomValueTable::setValues($create) @@ -226,7 +225,7 @@ function civicrm_api3_custom_value_get($params) { } /** - * Adjust Metadata for Get action + * Adjust Metadata for Get action. * * The metadata is used for setting defaults, documentation & validation. * diff --git a/api/v3/Dashboard.php b/api/v3/Dashboard.php index af73c3aac4..706d28e77f 100644 --- a/api/v3/Dashboard.php +++ b/api/v3/Dashboard.php @@ -34,7 +34,6 @@ * @subpackage API_Activity * @copyright CiviCRM LLC (c) 2004-2014 * @version $Id: Activity.php 30486 2010-11-02 16:12:09Z shot $ - * */ diff --git a/api/v3/DashboardContact.php b/api/v3/DashboardContact.php index 53bef6a33a..294930046b 100644 --- a/api/v3/DashboardContact.php +++ b/api/v3/DashboardContact.php @@ -101,12 +101,13 @@ function _civicrm_api3_dashboard_contact_check_params(&$params) { } /** - * Delete an existing dashboard-contact + * Delete an existing dashboard-contact. * * This method is used to delete any existing dashboard-board. the id of the dashboard-contact * is required field in $params array * * @param array $params + * * @return array * @throws \API_Exception */ diff --git a/api/v3/Extension.php b/api/v3/Extension.php index 7ca3d97a0d..2bbd45af13 100644 --- a/api/v3/Extension.php +++ b/api/v3/Extension.php @@ -36,11 +36,10 @@ define('API_V3_EXTENSION_DELIMITER', ','); * * @copyright CiviCRM LLC (c) 2004-2014 * @version $Id$ - * */ /** - * Install an extension + * Install an extension. * * @param array $params * Input parameters. @@ -98,7 +97,7 @@ function civicrm_api3_extension_upgrade() { } /** - * Enable an extension + * Enable an extension. * * @param array $params * Input parameters. @@ -142,7 +141,7 @@ function civicrm_api3_extension_disable($params) { } /** - * Uninstall an extension, + * Uninstall an extension. * * @param array $params * Input parameters. @@ -166,7 +165,7 @@ function civicrm_api3_extension_uninstall($params) { } /** - * Download and install an extension + * Download and install an extension. * * @param array $params * Input parameters. @@ -217,7 +216,7 @@ function civicrm_api3_extension_download($params) { } /** - * Download and install an extension + * Download and install an extension. * * @param array $params * Input parameters. @@ -226,8 +225,6 @@ function civicrm_api3_extension_download($params) { * * @return array * API result - * @example ExtensionRefresh.php - * */ function civicrm_api3_extension_refresh($params) { $defaults = array('local' => TRUE, 'remote' => TRUE); diff --git a/api/v3/Generic.php b/api/v3/Generic.php index a19e1a9ff6..daf416e65c 100644 --- a/api/v3/Generic.php +++ b/api/v3/Generic.php @@ -312,6 +312,8 @@ function civicrm_api3_generic_getoptions($apiRequest) { } /** + * Get metadata. + * * Function fills the 'options' array on the metadata returned by getfields if * 1) the param option 'get_options' is defined - e.g. $params['options']['get_options'] => array('custom_1) * (this is passed in as the $fieldsToResolve array) diff --git a/api/v3/GroupContact.php b/api/v3/GroupContact.php index bb90583b84..2fcd3400af 100644 --- a/api/v3/GroupContact.php +++ b/api/v3/GroupContact.php @@ -136,7 +136,8 @@ function civicrm_api3_group_contact_delete($params) { } /** - * modify metadata + * Adjust metadata. + * * @param array $params */ function _civicrm_api3_group_contact_delete_spec(&$params) { @@ -158,6 +159,7 @@ function civicrm_api3_group_contact_pending($params) { } /** + * Group contact helper function. * * @param array $params * @param string $op @@ -227,8 +229,12 @@ function _civicrm_api3_group_contact_common($params, $op = 'Added') { } /** + * Update group contact status. + * * @deprecated - this should be part of create but need to know we aren't missing something + * * @param array $params + * * @return bool * @throws \API_Exception */ @@ -248,6 +254,8 @@ function civicrm_api3_group_contact_update_status($params) { } /** + * Deprecated function notices. + * * @deprecated api notice * @return array * Array of deprecated actions diff --git a/api/v3/GroupOrganization.php b/api/v3/GroupOrganization.php index 7286dde362..451eefe300 100644 --- a/api/v3/GroupOrganization.php +++ b/api/v3/GroupOrganization.php @@ -56,7 +56,6 @@ function civicrm_api3_group_organization_get($params) { * Array. * * @return array - * */ function civicrm_api3_group_organization_create($params) { diff --git a/api/v3/LineItem.php b/api/v3/LineItem.php index 4d7732ea97..c44c4e1ab5 100644 --- a/api/v3/LineItem.php +++ b/api/v3/LineItem.php @@ -38,9 +38,7 @@ * Create or update a line_item. * * @param array $params - * Associative array of property. - * name/value pairs to insert in new 'line_item' - * @example LineItemCreate.php Std Create example + * Array of property name/value pairs to insert in new 'line_item' * * @return array * api result array diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 3d159ec4f6..7e36d2a7cb 100755 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -171,11 +171,11 @@ function civicrm_api3_mailing_submit($params) { $updateParams = array(); $updateParams['id'] = $params['id']; - // the BAO will autocreate the job - $updateParams['api.mailing_job.create'] = 0; // note: exact match to API default + // The BAO will auto-create the job - note: exact match to API default. + $updateParams['api.mailing_job.create'] = 0; - // note: we'll pass along scheduling/approval fields, but they may get ignored - // if we don't have permission + // Note: we'll pass along scheduling/approval fields, but they may get ignored + // if we don't have permission. if (isset($params['scheduled_date'])) { $updateParams['scheduled_date'] = $params['scheduled_date']; $updateParams['scheduled_id'] = CRM_Core_Session::getLoggedInContactID(); diff --git a/api/v3/MailingAB.php b/api/v3/MailingAB.php index 5849011d49..8685246a11 100755 --- a/api/v3/MailingAB.php +++ b/api/v3/MailingAB.php @@ -63,6 +63,7 @@ function civicrm_api3_mailing_a_b_delete($params) { * Handle a get event. * * @param array $params + * * @return array */ function civicrm_api3_mailing_a_b_get($params) { diff --git a/api/v3/MailingComponent.php b/api/v3/MailingComponent.php index cf4184226e..6e8744a477 100644 --- a/api/v3/MailingComponent.php +++ b/api/v3/MailingComponent.php @@ -34,6 +34,7 @@ /** * Save a mailing_component. + * * @param array $params * * @throws API_Exception diff --git a/api/v3/MailingEventQueue.php b/api/v3/MailingEventQueue.php index a0f56e1edb..ac3bb377fe 100644 --- a/api/v3/MailingEventQueue.php +++ b/api/v3/MailingEventQueue.php @@ -60,6 +60,7 @@ function civicrm_api3_mailing_event_queue_create($params) { * Get mailing event queue record. * * @param array $params + * * @return array */ function civicrm_api3_mailing_event_queue_get($params) { diff --git a/api/v3/MailingGroup.php b/api/v3/MailingGroup.php index eacb3b169c..51f64bb4ae 100644 --- a/api/v3/MailingGroup.php +++ b/api/v3/MailingGroup.php @@ -87,7 +87,8 @@ function civicrm_api3_mailing_group_event_resubscribe($params) { } /** - * Handle a subscription event + * Handle a subscription event. + * * @deprecated * * @param array $params @@ -99,7 +100,10 @@ function civicrm_api3_mailing_group_event_subscribe($params) { } /** + * Create mailing group. + * * @param array $params + * * @return array * @throws \API_Exception */ @@ -108,6 +112,8 @@ function civicrm_api3_mailing_group_create($params) { } /** + * Get mailing group. + * * @param array $params * * @return array @@ -129,6 +135,8 @@ function civicrm_api3_mailing_group_delete($params) { } /** + * Get metadata for mailing group functions. + * * @param array $params * * @return array diff --git a/api/v3/Membership.php b/api/v3/Membership.php index 0c7621a1d2..7abd85e6ad 100644 --- a/api/v3/Membership.php +++ b/api/v3/Membership.php @@ -50,7 +50,7 @@ function civicrm_api3_membership_delete($params) { } /** - * Create a Contact Membership + * Create a Contact Membership. * * This API is used for creating a Membership for a contact. * Required parameters : membership_type_id and status_id. @@ -162,7 +162,7 @@ function _civicrm_api3_membership_create_spec(&$params) { ); } /** - * Adjust Metadata for Get action + * Adjust Metadata for Get action. * * The metadata is used for setting defaults, documentation & validation. * @@ -221,6 +221,8 @@ function civicrm_api3_membership_get($params) { } /** + * Perform api v2 custom behaviour. + * * When we copied apiv3 from api v2 we brought across some custom behaviours - in the case of * membership a complicated return array is constructed. The original * behaviour made contact_id a required field. We still need to keep this for v3 when contact_id diff --git a/api/v3/MembershipStatus.php b/api/v3/MembershipStatus.php index 78f2d77bec..3e8a7d2e7d 100644 --- a/api/v3/MembershipStatus.php +++ b/api/v3/MembershipStatus.php @@ -71,7 +71,8 @@ function civicrm_api3_membership_status_get($params) { * Required parameters : id of 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. + * * @deprecated - should just use create * * @return array diff --git a/api/v3/MessageTemplate.php b/api/v3/MessageTemplate.php index c768645f51..1a330542c6 100644 --- a/api/v3/MessageTemplate.php +++ b/api/v3/MessageTemplate.php @@ -60,6 +60,8 @@ function _civicrm_api3_message_template_create_spec(&$params) { } /** + * Delete message template. + * * @param array $params * * @return bool diff --git a/api/v3/ParticipantPayment.php b/api/v3/ParticipantPayment.php index c2f36f5b28..1720dfb132 100644 --- a/api/v3/ParticipantPayment.php +++ b/api/v3/ParticipantPayment.php @@ -36,7 +36,7 @@ */ /** - * Create a Event Participant Payment + * Create a Event Participant Payment. * * This API is used for creating a Participant Payment of Event. * Required parameters : participant_id, contribution_id. diff --git a/api/v3/Profile.php b/api/v3/Profile.php index 4a3874d69b..82269c5d88 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -307,8 +307,10 @@ function _civicrm_api3_profile_translate_fieldnames_for_bao($fieldName) { $fieldName = str_replace('url', 'URL', $fieldName); return str_replace('primary', 'Primary', $fieldName); } + /** - * metadata for submit action + * Metadata for submit action. + * * @param array $params * @param array $apirequest */ @@ -345,8 +347,6 @@ function _civicrm_api3_profile_submit_spec(&$params, $apirequest) { * * @return array * Updated Contact/ Activity object|CRM_Error - * - * */ function civicrm_api3_profile_set($params) { return civicrm_api3('profile', 'submit', $params); @@ -484,8 +484,9 @@ function _civicrm_api3_profile_getbillingpseudoprofile(&$params) { } /** - * Here we will build up getfields type data for all the fields in the profile. Because the integration with the - * form layer in core is so hard-coded we are not going to attempt to re-use it + * Here we will build up getfields type data for all the fields in the profile. + * + * Because the integration with the form layer in core is so hard-coded we are not going to attempt to re-use it * However, as this function is unit-tested & hence 'locked in' we can aspire to extract sharable * code out of the form-layer over time. * diff --git a/api/v3/Relationship.php b/api/v3/Relationship.php index d0903b3adb..9e0456e176 100644 --- a/api/v3/Relationship.php +++ b/api/v3/Relationship.php @@ -71,7 +71,6 @@ function _civicrm_api3_relationship_create_spec(&$params) { * * @return array * API Result Array - * */ function civicrm_api3_relationship_delete($params) { diff --git a/api/v3/RelationshipType.php b/api/v3/RelationshipType.php index 7e2eb908e8..799292f7ba 100644 --- a/api/v3/RelationshipType.php +++ b/api/v3/RelationshipType.php @@ -117,6 +117,7 @@ function civicrm_api3_relationship_type_delete($params) { * @see _civicrm_api3_generic_getlist_defaults * * @param array $request + * * @return array */ function _civicrm_api3_relationship_type_getlist_defaults($request) { diff --git a/api/v3/ReportInstance.php b/api/v3/ReportInstance.php index fa34ae958a..ebf7a44c96 100644 --- a/api/v3/ReportInstance.php +++ b/api/v3/ReportInstance.php @@ -39,7 +39,7 @@ function _civicrm_api3_report_instance_create_spec(&$params) { } /** - * Deletes an existing ReportInstance + * Deletes an existing ReportInstance. * * @param array $params * diff --git a/api/v3/ReportTemplate.php b/api/v3/ReportTemplate.php index 9f5c8eee63..78707e8b35 100644 --- a/api/v3/ReportTemplate.php +++ b/api/v3/ReportTemplate.php @@ -154,13 +154,10 @@ function civicrm_api3_report_template_getstatistics($params) { return civicrm_api3_create_success($stats, $params, 'report_template', 'getstatistics', CRM_Core_DAO::$_nullObject, $metadata); } /** - * Retrieve rows from a report template. + * Adjust metadata for template getrows action. * * @param array $params * Input parameters. - * - * @return void - * details of found instances */ function _civicrm_api3_report_template_getrows_spec(&$params) { $params['report_id'] = array( diff --git a/api/v3/Setting.php b/api/v3/Setting.php index 22c9e2c926..7bf30316c5 100644 --- a/api/v3/Setting.php +++ b/api/v3/Setting.php @@ -166,7 +166,8 @@ function civicrm_api3_setting_revert(&$params) { } /** - * Alter metadata for getfields functions + * Alter metadata for getfields functions. + * * @param array $params */ function _civicrm_api3_setting_revert_spec(&$params) { @@ -174,8 +175,8 @@ function _civicrm_api3_setting_revert_spec(&$params) { $params['component_id'] = array('title' => 'id of relevant component'); $params['domain_id'] = array( 'api.default' => 'current_domain', - 'description' => 'Defaults may differ by domain - if you do not pass in a domain id this will default to the current domain - an array or "all" are acceptable values for multiple domains', + 'description' => 'Defaults may differ by domain - if you do not pass in a domain id this will default to the current domain' + . ' an array or "all" are acceptable values for multiple domains', 'title' => 'Setting Domain', ); } @@ -219,7 +220,7 @@ function _civicrm_api3_setting_fill_spec(&$params) { 'api.default' => 'current_domain', 'title' => 'Setting Domain', 'description' => 'Defaults may differ by domain - if you do not pass in a domain id this will default to the ' - . 'current domain, an array or "all" are acceptable values for multiple domains', + . 'current domain, an array or "all" are acceptable values for multiple domains', ); } diff --git a/api/v3/SurveyRespondant.php b/api/v3/SurveyRespondant.php index 591007c23a..82bc9d1bd0 100644 --- a/api/v3/SurveyRespondant.php +++ b/api/v3/SurveyRespondant.php @@ -44,7 +44,8 @@ function _civicrm_api3_survey_respondant_deprecation() { } /** - * Get the list of signatories + * Get the list of signatories. + * * @deprecated - api currently not supported * * @param array $params @@ -79,7 +80,10 @@ function civicrm_api3_survey_respondant_get(&$params) { } /** + * Count survey respondents. + * * @deprecated - api currently not supported + * * @param array $params * @return array */ diff --git a/api/v3/UFGroup.php b/api/v3/UFGroup.php index 57a1e0bced..2ff2ac65dd 100644 --- a/api/v3/UFGroup.php +++ b/api/v3/UFGroup.php @@ -45,9 +45,11 @@ function _civicrm_api3_uf_group_create_spec(&$params) { $params['title']['api.required'] = 1; $params['is_active']['api.default'] = 1; $params['is_update_dupe']['api.default'] = 1; - $params['created_id']['api.default'] = 'user_contact_id';//the current user + // Default to the logged in user. + $params['created_id']['api.default'] = 'user_contact_id'; $params['created_date']['api.default'] = 'now'; } + /** * Use this API to create a new group. * diff --git a/api/v3/Website.php b/api/v3/Website.php index 7cb54a9d87..ca4f07606c 100644 --- a/api/v3/Website.php +++ b/api/v3/Website.php @@ -69,6 +69,7 @@ function _civicrm_api3_website_create_spec(&$params) { * Deletes an existing Website. * * @todo convert to using Basic delete - BAO function non standard + * * @param array $params * * @return array -- 2.25.1