From: Eileen McNaughton Date: Mon, 12 Jan 2015 22:52:44 +0000 (+1300) Subject: phpdoc params is always an array in api X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d09979215fb8fa66d3403e88518e6448ed546edb;p=civicrm-core.git phpdoc params is always an array in api --- diff --git a/api/v3/ActionSchedule.php b/api/v3/ActionSchedule.php index f9e6dc80ab..7779358393 100644 --- a/api/v3/ActionSchedule.php +++ b/api/v3/ActionSchedule.php @@ -38,7 +38,7 @@ /** * Get CiviCRM Action Schedule details * {@getfields action_schedule_create} - * @param $params + * @param array $params * @return array */ function civicrm_api3_action_schedule_get($params) { diff --git a/api/v3/Contact.php b/api/v3/Contact.php index 7029bc5f71..013a31c481 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -560,7 +560,7 @@ function _civicrm_api3_greeting_format_params($params) { * @deprecated * * {@example ContactGetquick.php 0} - * @param $params + * @param array $params * @return array * @throws \API_Exception */ diff --git a/api/v3/Contribution.php b/api/v3/Contribution.php index fc73fe82d4..ea2916a3e0 100644 --- a/api/v3/Contribution.php +++ b/api/v3/Contribution.php @@ -151,7 +151,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 $params + * @param array $params */ function _civicrm_api3_contribution_create_legacy_support_45(&$params) { //legacy soft credit handling - recommended approach is chaining @@ -197,7 +197,7 @@ function civicrm_api3_contribution_delete($params) { /** * modify metadata. Legacy support for contribution_id - * @param $params + * @param array $params */ function _civicrm_api3_contribution_delete_spec(&$params) { $params['id']['api.aliases'] = array('contribution_id'); diff --git a/api/v3/Country.php b/api/v3/Country.php index 524c7d97f3..05b088e1f0 100644 --- a/api/v3/Country.php +++ b/api/v3/Country.php @@ -46,9 +46,10 @@ require_once 'CRM/Core/DAO/Country.php'; * * @example CountryCreate.php Standard Create Example * - * @return array - * API result array - * {@getfields country_create} + * @param array $params + * @return array API result array + * API result array + * @throws \API_Exception * @access public */ function civicrm_api3_country_create($params) { diff --git a/api/v3/CustomField.php b/api/v3/CustomField.php index 13bd9d4dc7..4c455090c0 100644 --- a/api/v3/CustomField.php +++ b/api/v3/CustomField.php @@ -262,7 +262,7 @@ SELECT count(*) /** * CRM-15191 - Hack to ensure the cache gets cleared after updating a custom field - * @param $params + * @param array $params * @return array */ function civicrm_api3_custom_field_setvalue($params) { diff --git a/api/v3/CustomGroup.php b/api/v3/CustomGroup.php index e089ed30a1..4246321e8f 100644 --- a/api/v3/CustomGroup.php +++ b/api/v3/CustomGroup.php @@ -131,7 +131,7 @@ function civicrm_api3_custom_group_get($params) { /** * CRM-15191 - Hack to ensure the cache gets cleared after updating a custom group - * @param $params + * @param array $params * @return array */ function civicrm_api3_custom_group_setvalue($params) { diff --git a/api/v3/DashboardContact.php b/api/v3/DashboardContact.php index bb3b1f5b39..3ee7f1ef6a 100644 --- a/api/v3/DashboardContact.php +++ b/api/v3/DashboardContact.php @@ -108,7 +108,7 @@ function _civicrm_api3_dashboard_contact_check_params(&$params) { * * {@getfields dashboard_contact_delete} * @access public - * @param $params + * @param array $params * @return array * @throws \API_Exception */ diff --git a/api/v3/Domain.php b/api/v3/Domain.php index 5c74b5c929..da334b8f28 100644 --- a/api/v3/Domain.php +++ b/api/v3/Domain.php @@ -40,7 +40,7 @@ * Get CiviCRM domain details * {@getfields domain_create} * @example DomainGet.php - * @param $params + * @param array $params * @return array * @throws \API_Exception */ diff --git a/api/v3/Entity.php b/api/v3/Entity.php index 5b70b6e5ee..10234aabab 100644 --- a/api/v3/Entity.php +++ b/api/v3/Entity.php @@ -20,7 +20,7 @@ function _civicrm_api3_entity_deprecation($entities) { /** * Placeholder function. This should never be called, as it doesn't have any meaning - * @param $params + * @param array $params * @return array */ function civicrm_api3_entity_create($params) { @@ -29,7 +29,7 @@ function civicrm_api3_entity_create($params) { /** * Placeholder function. This should never be called, as it doesn't have any meaning - * @param $params + * @param array $params * @return array */ function civicrm_api3_entity_delete($params) { @@ -38,7 +38,7 @@ function civicrm_api3_entity_delete($params) { /** * Placeholder function. This should never be called, as it doesn't have any meaning - * @param $params + * @param array $params * @return array */ function civicrm_api3_entity_getfields($params) { diff --git a/api/v3/EntityTag.php b/api/v3/EntityTag.php index 8aab901256..cf265e226b 100644 --- a/api/v3/EntityTag.php +++ b/api/v3/EntityTag.php @@ -102,7 +102,7 @@ function civicrm_api3_entity_tag_delete($params) { /** * modify metadata - * @param $params + * @param array $params */ function _civicrm_api3_entity_tag_delete_spec(&$params) { // set as not required as tag_id also acceptable & no either/or std yet diff --git a/api/v3/Event.php b/api/v3/Event.php index 3a3251bc32..c9bc92e6fb 100644 --- a/api/v3/Event.php +++ b/api/v3/Event.php @@ -85,7 +85,7 @@ function _civicrm_api3_event_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 $params + * @param array $params */ function _civicrm_api3_event_create_legacy_support_42(&$params) { if (!empty($params['payment_processor_id'])) { @@ -189,7 +189,7 @@ function _civicrm_api3_event_get_legacy_support_42(&$event, $event_id) { * * This API is used for deleting a event * - * @param $params + * @param array $params * @return array * * @access public diff --git a/api/v3/GroupContact.php b/api/v3/GroupContact.php index 1c01e9d6f3..1879cd8246 100644 --- a/api/v3/GroupContact.php +++ b/api/v3/GroupContact.php @@ -139,7 +139,7 @@ function civicrm_api3_group_contact_delete($params) { /** * modify metadata - * @param $params + * @param array $params */ function _civicrm_api3_group_contact_delete_spec(&$params) { // set as not required no either/or std yet @@ -229,7 +229,7 @@ function _civicrm_api3_group_contact_common($params, $op = 'Added') { /** * @deprecated - this should be part of create but need to know we aren't missing something - * @param $params + * @param array $params * @return bool * @throws \API_Exception */ diff --git a/api/v3/Location.php b/api/v3/Location.php index 824f708c3d..40fbdb6263 100644 --- a/api/v3/Location.php +++ b/api/v3/Location.php @@ -2,7 +2,7 @@ /** * Functions to inform caller that Location is obsolete and Address, Phone, Email, Website should be used - * @param $params + * @param array $params * @return array */ function civicrm_api3_location_create($params) { diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 2a1119c219..3c44188856 100755 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -583,7 +583,7 @@ function civicrm_api3_mailing_stats($params) { * Fix the reset dates on the email record based on when a mail was last delivered * We only consider mailings that were completed and finished in the last 3 to 7 days * Both the min and max days can be set via the params - * @param $params + * @param array $params * @return array */ function civicrm_api3_mailing_update_email_resetdate($params) { diff --git a/api/v3/MailingJob.php b/api/v3/MailingJob.php index eeaee7681e..595755b7e9 100644 --- a/api/v3/MailingJob.php +++ b/api/v3/MailingJob.php @@ -38,7 +38,7 @@ /** * Handle creation of a Mailing Job for a Mailing. - * @param $params + * @param array $params * @return array * @throws \API_Exception */ @@ -77,7 +77,7 @@ function civicrm_api3_mailing_job_get($params, $ids = array()) { /** * Handle deletion of a Mailing Job for a Mailing. - * @param $params + * @param array $params * @return array * @throws \API_Exception */ diff --git a/api/v3/MessageTemplate.php b/api/v3/MessageTemplate.php index d72c1ef8df..41db4ce4d1 100644 --- a/api/v3/MessageTemplate.php +++ b/api/v3/MessageTemplate.php @@ -33,7 +33,7 @@ /** * @access public - * @param $params + * @param array $params * @return array * @throws \API_Exception */ @@ -97,7 +97,7 @@ function civicrm_api3_message_template_get($params) { /** * Sends a template. - * @param $params + * @param array $params */ function civicrm_api3_message_template_send($params) { CRM_Core_BAO_MessageTemplates::sendTemplate($params); diff --git a/api/v3/Participant.php b/api/v3/Participant.php index a1cb21aca2..4480d49ae1 100644 --- a/api/v3/Participant.php +++ b/api/v3/Participant.php @@ -77,7 +77,7 @@ function civicrm_api3_participant_create($params) { /** * @todo this should be done in the BAO not the api * Create a default participant line item - * @param $params + * @param array $params * @param $participant * @throws \CiviCRM_API3_Exception */ diff --git a/api/v3/PaymentProcessorType.php b/api/v3/PaymentProcessorType.php index 1cdac8dd31..861251c540 100644 --- a/api/v3/PaymentProcessorType.php +++ b/api/v3/PaymentProcessorType.php @@ -90,7 +90,7 @@ function _civicrm_api3_payment_processor_type_create_spec(&$params) { * @access public * {@getfields PaymentProcessorType_get} * @example PaymentProcessorTypeGet.php - * @param $params + * @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 958f38d305..6022932490 100644 --- a/api/v3/Pledge.php +++ b/api/v3/Pledge.php @@ -96,7 +96,7 @@ function _civicrm_api3_pledge_delete_spec(&$params) { /** * return field specification specific to get requests - * @param $params + * @param array $params */ function _civicrm_api3_pledge_get_spec(&$params) { $params['next_pay_date'] = array( @@ -113,7 +113,7 @@ function _civicrm_api3_pledge_get_spec(&$params) { /** * return field specification specific to get requests - * @param $params + * @param array $params */ function _civicrm_api3_pledge_create_spec(&$params) { diff --git a/api/v3/Premium.php b/api/v3/Premium.php index 348bab99cd..ca1bdda2d0 100644 --- a/api/v3/Premium.php +++ b/api/v3/Premium.php @@ -88,7 +88,7 @@ function civicrm_api3_premium_delete($params) { /** * return field specification specific to get requests - * @param $params + * @param array $params */ function _civicrm_api3_premium_get_spec(&$params) { $params['premiums_active']['api.aliases'] = array('is_active'); @@ -96,7 +96,7 @@ function _civicrm_api3_premium_get_spec(&$params) { /** * return field specification specific to create requests - * @param $params + * @param array $params */ function _civicrm_api3_premium_create_spec(&$params) { $params['premiums_active']['api.aliases'] = array('is_active'); diff --git a/api/v3/RelationshipType.php b/api/v3/RelationshipType.php index aa72f13665..a3635e7721 100644 --- a/api/v3/RelationshipType.php +++ b/api/v3/RelationshipType.php @@ -98,7 +98,7 @@ function _civicrm_api3_relationship_type_create_spec(&$params) { * @access public * {@getfields RelationshipType_get} * @example RelationshipTypeGet.php - * @param $params + * @param array $params * @return array */ function civicrm_api3_relationship_type_get($params) { diff --git a/api/v3/Setting.php b/api/v3/Setting.php index 0d0d3cdeb3..7c2c7249e5 100644 --- a/api/v3/Setting.php +++ b/api/v3/Setting.php @@ -32,7 +32,7 @@ * @subpackage API_Settings * @copyright CiviCRM LLC (c) 2004-2014 * @version $Id: Settings.php - * @param $params + * @param array $params * @return array */ @@ -74,7 +74,7 @@ function civicrm_api3_setting_getfields($params) { /** * Alter metadata for getfields functions - * @param $params + * @param array $params */ function _civicrm_api3_setting_getfields_spec(&$params) { $params['filters'] = array('title' => 'Fields you wish to filter by e.g. array("group_name" => "CiviCRM Preferences")'); @@ -86,7 +86,7 @@ function _civicrm_api3_setting_getfields_spec(&$params) { * Return default values for settings. We will domain key this as it could vary by domain (ie. urls) * as we will be creating the option for a function rather than an value to be in the defaults * Note that is not in place as yet - * @param $params + * @param array $params * @return array * @throws \CiviCRM_API3_Exception * @throws \Exception @@ -130,7 +130,7 @@ function _civicrm_api3_setting_getdefaults_spec(&$params) { /** * Revert settings to defaults - * @param $params + * @param array $params * @return array * @throws \Exception */ @@ -155,7 +155,7 @@ function civicrm_api3_setting_revert(&$params) { /** * Alter metadata for getfields functions - * @param $params + * @param array $params */ function _civicrm_api3_setting_revert_spec(&$params) { $params['name'] = array('title' => 'Setting Name belongs to'); @@ -170,7 +170,7 @@ function _civicrm_api3_setting_revert_spec(&$params) { /** * Revert settings to defaults - * @param $params + * @param array $params * @return array * @throws \CiviCRM_API3_Exception * @throws \Exception @@ -195,7 +195,7 @@ function civicrm_api3_setting_fill(&$params) { /** * Alter metadata for getfields functions - * @param $params + * @param array $params */ function _civicrm_api3_setting_fill_spec(&$params) { $params['name'] = array('title' => 'Setting Name belongs to'); @@ -346,7 +346,7 @@ function _civicrm_api3_setting_getvalue_spec(&$params) { * Really domain_id should always be set but doing an empty check because at the moment * using crm-editable will pass an id & default won't be applied * we did talk about id being a pseudonym for domain_id in this api so applying it here - * @param $params + * @param array $params * @return array * @throws \Exception */ diff --git a/api/v3/SurveyRespondant.php b/api/v3/SurveyRespondant.php index 31b900ef3a..3ea6f75b27 100644 --- a/api/v3/SurveyRespondant.php +++ b/api/v3/SurveyRespondant.php @@ -81,7 +81,7 @@ function civicrm_api3_survey_respondant_get(&$params) { /** * @deprecated - api currently not supported - * @param $params + * @param array $params * @return array */ function &civicrm_api3_survey_respondant_count($params) { diff --git a/api/v3/UFField.php b/api/v3/UFField.php index 122179e9b2..489c2c54ec 100644 --- a/api/v3/UFField.php +++ b/api/v3/UFField.php @@ -177,7 +177,7 @@ function civicrm_api3_uf_field_delete($params) { /** * field id accepted for backward compatibility - unset required on id - * @param $params + * @param array $params */ function _civicrm_api3_uf_field_delete_spec(&$params) { // legacy support for field_id diff --git a/api/v3/WordReplacement.php b/api/v3/WordReplacement.php index d019bd4cb9..495bbeb777 100644 --- a/api/v3/WordReplacement.php +++ b/api/v3/WordReplacement.php @@ -39,7 +39,7 @@ /** * Get CiviCRM Word Replacement details * {@getfields word_replacement_create} - * @param $params + * @param array $params * @return array * @throws \API_Exception */ diff --git a/api/v3/utils.php b/api/v3/utils.php index 53076f73e6..53af3b736d 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -1719,7 +1719,7 @@ function _civicrm_api_get_fields($entity, $unique = FALSE, &$params = array()) { * Return an array of fields for a given entity - this is the same as the BAO function but * fields are prefixed with 'custom_' to represent api params * @param $entity - * @param $params + * @param array $params * @return array */ function _civicrm_api_get_custom_fields($entity, &$params) {