From cf470720aff5ea571c20c551ca4d934db373f50f Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 6 Jan 2015 11:41:38 -0800 Subject: [PATCH] INFRA-132 - api - Convert single-line @param to multi-line --- api/api.php | 15 ++- api/v3/ActionSchedule.php | 6 +- api/v3/Activity.php | 27 ++-- api/v3/ActivityContact.php | 8 +- api/v3/ActivityType.php | 9 +- api/v3/Address.php | 13 +- api/v3/Attachment.php | 26 ++-- api/v3/Batch.php | 3 +- api/v3/Campaign.php | 12 +- api/v3/Case.php | 18 ++- api/v3/CaseType.php | 6 +- api/v3/Contact.php | 41 ++++-- api/v3/ContactType.php | 9 +- api/v3/Contribution.php | 36 ++++-- api/v3/ContributionPage.php | 15 ++- api/v3/ContributionRecur.php | 15 ++- api/v3/ContributionSoft.php | 13 +- api/v3/Country.php | 10 +- api/v3/CustomField.php | 27 ++-- api/v3/CustomGroup.php | 12 +- api/v3/CustomSearch.php | 5 +- api/v3/CustomValue.php | 12 +- api/v3/Dashboard.php | 12 +- api/v3/DashboardContact.php | 6 +- api/v3/Domain.php | 6 +- api/v3/Email.php | 10 +- api/v3/EntityTag.php | 3 +- api/v3/Event.php | 30 +++-- api/v3/Extension.php | 21 ++- api/v3/File.php | 9 +- api/v3/Generic.php | 33 +++-- api/v3/Generic/Getlist.php | 18 ++- api/v3/Generic/Update.php | 3 +- api/v3/Grant.php | 12 +- api/v3/Group.php | 12 +- api/v3/GroupContact.php | 6 +- api/v3/GroupNesting.php | 12 +- api/v3/GroupOrganization.php | 12 +- api/v3/Im.php | 10 +- api/v3/Job.php | 50 +++++--- api/v3/LineItem.php | 12 +- api/v3/LocBlock.php | 9 +- api/v3/LocationType.php | 10 +- api/v3/MailSettings.php | 12 +- api/v3/Mailing.php | 15 ++- api/v3/MailingAB.php | 6 +- api/v3/MailingContact.php | 11 +- api/v3/MailingEventConfirm.php | 6 +- api/v3/MailingEventQueue.php | 6 +- api/v3/MailingEventResubscribe.php | 6 +- api/v3/MailingEventSubscribe.php | 6 +- api/v3/MailingEventUnsubscribe.php | 6 +- api/v3/MailingJob.php | 6 +- api/v3/MailingRecipients.php | 3 +- api/v3/Membership.php | 21 ++- api/v3/MembershipBlock.php | 11 +- api/v3/MembershipPayment.php | 9 +- api/v3/MembershipStatus.php | 11 +- api/v3/MembershipType.php | 11 +- api/v3/MessageTemplate.php | 13 +- api/v3/Note.php | 18 ++- api/v3/OptionGroup.php | 9 +- api/v3/OptionValue.php | 5 +- api/v3/Participant.php | 15 ++- api/v3/ParticipantPayment.php | 9 +- api/v3/ParticipantStatusType.php | 9 +- api/v3/PaymentProcessor.php | 10 +- api/v3/PaymentProcessorType.php | 8 +- api/v3/Phone.php | 5 +- api/v3/Phone/Get.php | 5 +- api/v3/Pledge.php | 12 +- api/v3/PledgePayment.php | 12 +- api/v3/PriceField.php | 12 +- api/v3/PriceFieldValue.php | 12 +- api/v3/PriceSet.php | 12 +- api/v3/Profile.php | 17 ++- api/v3/Relationship.php | 16 ++- api/v3/RelationshipType.php | 8 +- api/v3/ReportInstance.php | 8 +- api/v3/ReportTemplate.php | 11 +- api/v3/Setting.php | 21 ++- api/v3/Survey.php | 12 +- api/v3/SurveyRespondant.php | 3 +- api/v3/System.php | 9 +- api/v3/Tag.php | 5 +- api/v3/UFField.php | 6 +- api/v3/UFGroup.php | 6 +- api/v3/UFJoin.php | 9 +- api/v3/UFMatch.php | 9 +- api/v3/Website.php | 10 +- api/v3/WordReplacement.php | 6 +- api/v3/utils.php | 198 +++++++++++++++++++---------- 92 files changed, 853 insertions(+), 447 deletions(-) diff --git a/api/api.php b/api/api.php index 79f3f5c381..119ce3985e 100644 --- a/api/api.php +++ b/api/api.php @@ -28,9 +28,12 @@ function civicrm_api($entity, $action, $params, $extra = NULL) { /** * Version 3 wrapper for civicrm_api. Throws exception * - * @param string $entity type of entities to deal with - * @param string $action create, get, delete or some special action name. - * @param array $params array to be passed to function + * @param string $entity + * Type of entities to deal with. + * @param string $action + * Create, get, delete or some special action name. + * @param array $params + * Array to be passed to function. * * @throws CiviCRM_API3_Exception * @return array @@ -150,7 +153,8 @@ function _civicrm_api_replace_variables($entity, $action, &$params, &$parentResu /** * 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 + * @param string $entity + * Entity name in various formats e.g. Contribution, contribution, OptionValue, option_value, UFJoin, uf_join. * @return string $entity entity name in underscore separated format * * FIXME: Why isn't this called first thing in civicrm_api wrapper? @@ -171,7 +175,8 @@ function _civicrm_api_get_entity_name_from_camel($entity) { /** * Having a DAO object find the entity name - * @param object $bao DAO being passed in + * @param object $bao + * DAO being passed in. * @return string */ function _civicrm_api_get_entity_name_from_dao($bao){ diff --git a/api/v3/ActionSchedule.php b/api/v3/ActionSchedule.php index 8c5b188b2c..4fb71d2224 100644 --- a/api/v3/ActionSchedule.php +++ b/api/v3/ActionSchedule.php @@ -67,7 +67,8 @@ function civicrm_api3_action_schedule_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_action_schedule_create_spec(&$params) { $params['title']['api.required'] = TRUE; @@ -79,7 +80,8 @@ function _civicrm_api3_action_schedule_create_spec(&$params) { /** * delete an existing action_schedule * - * @param array $params array containing id of the action_schedule + * @param array $params + * Array containing id of the action_schedule. * to be deleted * * @return array API result array diff --git a/api/v3/Activity.php b/api/v3/Activity.php index ad36086995..5c72c36c36 100644 --- a/api/v3/Activity.php +++ b/api/v3/Activity.php @@ -41,7 +41,8 @@ /** * Creates or updates an Activity. See the example for usage * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs for the activity. * {@getfields activity_create} * @@ -177,7 +178,8 @@ function civicrm_api3_activity_create($params) { /** * Specify Meta data for create. Note that this data is retrievable via the getfields function * and is used for pre-filling defaults and ensuring mandatory requirements are met. - * @param array $params (reference) array of parameters determined by getfields + * @param array $params + * (reference) array of parameters determined by getfields. */ function _civicrm_api3_activity_create_spec(&$params) { @@ -212,7 +214,8 @@ function _civicrm_api3_activity_create_spec(&$params) { /** * Gets a CiviCRM activity according to parameters * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs for the activity. * * @return array @@ -248,7 +251,8 @@ function civicrm_api3_activity_get($params) { * * NOTE: Called by civicrm-core and CiviHR * - * @param array $params API request parameters + * @param array $params + * API request parameters. * @param array $activities * @return array new activities list */ @@ -303,7 +307,8 @@ function _civicrm_api3_activity_get_formatResult($params, $activities) { /** * Delete a specified Activity. * - * @param array $params array holding 'id' of activity to be deleted + * @param array $params + * Array holding 'id' of activity to be deleted. * {@getfields activity_delete} * * @throws API_Exception @@ -328,7 +333,8 @@ function civicrm_api3_activity_delete($params) { /** * Check for required params * - * @param array $params associated array of fields + * @param array $params + * Associated array of fields. * * @throws API_Exception * @throws Exception @@ -438,7 +444,8 @@ SELECT count(*) /** * @see _civicrm_api3_generic_getlist_params. * - * @param $request array + * @param $request + * Array. */ function _civicrm_api3_activity_getlist_params(&$request) { $fieldsToReturn = array('activity_date_time', 'activity_type_id', 'subject', 'source_contact_id'); @@ -453,8 +460,10 @@ function _civicrm_api3_activity_getlist_params(&$request) { /** * @see _civicrm_api3_generic_getlist_output * - * @param $result array - * @param $request array + * @param $result + * Array. + * @param $request + * Array. * * @return array */ diff --git a/api/v3/ActivityContact.php b/api/v3/ActivityContact.php index b9f744b936..5d24f2c1f4 100644 --- a/api/v3/ActivityContact.php +++ b/api/v3/ActivityContact.php @@ -56,7 +56,8 @@ function civicrm_api3_activity_contact_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_activity_contact_create_spec(&$params) { $params['contact_id']['api.required'] = 1; @@ -66,7 +67,7 @@ function _civicrm_api3_activity_contact_create_spec(&$params) { /** * Deletes an existing ActivityContact record * - * @param array $params + * @param array $params * * @return array Api Result * @@ -82,7 +83,8 @@ function civicrm_api3_activity_contact_delete($params) { * * @example ActivityContact.php * - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array details of found tags else error * diff --git a/api/v3/ActivityType.php b/api/v3/ActivityType.php index aedc172033..70ae8fcce3 100644 --- a/api/v3/ActivityType.php +++ b/api/v3/ActivityType.php @@ -64,7 +64,8 @@ function civicrm_api3_activity_type_get($params) { /** * create activity type ( * - * @param array $params associated array of fields + * @param array $params + * Associated array of fields. * $params['option_value_id'] is required for updation of activity type * * @return array $activityType created / updated activity type @@ -92,7 +93,8 @@ function civicrm_api3_activity_type_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_activity_type_create_spec(&$params) { $params['label']['api.required'] = 1; @@ -104,7 +106,8 @@ function _civicrm_api3_activity_type_create_spec(&$params) { /** * delete activity type * - * @param array $params array including id of activity_type to delete + * @param array $params + * Array including id of activity_type to delete. * @return array API result array * diff --git a/api/v3/Address.php b/api/v3/Address.php index 9efba4db6e..69ce06da13 100644 --- a/api/v3/Address.php +++ b/api/v3/Address.php @@ -95,7 +95,8 @@ function civicrm_api3_address_create(&$params) { /** * Adjust Metadata for Create action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_address_create_spec(&$params) { $params['location_type_id']['api.required'] = 1; @@ -111,7 +112,8 @@ function _civicrm_api3_address_create_spec(&$params) { /** * Adjust Metadata for Get action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_address_get_spec(&$params) { $params['world_region'] = array( @@ -124,7 +126,7 @@ function _civicrm_api3_address_get_spec(&$params) { /** * Deletes an existing Address * - * @param array $params + * @param array $params * * {@getfields address_delete} * {@example AddressDelete.php 0} @@ -140,10 +142,11 @@ function civicrm_api3_address_delete($params) { * Retrieve one or more addresses on address_id, contact_id, street_name, city * or a combination of those * - * @param mixed[] (reference ) input parameters + * @param mixed[] (reference ) input parameters * * {@example AddressGet.php 0} - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array details of found addresses else error * {@getfields address_get} diff --git a/api/v3/Attachment.php b/api/v3/Attachment.php index 0972d8255b..53bac35603 100644 --- a/api/v3/Attachment.php +++ b/api/v3/Attachment.php @@ -73,7 +73,8 @@ /** * Adjust metadata for "create" action * - * @param array $spec list of fields + * @param array $spec + * List of fields. */ function _civicrm_api3_attachment_create_spec(&$spec) { $spec = array_merge($spec, _civicrm_api3_attachment_getfields()); @@ -87,7 +88,7 @@ function _civicrm_api3_attachment_create_spec(&$spec) { /** * Create an attachment * - * @param array $params + * @param array $params * @return array of newly created file property values. * @access public * @throws API_Exception validation errors @@ -154,7 +155,8 @@ function civicrm_api3_attachment_create($params) { /** * Adjust metadata for "create" action * - * @param array $spec list of fields + * @param array $spec + * List of fields. */ function _civicrm_api3_attachment_get_spec(&$spec) { $spec = array_merge($spec, _civicrm_api3_attachment_getfields()); @@ -232,8 +234,10 @@ function civicrm_api3_attachment_delete($params) { /** * @param array $params * @param int|null $id the user-supplied ID of the attachment record - * @param array $file the user-supplied vales for the file (mime_type, description, upload_date) - * @param array $entityFile the user-supllied values of the entity-file (entity_table, entity_id) + * @param array $file + * The user-supplied vales for the file (mime_type, description, upload_date). + * @param array $entityFile + * The user-supllied values of the entity-file (entity_table, entity_id). * @param bool $isTrusted * @return CRM_Core_DAO * @throws API_Exception @@ -349,10 +353,14 @@ function _civicrm_api3_attachment_parse_params($params) { } /** - * @param CRM_Core_DAO_File $fileDao maybe "File" or "File JOIN EntityFile" - * @param CRM_Core_DAO_EntityFile $entityFileDao maybe "EntityFile" or "File JOIN EntityFile" - * @param bool $returnContent whether to return the full content of the file - * @param bool $isTrusted whether the current request is trusted to perform file-specific operations + * @param CRM_Core_DAO_File $fileDao + * Maybe "File" or "File JOIN EntityFile". + * @param CRM_Core_DAO_EntityFile $entityFileDao + * Maybe "EntityFile" or "File JOIN EntityFile". + * @param bool $returnContent + * Whether to return the full content of the file. + * @param bool $isTrusted + * Whether the current request is trusted to perform file-specific operations. * @return array */ function _civicrm_api3_attachment_format_result($fileDao, $entityFileDao, $returnContent, $isTrusted) { diff --git a/api/v3/Batch.php b/api/v3/Batch.php index fe47e357da..ced1fb2b04 100644 --- a/api/v3/Batch.php +++ b/api/v3/Batch.php @@ -54,7 +54,8 @@ function civicrm_api3_batch_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_batch_create_spec(&$params) { //@todo - the entity table field looks like it is not actually required & should probably be removed (or a description added if diff --git a/api/v3/Campaign.php b/api/v3/Campaign.php index 7ba0f54d38..e1eec08156 100644 --- a/api/v3/Campaign.php +++ b/api/v3/Campaign.php @@ -41,7 +41,8 @@ * In case of updating existing campaign, id of that particular campaign must * be in $params array. * - * @param array $params (reference) Associative array of property + * @param array $params + * (reference) Associative array of property. * name/value pairs to insert in new 'campaign' * * @return array campaign array @@ -56,7 +57,8 @@ function civicrm_api3_campaign_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_campaign_create_spec(&$params) { $params['title']['api.required'] = 1; @@ -65,7 +67,8 @@ function _civicrm_api3_campaign_create_spec(&$params) { /** * Returns array of campaigns matching a set of one or more group properties * - * @param array $params Array of one or more valid + * @param array $params + * Array of one or more valid. * property_name=>value pairs. If $params is set * as null, all campaigns will be returned * @@ -83,7 +86,8 @@ function civicrm_api3_campaign_get($params) { * This method is used to delete any existing campaign. id of the group * to be deleted is required field in $params array * - * @param array $params (reference) array containing id of the group + * @param array $params + * (reference) array containing id of the group. * to be deleted * * @return array (reference) returns flag true if successful, error diff --git a/api/v3/Case.php b/api/v3/Case.php index 4e8790baa3..96d0e70f42 100644 --- a/api/v3/Case.php +++ b/api/v3/Case.php @@ -40,7 +40,7 @@ /** * Open a new case, add client and manager roles, and add standard timeline * - * @param array ( + * @param array ( * //REQUIRED: * 'case_type_id' => int OR * 'case_type' => str (provide one or the other) @@ -130,7 +130,8 @@ function civicrm_api3_case_create($params) { /** * Adjust Metadata for Get Action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_case_get_spec(&$params) { $params['contact_id']['api.aliases'] = array('client_id'); @@ -140,7 +141,8 @@ function _civicrm_api3_case_get_spec(&$params) { /** * Adjust Metadata for Create Action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_case_create_spec(&$params) { $params['contact_id']['api.aliases'] = array('client_id'); @@ -161,7 +163,8 @@ function _civicrm_api3_case_create_spec(&$params) { /** * Adjust Metadata for Update action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_case_update_spec(&$params) { $params['id']['api.required'] = 1; @@ -170,7 +173,8 @@ function _civicrm_api3_case_update_spec(&$params) { /** * Adjust Metadata for Delete action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_case_delete_spec(&$params) { $params['id']['api.required'] = 1; @@ -291,7 +295,7 @@ function _civicrm_api3_case_deprecation() { /** * Update a specified case. * - * @param array ( + * @param array ( * //REQUIRED: * 'case_id' => int * @@ -359,7 +363,7 @@ function civicrm_api3_case_update($params) { /** * Delete a specified case. * - * @param array ( + * @param array ( * //REQUIRED: * 'id' => int * diff --git a/api/v3/CaseType.php b/api/v3/CaseType.php index d30af7c139..d48a60328e 100644 --- a/api/v3/CaseType.php +++ b/api/v3/CaseType.php @@ -38,7 +38,8 @@ /** * create or update case type * - * @param array $params input parameters + * @param array $params + * Input parameters. * * Allowed @params array keys are: * {@getfields case_type_create} @@ -108,7 +109,8 @@ function _civicrm_api3_case_type_get_formatResult(&$result) { /** * Function to delete case type * - * @param array $params array including id of case_type to delete + * @param array $params + * Array including id of case_type to delete. * @return array API result array * diff --git a/api/v3/Contact.php b/api/v3/Contact.php index f6a5d9e844..e3dbcd3ca3 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -40,7 +40,8 @@ /** * Create or update a contact (note you should always call this via civicrm_api() & never directly) * - * @param array $params input parameters + * @param array $params + * Input parameters. * * Allowed @params array keys are: * {@getfields contact_create} @@ -116,7 +117,8 @@ function civicrm_api3_contact_create($params) { /** * Adjust Metadata for Create action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_contact_create_spec(&$params) { $params['contact_type']['api.required'] = 1; @@ -137,7 +139,7 @@ function _civicrm_api3_contact_create_spec(&$params) { /** * Retrieve one or more contacts, given a set of search params * - * @param array input parameters + * @param array input parameters * * @return array API Result Array * (@getfields contact_get} @@ -169,7 +171,8 @@ function civicrm_api3_contact_getcount($params) { /** * Adjust Metadata for Get action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_contact_get_spec(&$params) { $params['contact_is_deleted']['api.default'] = 0; @@ -221,8 +224,10 @@ function _civicrm_api3_contact_get_spec(&$params) { * * We also support 'filter_group_id' & 'filter.group_id' * - * @param array $params as passed into api get or getcount function - * @param array $options array of options (so we can modify the filter) + * @param array $params + * As passed into api get or getcount function. + * @param array $options + * Array of options (so we can modify the filter). */ function _civicrm_api3_contact_get_supportanomalies(&$params, &$options) { if (isset($params['showAll'])) { @@ -257,7 +262,8 @@ function _civicrm_api3_contact_get_supportanomalies(&$params, &$options) { /** * Delete a contact with given contact id * - * @param array $params (reference ) input parameters, contact_id element required + * @param array $params + * (reference ) input parameters, contact_id element required. * * @return array API Result Array * @access public @@ -393,8 +399,10 @@ function _civicrm_api3_contact_check_params( &$params, $dupeCheck = true, $dupeE * Takes an associative array and creates a contact object and all the associated * derived objects (i.e. individual, location, email, phone etc) * - * @param array $params (reference ) an assoc array of name/value pairs - * @param int $contactID if present the contact with that ID is updated + * @param array $params + * (reference ) an assoc array of name/value pairs. + * @param int $contactID + * If present the contact with that ID is updated. * * @return CRM_Contact_BAO_Contact object * @access public @@ -412,7 +420,8 @@ function _civicrm_api3_contact_update($params, $contactID = NULL) { /** * Validate the addressee or email or postal greetings * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs to insert in new contact. * * @throws API_Exception @@ -849,7 +858,8 @@ function _civicrm_api3_contact_deprecation() { /** * Merges given pair of duplicate contacts. * - * @param array $params input parameters + * @param array $params + * Input parameters. * * Allowed @params array keys are: * {int main_id main contact id with whom merge has to happen} @@ -946,7 +956,8 @@ WHERE $whereClause /** * @see _civicrm_api3_generic_getlist_params * - * @param $request array + * @param $request + * Array. */ function _civicrm_api3_contact_getlist_params(&$request) { // get the autocomplete options from settings @@ -989,8 +1000,10 @@ function _civicrm_api3_contact_getlist_params(&$request) { /** * @see _civicrm_api3_generic_getlist_output * - * @param $result array - * @param $request array + * @param $result + * Array. + * @param $request + * Array. * * @return array */ diff --git a/api/v3/ContactType.php b/api/v3/ContactType.php index fede1f2ceb..f3357af3d2 100644 --- a/api/v3/ContactType.php +++ b/api/v3/ContactType.php @@ -41,7 +41,8 @@ * In case of updating existing contact_type, id of that particular contact_type must * be in $params array. * - * @param array $params (reference) Associative array of property + * @param array $params + * (reference) Associative array of property. * name/value pairs to insert in new 'contact_type' * * @return array contact_type array @@ -67,7 +68,8 @@ function civicrm_api3_contact_type_create($params) { /** * Returns array of contact_types matching a set of one or more group properties * - * @param array $params one or more valid + * @param array $params + * One or more valid. * property_name=>value pairs. If $params is set * as null, all contact_types will be returned * @@ -85,7 +87,8 @@ function civicrm_api3_contact_type_get($params) { * This method is used to delete any existing contact_type. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array API Result Array diff --git a/api/v3/Contribution.php b/api/v3/Contribution.php index c553702a68..6385630dd8 100644 --- a/api/v3/Contribution.php +++ b/api/v3/Contribution.php @@ -40,7 +40,8 @@ /** * Add or update a contribution * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @throws API_Exception * @return array Api result array @@ -77,7 +78,8 @@ function civicrm_api3_contribution_create(&$params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_contribution_create_spec(&$params) { $params['contact_id']['api.required'] = 1; @@ -171,7 +173,8 @@ function _civicrm_api3_contribution_create_legacy_support_45(&$params){ /** * Delete a contribution * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @return boolean true if success, else false * @static void @@ -200,7 +203,8 @@ function _civicrm_api3_contribution_delete_spec(&$params) { /** * Retrieve a set of contributions, given a set of input params * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @return array of contributions, if error an array with an error id and error message * @static void @@ -245,7 +249,8 @@ function _civicrm_api3_format_soft_credit(&$contribution) { * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_contribution_get_spec(&$params) { $params['contribution_test']['api.default'] = 0; @@ -260,9 +265,11 @@ function _civicrm_api3_contribution_get_spec(&$params) { * take the input parameter list as specified in the data model and * convert it into the same format that we use in QF and BAO object * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs to insert in new contact. - * @param array $values The reformatted properties that we can use internally + * @param array $values + * The reformatted properties that we can use internally. * ' * * @param bool $create @@ -280,7 +287,8 @@ function _civicrm_api3_contribute_format_params($params, &$values, $create = FAL * Adjust Metadata for Transact action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_contribution_transact_spec(&$params) { $fields = civicrm_api3('contribution', 'getfields', array('action' => 'create')); @@ -291,7 +299,8 @@ function _civicrm_api3_contribution_transact_spec(&$params) { /** * Process a transaction and record it against the contact. * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @return array (reference ) contribution of created or updated record (or a civicrm error) * @static void @@ -342,7 +351,8 @@ function civicrm_api3_contribution_transact($params) { * The appropriate online template will be used (the existence of related objects * (e.g. memberships ) will affect this selection * - * @param array $params input parameters + * @param array $params + * Input parameters. * {@getfields Contribution_sendconfirmation} * * @throws Exception @@ -365,7 +375,8 @@ function civicrm_api3_contribution_sendconfirmation($params) { * Adjust Metadata for sendconfirmation action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_contribution_sendconfirmation_spec(&$params) { $params['id'] = array( @@ -397,7 +408,8 @@ function _civicrm_api3_contribution_sendconfirmation_spec(&$params) { * @todo - most of this should live in the BAO layer but as we want it to be an addition * to 4.3 which is already stable we should add it to the api layer & re-factor into the BAO layer later * - * @param array $params input parameters + * @param array $params + * Input parameters. * {@getfields Contribution_completetransaction} * * @throws API_Exception diff --git a/api/v3/ContributionPage.php b/api/v3/ContributionPage.php index 9e1b49000a..e8e609919e 100644 --- a/api/v3/ContributionPage.php +++ b/api/v3/ContributionPage.php @@ -38,7 +38,8 @@ /** * Create or update a contribution_page * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'contribution_page' * @example ContributionPageCreate.php Std Create example * @@ -57,7 +58,8 @@ function civicrm_api3_contribution_page_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_contribution_page_create_spec(&$params) { $params['financial_type_id']['api.required'] = 1; @@ -68,7 +70,8 @@ function _civicrm_api3_contribution_page_create_spec(&$params) { /** * Returns array of contribution_pages matching a set of one or more group properties * - * @param array $params Array of one or more valid property_name=>value pairs. + * @param array $params + * Array of one or more valid property_name=>value pairs. * * @return array API Result array Array of matching contribution_pages * {@getfields contribution_page_get} @@ -84,7 +87,8 @@ function civicrm_api3_contribution_page_get($params) { * This method is used to delete any existing contribution_page. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array API result Array @@ -101,7 +105,8 @@ function civicrm_api3_contribution_page_delete($params) { * This method is used to delete any existing contribution_page. id of the group * to be deleted is required field in $params array * - * @param array $params (reference) array containing id of the group + * @param array $params + * (reference) array containing id of the group. * to be deleted * * @return array API result array diff --git a/api/v3/ContributionRecur.php b/api/v3/ContributionRecur.php index e3ace26f98..042f9b5bf6 100644 --- a/api/v3/ContributionRecur.php +++ b/api/v3/ContributionRecur.php @@ -36,7 +36,8 @@ /** * Create or update a contribution_recur * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'contribution_recur' * @example ContributionRecurCreate.php Std Create example * @@ -52,7 +53,8 @@ function civicrm_api3_contribution_recur_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_contribution_recur_create_spec(&$params) { $params['contact_id']['api.required'] = 1; @@ -64,7 +66,8 @@ function _civicrm_api3_contribution_recur_create_spec(&$params) { /** * Returns array of contribution_recurs matching a set of one or more group properties * - * @param array $params Array of one or more valid + * @param array $params + * Array of one or more valid. * property_name=>value pairs. If $params is set * as null, all contribution_recurs will be returned * @@ -79,7 +82,8 @@ function civicrm_api3_contribution_recur_get($params) { /** * Cancel a recurring contribution of existing contribution_recur.id * - * @param array $params (reference) array containing id of the recurring contribution + * @param array $params + * (reference) array containing id of the recurring contribution. * * @return boolean returns true is successfully cancelled */ @@ -95,7 +99,8 @@ function civicrm_api3_contribution_recur_cancel($params) { * This method is used to delete any existing contribution_recur. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array API result array diff --git a/api/v3/ContributionSoft.php b/api/v3/ContributionSoft.php index 0bb378bf85..e757492b1b 100644 --- a/api/v3/ContributionSoft.php +++ b/api/v3/ContributionSoft.php @@ -40,7 +40,8 @@ /** * Create or Update a Soft Credit * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'contribution_soft' * * @example ContributionSoftCreate.php Standard Create Example //FIXME @@ -57,7 +58,8 @@ function civicrm_api3_contribution_soft_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_contribution_soft_create_spec(&$params) { $params['contribution_id']['api.required'] = 1; @@ -68,7 +70,7 @@ function _civicrm_api3_contribution_soft_create_spec(&$params) { /** * Deletes an existing Soft Credit * - * @param array $params + * @param array $params * * @example ContributionSoftDelete.php Standard Delete Example * @@ -85,12 +87,13 @@ function civicrm_api3_contribution_soft_delete($params) { /** * Retrieve one or more Soft Credits * - * @param array input parameters + * @param array input parameters * * * @example ContributionSoftGet.php Standard Get Example * - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array api result * {@getfields contribution_soft_get} diff --git a/api/v3/Country.php b/api/v3/Country.php index ec6c40f22c..38242c6855 100644 --- a/api/v3/Country.php +++ b/api/v3/Country.php @@ -58,7 +58,8 @@ function civicrm_api3_country_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_country_create_spec(&$params) { $params['name']['api.required'] = 1; @@ -67,7 +68,7 @@ function _civicrm_api3_country_create_spec(&$params) { /** * Deletes an existing Country * - * @param array $params + * @param array $params * * @example CountryDelete.php Standard Delete Example * @@ -82,12 +83,13 @@ function civicrm_api3_country_delete($params) { /** * Retrieve one or more countrys * - * @param array input parameters + * @param array input parameters * * * @example CountryGet.php Standard Get Example * - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array api result array * {@getfields country_get} diff --git a/api/v3/CustomField.php b/api/v3/CustomField.php index bb2719ba97..0672cfde62 100644 --- a/api/v3/CustomField.php +++ b/api/v3/CustomField.php @@ -41,7 +41,8 @@ * as parameters. Some of the most commonly used parameters are * described below * - * @param array $params an associative array used in construction + * @param array $params + * An associative array used in construction. * retrieval of the object * */ @@ -52,7 +53,8 @@ * function after deletion so that the field is available for us (getfields manages date conversion * among other things * - * @param $params array Associative array of property name/value pairs to create new custom field. + * @param $params + * Array Associative array of property name/value pairs to create new custom field. * * @return Newly API success object * @@ -91,7 +93,8 @@ function _civicrm_api3_custom_field_flush_static_caches(){ /** * Adjust Metadata for Create action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_custom_field_create_spec(&$params) { $params['label']['api.required'] = 1; @@ -109,7 +112,8 @@ function _civicrm_api3_custom_field_create_spec(&$params) { /** * Use this API to delete an existing custom group field. * - * @param $params Array id of the field to be deleted + * @param $params + * Array id of the field to be deleted. * * @return array * @example CustomFieldDelete.php @@ -131,7 +135,8 @@ function civicrm_api3_custom_field_delete($params) { /** * Use this API to get existing custom fields. * - * @param array $params Array to search on + * @param array $params + * Array to search on. *{* * * @return array @@ -147,10 +152,14 @@ function civicrm_api3_custom_field_get($params) { * Helper function to validate custom field value * @deprecated * - * @param String $fieldName Custom field name (eg: custom_8 ) - * @param Mixed $value Field value to be validate - * @param Array $fieldDetails Field Details - * @param Array $errors Collect validation errors + * @param string $fieldName + * Custom field name (eg: custom_8 ). + * @param mixed $value + * Field value to be validate. + * @param array $fieldDetails + * Field Details. + * @param array $errors + * Collect validation errors. * * @return array Validation errors * @todo remove this function - not in use but need to review functionality before diff --git a/api/v3/CustomGroup.php b/api/v3/CustomGroup.php index 736f7a8000..489f49391f 100644 --- a/api/v3/CustomGroup.php +++ b/api/v3/CustomGroup.php @@ -41,7 +41,8 @@ * as parameters. Some of the most commonly used parameters are * described below * - * @param array $params an associative array used in construction + * @param array $params + * An associative array used in construction. * retrieval of the object * @todo missing get function * @@ -55,7 +56,8 @@ * See the CRM Data Model for custom_group property definitions * $params['class_name'] is a required field, class being extended. * - * @param $params array Associative array of property name/value pairs to insert in group. + * @param $params + * Array Associative array of property name/value pairs to insert in group. * {@getfields CustomGroup_create} * * @return Newly create custom_group object @@ -82,7 +84,8 @@ function civicrm_api3_custom_group_create($params) { /** * Adjust Metadata for Create action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_custom_group_create_spec(&$params) { $params['extends']['api.required'] = 1; @@ -114,7 +117,8 @@ function civicrm_api3_custom_group_delete($params) { /** * Use this API to get existing custom fields. * - * @param array $params Array to search on + * @param array $params + * Array to search on. * * @return array * @access public diff --git a/api/v3/CustomSearch.php b/api/v3/CustomSearch.php index c47b80aa7e..d4573923d7 100644 --- a/api/v3/CustomSearch.php +++ b/api/v3/CustomSearch.php @@ -51,7 +51,8 @@ function civicrm_api3_custom_search_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_custom_search_create_spec(&$params) { require_once 'api/v3/OptionValue.php'; @@ -65,7 +66,7 @@ function _civicrm_api3_custom_search_create_spec(&$params) { /** * Deletes an existing ReportTemplate * - * @param array $params + * @param array $params * * {@example ReportTemplateDelete.php 0} * diff --git a/api/v3/CustomValue.php b/api/v3/CustomValue.php index 637301db90..5aac497d5b 100644 --- a/api/v3/CustomValue.php +++ b/api/v3/CustomValue.php @@ -45,7 +45,8 @@ * Sets custom values for an entity. * * - * @param $params expected keys are in format custom_fieldID:recordID or custom_groupName:fieldName:recordID + * @param $params + * Expected keys are in format custom_fieldID:recordID or custom_groupName:fieldName:recordID. * for example: * // entity ID. You do not need to specify entity type, we figure it out based on the fields you're using * 'entity_id' => 123, @@ -117,7 +118,8 @@ function civicrm_api3_custom_value_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_custom_value_create_spec(&$params) { $params['entity_id']['api.required'] = 1; @@ -127,7 +129,8 @@ function _civicrm_api3_custom_value_create_spec(&$params) { /** * Use this API to get existing custom values for an entity. * - * @param $params array specifying the entity_id + * @param $params + * Array specifying the entity_id. * Optionally include entity_type param, i.e. 'entity_type' => 'Activity' * If no entity_type is supplied, it will be determined based on the fields you request. * If no entity_type is supplied and no fields are specified, 'Contact' will be assumed. @@ -232,7 +235,8 @@ function civicrm_api3_custom_value_get($params) { * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_custom_value_get_spec(&$params) { $params['entity_id']['api.required'] = 1; diff --git a/api/v3/Dashboard.php b/api/v3/Dashboard.php index 784e478bfe..c2790acade 100644 --- a/api/v3/Dashboard.php +++ b/api/v3/Dashboard.php @@ -41,7 +41,8 @@ /** * Creates or updates an Dashlet. * - * @param array $params array of property name/value + * @param array $params + * Array of property name/value. * pairs for the Dashlet. * * @return array Array containing 'is_error' to denote success or failure and details of the created activity @@ -61,7 +62,8 @@ function civicrm_api3_dashboard_create($params) { /** * Specify Meta data for create. Note that this data is retrievable via the getfields function * and is used for pre-filling defaults and ensuring mandatory requirements are met. - * @param array $params (reference) array of parameters determined by getfields + * @param array $params + * (reference) array of parameters determined by getfields. */ function _civicrm_api3_dashboard_create_spec(&$params) { unset($params['version']); @@ -70,7 +72,8 @@ function _civicrm_api3_dashboard_create_spec(&$params) { /** * Gets a CiviCRM Dashlets according to parameters * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs for the activity. * * @return array @@ -86,7 +89,8 @@ function civicrm_api3_dashboard_get($params) { /** * Delete a specified Dashlet. * - * @param array $params array holding 'id' OR 'name' of dashlet to be deleted + * @param array $params + * Array holding 'id' OR 'name' of dashlet to be deleted. * * @return void|CRM_Core_Error An error if 'name or ID' is invalid, * diff --git a/api/v3/DashboardContact.php b/api/v3/DashboardContact.php index 83492f90aa..6ee8662c71 100644 --- a/api/v3/DashboardContact.php +++ b/api/v3/DashboardContact.php @@ -63,7 +63,8 @@ function civicrm_api3_dashboard_contact_create($params) { /** * Gets a CiviCRM Dashlets of Contacts according to parameters * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs for the activity. * * @return array @@ -77,7 +78,8 @@ function civicrm_api3_dashboard_contact_get($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_dashboard_contact_create_spec(&$params) { unset($params['version']); diff --git a/api/v3/Domain.php b/api/v3/Domain.php index 06f28a2b01..a7ef5b0c4f 100644 --- a/api/v3/Domain.php +++ b/api/v3/Domain.php @@ -116,7 +116,8 @@ function civicrm_api3_domain_get($params) { * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_domain_get_spec(&$params) { $params['current_domain'] = array('title' => "get loaded domain"); @@ -140,7 +141,8 @@ function civicrm_api3_domain_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_domain_create_spec(&$params) { $params['domain_version'] = $params['version']; diff --git a/api/v3/Email.php b/api/v3/Email.php index 1a5ce14599..767f4b6623 100644 --- a/api/v3/Email.php +++ b/api/v3/Email.php @@ -57,7 +57,8 @@ function civicrm_api3_email_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_email_create_spec(&$params) { // TODO a 'clever' default should be introduced @@ -69,7 +70,7 @@ function _civicrm_api3_email_create_spec(&$params) { /** * Deletes an existing Email * - * @param array $params + * @param array $params * * @example EmailDelete.php Standard Delete Example * @@ -84,12 +85,13 @@ function civicrm_api3_email_delete($params) { /** * Retrieve one or more emails * - * @param array input parameters + * @param array input parameters * * * @example EmailGet.php Standard Get Example * - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array api result array * {@getfields email_get} diff --git a/api/v3/EntityTag.php b/api/v3/EntityTag.php index 57a81e7d43..b5b2f4d1f1 100644 --- a/api/v3/EntityTag.php +++ b/api/v3/EntityTag.php @@ -68,7 +68,8 @@ function civicrm_api3_entity_tag_get($params) { * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_entity_tag_get_spec(&$params) { $params['entity_id']['api.aliases'] = array('contact_id'); diff --git a/api/v3/Event.php b/api/v3/Event.php index 9f29a83e9e..c2ebc3529c 100644 --- a/api/v3/Event.php +++ b/api/v3/Event.php @@ -47,7 +47,8 @@ * * This API is used for creating a Event * - * @param array $params input parameters + * @param array $params + * Input parameters. * Allowed @params array keys are: * {@getfields event_create} * @@ -72,7 +73,8 @@ function civicrm_api3_event_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_event_create_spec(&$params) { $params['start_date']['api.required'] = 1; @@ -98,7 +100,8 @@ function _civicrm_api3_event_create_legacy_support_42(&$params){ * Get Event record. * * - * @param array $params an associative array of name/value property values of civicrm_event + * @param array $params + * An associative array of name/value property values of civicrm_event. * {@getfields event_get} * * @return Array of all found event property values. @@ -159,7 +162,8 @@ function civicrm_api3_event_get($params) { * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_event_get_spec(&$params) { $params['financial_type_id']['api.aliases'] = array('contribution_type_id'); @@ -185,7 +189,8 @@ function _civicrm_api3_event_get_legacy_support_42(&$event, $event_id){ * * This API is used for deleting a event * - * @param Array $params array containing event_id to be deleted + * @param Array $params + * Array containing event_id to be deleted. * * @return boolean true if success, error otherwise * @access public @@ -202,8 +207,10 @@ function civicrm_api3_event_delete($params) { * add 'is_full' & 'available_seats' to the return array. (this might be better in the BAO) * Default BAO function returns a string if full rather than a Bool - which is more appropriate to a form * - * @param array $event return array of the event - * @param int $event_id Id of the event to be updated + * @param array $event + * Return array of the event. + * @param int $event_id + * Id of the event to be updated. * */ /** @@ -225,7 +232,8 @@ function _civicrm_api3_event_getisfull(&$event, $event_id) { /** * @see _civicrm_api3_generic_getlist_params. * - * @param $request array + * @param $request + * Array. */ function _civicrm_api3_event_getlist_params(&$request) { $fieldsToReturn = array('start_date', 'event_type_id', 'title', 'summary'); @@ -240,8 +248,10 @@ function _civicrm_api3_event_getlist_params(&$request) { /** * @see _civicrm_api3_generic_getlist_output * - * @param $result array - * @param $request array + * @param $result + * Array. + * @param $request + * Array. * * @return array */ diff --git a/api/v3/Extension.php b/api/v3/Extension.php index 18e52ec354..99795196bf 100644 --- a/api/v3/Extension.php +++ b/api/v3/Extension.php @@ -42,7 +42,8 @@ define('API_V3_EXTENSION_DELIMITER', ','); /** * Install an extension * - * @param array $params input parameters + * @param array $params + * Input parameters. * - key: string, eg "com.example.myextension" * - keys: mixed; array of string, eg array("com.example.myextension1", "com.example.myextension2") or string with comma-delimited list * using 'keys' should be more performant than making multiple API calls with 'key' @@ -101,7 +102,8 @@ function civicrm_api3_extension_upgrade() { /** * Enable an extension * - * @param array $params input parameters + * @param array $params + * Input parameters. * - key: string, eg "com.example.myextension" * - keys: mixed; array of string, eg array("com.example.myextension1", "com.example.myextension2") or string with comma-delimited list * using 'keys' should be more performant than making multiple API calls with 'key' @@ -125,7 +127,8 @@ function civicrm_api3_extension_enable($params) { /** * Disable an extension * - * @param array $params input parameters + * @param array $params + * Input parameters. * - key: string, eg "com.example.myextension" * - keys: mixed; array of string, eg array("com.example.myextension1", "com.example.myextension2") or string with comma-delimited list * using 'keys' should be more performant than making multiple API calls with 'key' @@ -149,7 +152,8 @@ function civicrm_api3_extension_disable($params) { /** * Uninstall an extension * - * @param array $params input parameters + * @param array $params + * Input parameters. * - key: string, eg "com.example.myextension" * - keys: array of string, eg array("com.example.myextension1", "com.example.myextension2") * using 'keys' should be more performant than making multiple API calls with 'key' @@ -175,7 +179,8 @@ function civicrm_api3_extension_uninstall($params) { /** * Download and install an extension * - * @param array $params input parameters + * @param array $params + * Input parameters. * - key: string, eg "com.example.myextension" * - url: string eg "http://repo.com/myextension-1.0.zip" * @@ -226,7 +231,8 @@ function civicrm_api3_extension_download($params) { /** * Download and install an extension * - * @param array $params input parameters + * @param array $params + * Input parameters. * - local: bool, whether to rescan local filesystem (default: TRUE) * - remote: bool, whether to rescan remote repository (default: TRUE) * @@ -287,7 +293,8 @@ function civicrm_api3_extension_get($params) { /** * Determine the list of extension keys * - * @param array $params API request params with 'key' or 'keys' + * @param array $params + * API request params with 'key' or 'keys'. * @return array of extension keys * @throws API_Exception */ diff --git a/api/v3/File.php b/api/v3/File.php index d2e9007e4a..8db55ecdd4 100644 --- a/api/v3/File.php +++ b/api/v3/File.php @@ -45,7 +45,8 @@ * * This API is used for creating a file * - * @param array $params an associative array of name/value property values of civicrm_file + * @param array $params + * An associative array of name/value property values of civicrm_file. * * @return array of newly created file property values. * @access public @@ -81,7 +82,8 @@ function civicrm_api3_file_create($params) { * This api is used for finding an existing file. * Required parameters : id OR file_type_id of a file * - * @param array $params an associative array of name/value property values of civicrm_file + * @param array $params + * An associative array of name/value property values of civicrm_file. * * @return Array of all found file object property values. * @access public @@ -97,7 +99,8 @@ function civicrm_api3_file_get($params) { * This api is used for updating an existing file. * Required parameters : id of a file * - * @param Array $params an array of name/value property values of civicrm_file + * @param Array $params + * An array of name/value property values of civicrm_file. * * @return array of updated file object property values * @access public diff --git a/api/v3/Generic.php b/api/v3/Generic.php index 2dda583681..6140fe80a1 100644 --- a/api/v3/Generic.php +++ b/api/v3/Generic.php @@ -10,7 +10,8 @@ * access multiple objects e.g. contact api accesses is_deleted from the activity * table & from the contact table * - * @param array $apiRequest api request as an array. Keys are + * @param array $apiRequest + * Api request as an array. Keys are. * - entity: string * - action: string * - version: string @@ -140,7 +141,8 @@ function civicrm_api3_generic_getfields($apiRequest) { /** * API return function to reformat results as count * - * @param array $apiRequest api request as an array. Keys are + * @param array $apiRequest + * Api request as an array. Keys are. * * @throws API_Exception * @return integer count of results @@ -160,7 +162,8 @@ function civicrm_api3_generic_getcount($apiRequest) { /** * API return function to reformat results as single result * - * @param array $apiRequest api request as an array. Keys are + * @param array $apiRequest + * Api request as an array. Keys are. * * @return integer count of results */ @@ -183,7 +186,8 @@ function civicrm_api3_generic_getsingle($apiRequest) { /** * API return function to reformat results as single value * - * @param array $apiRequest api request as an array. Keys are + * @param array $apiRequest + * Api request as an array. Keys are. * * @return integer count of results */ @@ -221,7 +225,8 @@ function _civicrm_api3_generic_getrefcount_spec(&$params) { /** * API to determine if a record is in-use * - * @param array $apiRequest api request as an array + * @param array $apiRequest + * Api request as an array. * * @throws API_Exception * @return array API result (int 0 or 1) @@ -247,7 +252,8 @@ function civicrm_api3_generic_getrefcount($apiRequest) { /** * API wrapper for replace function * - * @param array $apiRequest api request as an array. Keys are + * @param array $apiRequest + * Api request as an array. Keys are. * * @return integer count of results */ @@ -258,7 +264,8 @@ function civicrm_api3_generic_replace($apiRequest) { /** * API wrapper for getoptions function * - * @param array $apiRequest api request as an array. + * @param array $apiRequest + * Api request as an array. * * @return array of results */ @@ -296,11 +303,15 @@ function civicrm_api3_generic_getoptions($apiRequest) { * * This function is only split out for the purpose of code clarity / comment block documentation * - * @param array $metadata the array of metadata that will form the result of the getfields function + * @param array $metadata + * The array of metadata that will form the result of the getfields function. * @param $apiRequest - * @param string $fieldname field currently being processed - * @param array $fieldSpec metadata for that field - * @param array $fieldsToResolve anny field resolutions specifically requested + * @param string $fieldname + * Field currently being processed. + * @param array $fieldSpec + * Metadata for that field. + * @param array $fieldsToResolve + * Anny field resolutions specifically requested. */ function _civicrm_api3_generic_get_metadata_options(&$metadata, $apiRequest, $fieldname, $fieldSpec, $fieldsToResolve){ if (empty($fieldSpec['pseudoconstant']) && empty($fieldSpec['option_group_id'])) { diff --git a/api/v3/Generic/Getlist.php b/api/v3/Generic/Getlist.php index f6fe772db6..028b6fc7db 100644 --- a/api/v3/Generic/Getlist.php +++ b/api/v3/Generic/Getlist.php @@ -28,7 +28,8 @@ /** * Generic api wrapper used for quicksearch and autocomplete * - * @param $apiRequest array + * @param $apiRequest + * Array. * @return mixed */ function civicrm_api3_generic_getList($apiRequest) { @@ -66,8 +67,10 @@ function civicrm_api3_generic_getList($apiRequest) { /** * Set defaults for api.getlist * - * @param $entity string - * @param $request array + * @param $entity + * String. + * @param $request + * Array. */ function _civicrm_api3_generic_getList_defaults($entity, &$request) { $config = CRM_Core_Config::singleton(); @@ -127,7 +130,8 @@ function _civicrm_api3_generic_getList_defaults($entity, &$request) { /** * Fallback implementation of getlist_params. May be overridden by individual apis * - * @param $request array + * @param $request + * Array. */ function _civicrm_api3_generic_getlist_params(&$request) { $fieldsToReturn = array($request['id_field'], $request['label_field']); @@ -143,8 +147,10 @@ function _civicrm_api3_generic_getlist_params(&$request) { /** * Fallback implementation of getlist_output. May be overridden by individual apis * - * @param $result array - * @param $request array + * @param $result + * Array. + * @param $request + * Array. * * @return array */ diff --git a/api/v3/Generic/Update.php b/api/v3/Generic/Update.php index 02743a2c11..ae28129d2e 100644 --- a/api/v3/Generic/Update.php +++ b/api/v3/Generic/Update.php @@ -35,7 +35,8 @@ * To do this, perform a 'get' action to load the existing values, then merge in the updates * and call 'create' to save the revised entity. * - * @param array $apiRequest array with keys: + * @param array $apiRequest + * Array with keys:. * - entity: string * - action: string * - version: string diff --git a/api/v3/Grant.php b/api/v3/Grant.php index 68206b0fd2..c2023a7616 100644 --- a/api/v3/Grant.php +++ b/api/v3/Grant.php @@ -41,7 +41,8 @@ * In case of updating existing grant, id of that particular grant must * be in $params array. * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'grant' * * @return array grant array @@ -56,7 +57,8 @@ function civicrm_api3_grant_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_grant_create_spec(&$params) { $params['grant_type_id']['api.required'] = 1; @@ -66,7 +68,8 @@ function _civicrm_api3_grant_create_spec(&$params) { /** * Returns array of grants matching a set of one or more group properties * - * @param array $params Array of one or more valid + * @param array $params + * Array of one or more valid. * property_name=>value pairs. If $params is set * as null, all grants will be returned * @@ -84,7 +87,8 @@ function civicrm_api3_grant_get($params) { * This method is used to delete any existing grant. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array API Result Array diff --git a/api/v3/Group.php b/api/v3/Group.php index 40327be8e6..b9155be9c8 100644 --- a/api/v3/Group.php +++ b/api/v3/Group.php @@ -43,7 +43,8 @@ * be in $params array. Either id or name is required field in the * $params array * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'group' * * @return array API result array @@ -59,7 +60,8 @@ function civicrm_api3_group_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_group_create_spec(&$params) { $params['is_active']['api.default'] = 1; @@ -69,7 +71,8 @@ function _civicrm_api3_group_create_spec(&$params) { /** * Returns array of groups matching a set of one or more group properties * - * @param array $params Array of one or more valid + * @param array $params + * Array of one or more valid. * property_name=>value pairs. If $params is set * as null, all groups will be returned * @@ -97,7 +100,8 @@ function civicrm_api3_group_get($params) { * This method is used to delete any existing group. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array API result array diff --git a/api/v3/GroupContact.php b/api/v3/GroupContact.php index 8672413542..cdf473b400 100644 --- a/api/v3/GroupContact.php +++ b/api/v3/GroupContact.php @@ -45,7 +45,8 @@ * If no status mentioned in params, by default 'added' will be used * to fetch the records * - * @param array $params name value pair of contact information + * @param array $params + * Name value pair of contact information. * {@getfields GroupContact_get} * * @return array list of groups, given contact subsribed to @@ -72,7 +73,8 @@ function civicrm_api3_group_contact_get($params) { * * @access public * - * @param array $params Input parameters + * @param array $params + * Input parameters. * * Allowed @params array keys are:
* "contact_id" (required) : first contact to add
diff --git a/api/v3/GroupNesting.php b/api/v3/GroupNesting.php index 9d0e21f3fd..797cd03f02 100644 --- a/api/v3/GroupNesting.php +++ b/api/v3/GroupNesting.php @@ -40,7 +40,8 @@ /** * Provides group nesting record(s) given parent and/or child id. * - * @param array $params an array containing at least child_group_id or parent_group_id + * @param array $params + * An array containing at least child_group_id or parent_group_id. * {@getfields GroupNesting_get} * * @return array list of group nesting records @@ -54,7 +55,8 @@ function civicrm_api3_group_nesting_get($params) { * Creates group nesting record for given parent and child id. * Parent and child groups need to exist. * - * @param array $params parameters array - allowed array keys include: + * @param array $params + * Parameters array - allowed array keys include:. * * @return array TBD * {@getfields GroupNesting_create @@ -73,7 +75,8 @@ function civicrm_api3_group_nesting_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_group_nesting_create_spec(&$params) { $params['child_group_id']['api.required'] = 1; @@ -83,7 +86,8 @@ function _civicrm_api3_group_nesting_create_spec(&$params) { /** * Removes specific nesting records. * - * @param array $params parameters array - allowed array keys include: + * @param array $params + * Parameters array - allowed array keys include:. * {@getfields GroupNesting_delete} * * @return array API Success or fail array diff --git a/api/v3/GroupOrganization.php b/api/v3/GroupOrganization.php index 5ea1dbde40..e084b80072 100644 --- a/api/v3/GroupOrganization.php +++ b/api/v3/GroupOrganization.php @@ -44,7 +44,8 @@ * If no status mentioned in params, by default 'added' will be used * to fetch the records * - * @param array $params name value pair of contact information + * @param array $params + * Name value pair of contact information. * {@getfields GroupOrganization_get} * @example GroupOrganizationGet.php * @@ -58,7 +59,8 @@ function civicrm_api3_group_organization_get($params) { * @example GroupOrganizationCreate.php * {@getfields GroupOrganization_create} * - * @param $params array + * @param $params + * Array. * * @return array * @@ -79,7 +81,8 @@ function civicrm_api3_group_organization_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_group_organization_create_spec(&$params) { $params['organization_id']['api.required'] = 1; @@ -91,7 +94,8 @@ function _civicrm_api3_group_organization_create_spec(&$params) { * * This API is used for deleting a Group Organization * - * @param array $params with 'id' = ID of the Group Organization to be deleted + * @param array $params + * With 'id' = ID of the Group Organization to be deleted. * * @return array API Result * {@getfields GroupOrganization_delete} diff --git a/api/v3/Im.php b/api/v3/Im.php index 4fa2bc4460..faf8ae427a 100644 --- a/api/v3/Im.php +++ b/api/v3/Im.php @@ -53,7 +53,8 @@ function civicrm_api3_im_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_im_create_spec(&$params) { $params['contact_id']['api.required'] = 1; @@ -62,7 +63,7 @@ function _civicrm_api3_im_create_spec(&$params) { /** * Deletes an existing IM * - * @param array $params + * @param array $params * {@getfields im_delete} * * @return array API result Array @@ -76,9 +77,10 @@ function civicrm_api3_im_delete($params) { /** * Retrieve one or more IM * - * @param mixed[] (reference ) input parameters + * @param mixed[] (reference ) input parameters * {@getfields im_get} - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array details of found IM * diff --git a/api/v3/Job.php b/api/v3/Job.php index 46e62c2a4b..bdf8a0fff6 100644 --- a/api/v3/Job.php +++ b/api/v3/Job.php @@ -43,7 +43,8 @@ * Adjust metadata for "Create" action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_job_create_spec(&$params) { $params['run_frequency']['api.required'] = 1; @@ -58,7 +59,8 @@ function _civicrm_api3_job_create_spec(&$params) { /** * create scheduled job * - * @param array $params Associative array of property name/value pairs to insert in new job. + * @param array $params + * Associative array of property name/value pairs to insert in new job. * * @return success or error * {@getfields Job_create} @@ -71,7 +73,7 @@ function civicrm_api3_job_create($params) { /** * Retrieve one or more job - * @param array input parameters + * @param array input parameters * @return array api result array * {@getfields email_get} * @access public @@ -98,7 +100,8 @@ function civicrm_api3_job_delete($params) { * Dumb wrapper to execute scheduled jobs. Always creates success - errors * and results are handled in the job log. * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @return array API Result Array * @@ -117,7 +120,8 @@ function civicrm_api3_job_execute($params) { /** * Adjust Metadata for Execute action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_job_execute_spec(&$params) { } @@ -125,7 +129,8 @@ function _civicrm_api3_job_execute_spec(&$params) { /** * Geocode group of contacts based on given params * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @return array API Result Array * {@getfields contact_geocode} @@ -165,7 +170,8 @@ function _civicrm_api3_job_geocode_spec(&$params) { /** * Send the scheduled reminders for all contacts (either for activities or events) * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * now - the time to use, in YmdHis format * - makes testing a bit simpler since we can simulate past/future time * @@ -199,7 +205,8 @@ function civicrm_api3_job_send_reminder($params) { * Adjust metadata for "send_reminder" action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_job_send_reminder(&$params) { //@todo this function will now take all fields in action_schedule as params @@ -212,7 +219,8 @@ function _civicrm_api3_job_send_reminder(&$params) { /** * Execute a specific report instance and send the output via email * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * sendmail - Boolean - should email be sent?, required * instanceId - Integer - the report instance ID * resetVal - Integer - should we reset form state (always true)? @@ -281,7 +289,8 @@ function civicrm_api3_job_update_greeting($params) { * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation -* @param array $params array or parameters determined by getfields +* @param array $params +* Array or parameters determined by getfields. */ function _civicrm_api3_job_update_greeting_spec(&$params) { $params['ct'] = array( @@ -299,7 +308,8 @@ function _civicrm_api3_job_update_greeting_spec(&$params) { /** * Mass update pledge statuses * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @return boolean true if success, else false * @static @@ -405,7 +415,8 @@ function civicrm_api3_job_fetch_activities($params) { /** * Process participant statuses * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @return array (reference ) array of properties, if error an array with an error id and error message * @access public @@ -429,7 +440,8 @@ function civicrm_api3_job_process_participant($params) { * IMPORTANT: * Sending renewal reminders has been migrated from this job to the Scheduled Reminders function as of 4.3. * - * @param array $params input parameters NOT USED + * @param array $params + * Input parameters NOT USED. * * @return boolean true if success, else false * @static void @@ -455,7 +467,8 @@ function civicrm_api3_job_process_membership($params) { /** * This api checks and updates the status of all survey respondants. * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @return boolean true if success, else false * @static void @@ -475,7 +488,8 @@ function civicrm_api3_job_process_respondent($params) { /** * Merges given pair of duplicate contacts. * - * @param array $params input parameters + * @param array $params + * Input parameters. * * Allowed @params array keys are: * {int $rgid rule group id} @@ -509,7 +523,8 @@ function civicrm_api3_job_process_batch_merge($params) { /** * Runs handlePaymentCron method in the specified payment processor * - * @param array $params input parameters + * @param array $params + * Input parameters. * * Expected @params array keys are: * {string 'processor_name' - the name of the payment processor, eg: Sagepay} @@ -544,7 +559,8 @@ function civicrm_api3_job_run_payment_cron($params) { /** * This api cleans up all the old session entries and temp tables. We recommend that sites run this on an hourly basis * - * @param array $params (reference ) - sends in various config parameters to decide what needs to be cleaned + * @param array $params + * (reference ) - sends in various config parameters to decide what needs to be cleaned. * * @return boolean true if success, else false * @static void diff --git a/api/v3/LineItem.php b/api/v3/LineItem.php index e51662f5f6..c391436740 100644 --- a/api/v3/LineItem.php +++ b/api/v3/LineItem.php @@ -38,7 +38,8 @@ /** * Create or update a line_item * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'line_item' * @example LineItemCreate.php Std Create example * @@ -55,7 +56,8 @@ function civicrm_api3_line_item_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_line_item_create_spec(&$params) { $params['entity_id']['api.required'] = 1; @@ -68,7 +70,8 @@ function _civicrm_api3_line_item_create_spec(&$params) { /** * 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 + * @param array $params + * Array of one or more valid property_name=>value pairs. If $params is set. * as null, all line_items will be returned (default limit is 25) * * @return array Array of matching line_items @@ -85,7 +88,8 @@ function civicrm_api3_line_item_get($params) { * This method is used to delete any existing line_item. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array API result array diff --git a/api/v3/LocBlock.php b/api/v3/LocBlock.php index 28fdb1143b..1432a3c2da 100644 --- a/api/v3/LocBlock.php +++ b/api/v3/LocBlock.php @@ -38,7 +38,8 @@ /** * Create or update a loc_block * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'loc_block' * @example LocBlockCreate.php Std Create example * @@ -89,7 +90,8 @@ function civicrm_api3_loc_block_create($params) { /** * Returns array of loc_blocks matching a set of one or more properties * - * @param array $params Array of one or more valid property_name=>value pairs. If $params is set + * @param array $params + * Array of one or more valid property_name=>value pairs. If $params is set. * as null, all loc_blocks will be returned (default limit is 25) * * @return array Array of matching loc_blocks @@ -127,7 +129,8 @@ function civicrm_api3_loc_block_get($params) { * This method is used to delete any existing loc_block. * id of the record to be deleted is required field in $params array * - * @param array $params array containing id of the record to be deleted + * @param array $params + * Array containing id of the record to be deleted. * * @return array API result array * {@getfields loc_block_delete} diff --git a/api/v3/LocationType.php b/api/v3/LocationType.php index 722049dd44..169eace77a 100644 --- a/api/v3/LocationType.php +++ b/api/v3/LocationType.php @@ -62,7 +62,8 @@ function civicrm_api3_location_type_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_location_type_create_spec(&$params) { $params['is_active']['api.default'] = 1; @@ -72,7 +73,7 @@ function _civicrm_api3_location_type_create_spec(&$params) { /** * Deletes an existing Location Type * - * @param array $params + * @param array $params * * @example LocationTypeDelete.php Standard Delete Example * @@ -87,12 +88,13 @@ function civicrm_api3_location_type_delete($params) { /** * Retrieve one or more Location Types * - * @param array input parameters + * @param array input parameters * * * @example LocationTypeGet.php Standard Get Example * - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array api result * {@getfields LocationType_get} diff --git a/api/v3/MailSettings.php b/api/v3/MailSettings.php index f9c897923b..6eb567932e 100644 --- a/api/v3/MailSettings.php +++ b/api/v3/MailSettings.php @@ -37,7 +37,8 @@ /** * Create or update a mail_settings * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'mail_settings' * @example mail_settingsCreate.php Std Create example * @@ -53,7 +54,8 @@ function civicrm_api3_mail_settings_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mail_settings_create_spec(&$params) { @@ -62,7 +64,8 @@ function _civicrm_api3_mail_settings_create_spec(&$params) { /** * Returns array of mail_settings matching a set of one or more group properties * - * @param array $params Array of one or more valid + * @param array $params + * Array of one or more valid. * property_name=>value pairs. If $params is set * as null, all mail_settings will be returned * @@ -80,7 +83,8 @@ function civicrm_api3_mail_settings_get($params) { * This method is used to delete any existing mail_settings. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array api result array diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 61bcd9f62e..72447c0b6c 100755 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -95,7 +95,8 @@ function civicrm_api3_mailing_get_token($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_create_spec(&$params) { $params['name']['api.required'] = 1; @@ -208,7 +209,8 @@ function civicrm_api3_mailing_event_bounce($params) { * Adjust Metadata for bounce_spec action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_event_bounce_spec(&$params) { $params['job_id']['api.required'] = 1; @@ -272,7 +274,8 @@ function civicrm_api3_mailing_event_reply($params) { * Adjust Metadata for event_reply action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_event_reply_spec(&$params) { $params['job_id']['api.required'] = 1; @@ -313,7 +316,8 @@ function civicrm_api3_mailing_event_forward($params) { * Adjust Metadata for event_forward action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_event_forward_spec(&$params) { $params['job_id']['api.required'] = 1; @@ -511,7 +515,8 @@ function civicrm_api3_mailing_send_test($params) { * Adjust Metadata for send_mail action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_stats_spec(&$params) { $params['date']['api.default'] = 'now'; diff --git a/api/v3/MailingAB.php b/api/v3/MailingAB.php index 601fff57e1..d230f203c6 100755 --- a/api/v3/MailingAB.php +++ b/api/v3/MailingAB.php @@ -79,7 +79,8 @@ function civicrm_api3_mailing_a_b_get($params) { * Adjust Metadata for submit action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_a_b_submit_spec(&$params) { $mailingFields = CRM_Mailing_DAO_Mailing::fields(); @@ -168,7 +169,8 @@ function civicrm_api3_mailing_a_b_submit($params) { * Adjust Metadata for graph_stats action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_a_b_graph_stats_spec(&$params) { $params['criteria']['title'] = 'Criteria'; diff --git a/api/v3/MailingContact.php b/api/v3/MailingContact.php index d2f6313a23..361e121320 100644 --- a/api/v3/MailingContact.php +++ b/api/v3/MailingContact.php @@ -39,7 +39,8 @@ /** * Get all the mailings and details that a contact was involved with * - * @param array $params input parameters + * @param array $params + * Input parameters. * - key: contact_id, value: int - required * - key: type, value: Delivered | Bounced - optional, defaults to Delivered * - Future extensions will include: Opened, Clicked, Forwarded @@ -57,7 +58,7 @@ function civicrm_api3_mailing_contact_get($params) { * This is a wrapper for the functions that return the results from the 'quasi-entity' * mailing contact * @param array $params - * @param Boolean $count + * @param bool $count * @throws Exception */ function _civicrm_api3_mailing_contact_getresults($params, $count){ @@ -78,7 +79,8 @@ function _civicrm_api3_mailing_contact_getresults($params, $count){ /** * Adjust Metadata for Get action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_contact_get_spec(&$params) { $params['contact_id']['api.required'] = 1; @@ -285,7 +287,8 @@ 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 * - * @param array $params input parameters + * @param array $params + * Input parameters. * - key: contact_id, value: int - required * - key: type, value: Delivered | Bounced - optional, defaults to Delivered * - Future extensions will include: Opened, Clicked, Forwarded diff --git a/api/v3/MailingEventConfirm.php b/api/v3/MailingEventConfirm.php index 6846fd56e6..2e26fd8883 100644 --- a/api/v3/MailingEventConfirm.php +++ b/api/v3/MailingEventConfirm.php @@ -40,7 +40,8 @@ /** * Handle a confirm event * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'survey' * * @throws Exception @@ -66,7 +67,8 @@ function civicrm_api3_mailing_event_confirm_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_event_confirm_create_spec(&$params) { $params['contact_id']['api.required'] = 1; diff --git a/api/v3/MailingEventQueue.php b/api/v3/MailingEventQueue.php index 8dde90e2dc..2746fd081e 100644 --- a/api/v3/MailingEventQueue.php +++ b/api/v3/MailingEventQueue.php @@ -37,7 +37,8 @@ /** * Handle a confirm event * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'survey' * * @throws Exception @@ -69,7 +70,8 @@ function civicrm_api3_mailing_event_queue_delete($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_event_queue_create_spec(&$params) { $params['job_id']['api.required'] = 1; diff --git a/api/v3/MailingEventResubscribe.php b/api/v3/MailingEventResubscribe.php index 234ee74032..49eb41afe4 100644 --- a/api/v3/MailingEventResubscribe.php +++ b/api/v3/MailingEventResubscribe.php @@ -40,7 +40,8 @@ /** * Subscribe from mailing group * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'survey' * * @return array api result array @@ -70,7 +71,8 @@ function civicrm_api3_mailing_event_resubscribe_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_event_resubscribe_create_spec(&$params) { $params['event_queue_id']['api.required'] = 1; diff --git a/api/v3/MailingEventSubscribe.php b/api/v3/MailingEventSubscribe.php index 513d05998c..503ea4f259 100644 --- a/api/v3/MailingEventSubscribe.php +++ b/api/v3/MailingEventSubscribe.php @@ -40,7 +40,8 @@ /** * Subscribe from mailing group * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'survey' * * @throws API_Exception @@ -82,7 +83,8 @@ function civicrm_api3_mailing_event_subscribe_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_event_subscribe_create_spec(&$params) { $params['email']['api.required'] = 1; diff --git a/api/v3/MailingEventUnsubscribe.php b/api/v3/MailingEventUnsubscribe.php index 256ebed461..be867fa208 100644 --- a/api/v3/MailingEventUnsubscribe.php +++ b/api/v3/MailingEventUnsubscribe.php @@ -40,7 +40,8 @@ /** * Unsubscribe from mailing group * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'survey' * * @return array api result array @@ -77,7 +78,8 @@ function civicrm_api3_mailing_event_unsubscribe_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_event_unsubscribe_create_spec(&$params) { $params['job_id']['api.required'] = 1; diff --git a/api/v3/MailingJob.php b/api/v3/MailingJob.php index 0534724901..1b23fbd70c 100644 --- a/api/v3/MailingJob.php +++ b/api/v3/MailingJob.php @@ -52,7 +52,8 @@ function civicrm_api3_mailing_job_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_mailing_job_create_spec(&$params) { $params['status']['api.default'] = 'Scheduled'; @@ -63,7 +64,8 @@ function _civicrm_api3_mailing_job_create_spec(&$params) { /** * Returns array of Mailing Jobs matching a set of one or more group properties * - * @param array $params Array of one or more valid + * @param array $params + * Array of one or more valid. * @param array $ids * * @return array API return Array of matching mailing jobs diff --git a/api/v3/MailingRecipients.php b/api/v3/MailingRecipients.php index a90e6a1eb5..624839872c 100644 --- a/api/v3/MailingRecipients.php +++ b/api/v3/MailingRecipients.php @@ -45,7 +45,8 @@ /** * Returns array of Mailing Recipients * - * @param array $params Array of one or more valid + * @param array $params + * Array of one or more valid. * @param array $ids * * @return array API return Array of matching mailing jobs diff --git a/api/v3/Membership.php b/api/v3/Membership.php index 5699fb6e85..2f795df4d7 100644 --- a/api/v3/Membership.php +++ b/api/v3/Membership.php @@ -42,7 +42,8 @@ * * This API is used for deleting a contact membership * - * @param $params array array holding id - Id of the contact membership to be deleted + * @param $params + * Array array holding id - Id of the contact membership to be deleted. * * @return array api result * {@getfields membership_delete} @@ -58,7 +59,8 @@ function civicrm_api3_membership_delete($params) { * This API is used for creating a Membership for a contact. * Required parameters : membership_type_id and status_id. * - * @param array $params an associative array of name/value property values of civicrm_membership + * @param array $params + * An associative array of name/value property values of civicrm_membership. * * @return array of newly created membership property values. * {@getfields membership_create} @@ -146,7 +148,8 @@ function civicrm_api3_membership_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_membership_create_spec(&$params) { $params['contact_id']['api.required'] = 1; @@ -166,7 +169,8 @@ function _civicrm_api3_membership_create_spec(&$params) { * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_membership_get_spec(&$params) { $params['membership_type_id']['api.aliases'] = array('membership_type'); @@ -178,7 +182,8 @@ function _civicrm_api3_membership_get_spec(&$params) { * This api will return the membership records for the contacts * having membership based on the relationship with the direct members. * - * @param Array $params key/value pairs for contact_id and some + * @param Array $params + * Key/value pairs for contact_id and some. * options affecting the desired results; has legacy support * for just passing the contact_id itself as the argument * @@ -227,7 +232,8 @@ function civicrm_api3_membership_get($params) { * is passed in as part of the reasonable expectation developers have that we will keep the api * as stable as possible * - * @param array $params parameters passed into get function + * @param array $params + * Parameters passed into get function. * @param int $membershipTypeId * @param $activeOnly * @@ -248,7 +254,8 @@ function _civicrm_api3_membership_get_customv2behaviour(&$params, $membershipTyp /** * non-standard behaviour inherited from v2 * - * @param array $params parameters passed into get function + * @param array $params + * Parameters passed into get function. * @param $membershipValues * @param int $contactID * diff --git a/api/v3/MembershipBlock.php b/api/v3/MembershipBlock.php index 100f712e9e..f8bdf3db57 100644 --- a/api/v3/MembershipBlock.php +++ b/api/v3/MembershipBlock.php @@ -40,7 +40,8 @@ /** * API to Create or update a Membership Type * - * @param array$params an associative array of name/value property values of civicrm_membership_block + * @param array$params + * An associative array of name/value property values of civicrm_membership_block. * * @return array $result newly created or updated membership type property values. * @access public @@ -54,7 +55,8 @@ function civicrm_api3_membership_block_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_membership_block_create_spec(&$params) { $params['is_active']['api.default'] = TRUE; @@ -67,7 +69,8 @@ function _civicrm_api3_membership_block_create_spec(&$params) { * * This api is used for finding an existing membership type. * - * @param array $params an associative array of name/value property values of civicrm_membership_block + * @param array $params + * An associative array of name/value property values of civicrm_membership_block. * {getfields MembershipBlock_get} * * @return array api result array of all found membership block property values. @@ -83,7 +86,7 @@ function civicrm_api3_membership_block_get($params) { * This API is used for deleting a membership type * Required parameters : id of a membership type * - * @param array $params + * @param array $params * * @return array api result array * @access public diff --git a/api/v3/MembershipPayment.php b/api/v3/MembershipPayment.php index e5125e006a..8111ade36b 100644 --- a/api/v3/MembershipPayment.php +++ b/api/v3/MembershipPayment.php @@ -39,7 +39,8 @@ /** * Add or update a link between contribution and membership * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @return array (reference ) membership_payment_id of created or updated record * {@getfields MembershipPayment_create} @@ -54,7 +55,8 @@ function civicrm_api3_membership_payment_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_membership_payment_create_spec(&$params) { $params['membership_id']['api.required'] = 1; @@ -65,7 +67,8 @@ function _civicrm_api3_membership_payment_create_spec(&$params) { * Retrieve one / all contribution(s) / membership(s) linked to a * membership / contrbution. * - * @param array $params input parameters + * @param array $params + * Input parameters. * * @return array array of properties, if error an array with an error id and error message * @example MembershipPaymentGet diff --git a/api/v3/MembershipStatus.php b/api/v3/MembershipStatus.php index 1ce2ad52d4..b3eaa0edd8 100644 --- a/api/v3/MembershipStatus.php +++ b/api/v3/MembershipStatus.php @@ -42,7 +42,8 @@ * * This API is used for creating a Membership Status * - * @param array $params an associative array of name/value property values of civicrm_membership_status + * @param array $params + * An associative array of name/value property values of civicrm_membership_status. * * @return array of newly created membership status property values. * {@getfields MembershipStatus_create} @@ -57,7 +58,8 @@ function civicrm_api3_membership_status_create($params) { * * This api is used for finding an existing membership status. * - * @param array $params an associative array of name/value property values of civicrm_membership_status + * @param array $params + * An associative array of name/value property values of civicrm_membership_status. * * @return Array of all found membership status property values. * {@getfields MembershipStatus_get} @@ -73,7 +75,8 @@ function civicrm_api3_membership_status_get($params) { * This api is used for updating an existing membership status. * Required parameters : id of a membership status * - * @param Array $params an associative array of name/value property values of civicrm_membership_status + * @param Array $params + * An associative array of name/value property values of civicrm_membership_status. * @deprecated - should just use create * * @return array of updated membership status property values @@ -114,7 +117,7 @@ function &civicrm_api3_membership_status_update($params) { * * This API is used for deleting a membership status * - * @param array Params array containing 'id' - Id of the membership status to be deleted + * @param array Params array containing 'id' - Id of the membership status to be deleted * {@getfields MembershipStatus_delete} * * @return array i diff --git a/api/v3/MembershipType.php b/api/v3/MembershipType.php index 6543f59b38..0bb4d62d8a 100644 --- a/api/v3/MembershipType.php +++ b/api/v3/MembershipType.php @@ -40,7 +40,8 @@ /** * API to Create or update a Membership Type * - * @param array $params an associative array of name/value property values of civicrm_membership_type + * @param array $params + * An associative array of name/value property values of civicrm_membership_type. * * @return array $result newly created or updated membership type property values. * @access public @@ -64,7 +65,8 @@ function civicrm_api3_membership_type_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_membership_type_create_spec(&$params) { // todo could set default here probably @@ -81,7 +83,8 @@ function _civicrm_api3_membership_type_create_spec(&$params) { * * This api is used for finding an existing membership type. * - * @param array $params an associative array of name/value property values of civicrm_membership_type + * @param array $params + * An associative array of name/value property values of civicrm_membership_type. * {getfields MembershipType_get} * * @return Array of all found membership type property values. @@ -97,7 +100,7 @@ function civicrm_api3_membership_type_get($params) { * This API is used for deleting a membership type * Required parameters : id of a membership type * - * @param array $params + * @param array $params * * @return boolean true if success, else false * @access public diff --git a/api/v3/MessageTemplate.php b/api/v3/MessageTemplate.php index f038fdaccc..463c7fb7dd 100644 --- a/api/v3/MessageTemplate.php +++ b/api/v3/MessageTemplate.php @@ -43,7 +43,8 @@ function civicrm_api3_message_template_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_message_template_create_spec(&$params) { $params['msg_title']['api.required'] = 1; @@ -55,7 +56,7 @@ function _civicrm_api3_message_template_create_spec(&$params) { } /** - * @param array $params + * @param array $params * * @return boolean | error true if successfull, error otherwise * {@getfields message_template_delete} @@ -74,12 +75,13 @@ function _civicrm_api3_message_template_get_spec(&$params) { /** * Retrieve one or more message_template * - * @param array input parameters + * @param array input parameters * * * @example SepaCreditorGet.php Standard Get Example * - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array api result array * {@getfields message_template_get} @@ -102,7 +104,8 @@ function civicrm_api3_message_template_send($params) { * The metadata is used for setting defaults, documentation & * validation. * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_message_template_send_spec(&$params) { $params['messageTemplateID']['api.required'] = 1; diff --git a/api/v3/Note.php b/api/v3/Note.php index 64c091c0cf..30b684ccc6 100644 --- a/api/v3/Note.php +++ b/api/v3/Note.php @@ -47,7 +47,8 @@ * This API is used for creating a note. * Required parameters : entity_id AND note * - * @param array $params an associative array of name/value property values of civicrm_note + * @param array $params + * An associative array of name/value property values of civicrm_note. * {@getfields note_create} * * @return array API result array @@ -64,7 +65,8 @@ function civicrm_api3_note_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_note_create_spec(&$params) { $params['entity_table']['api.default'] = "civicrm_contact"; @@ -78,7 +80,8 @@ function _civicrm_api3_note_create_spec(&$params) { * * This API is used for deleting a note * - * @param array $params including id of the note to be deleted + * @param array $params + * Including id of the note to be deleted. * {@getfields note_delete} * * @return null @@ -93,7 +96,8 @@ function civicrm_api3_note_delete($params) { /** * Retrieve a specific note, given a set of input params * - * @param array $params input parameters + * @param array $params + * Input parameters. * * @return array array of properties, * if error an array with an error id and error message @@ -110,7 +114,8 @@ function civicrm_api3_note_get($params) { * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_note_get_spec(&$params) { $params['entity_table']['api.default'] = "civicrm_contact"; @@ -119,7 +124,8 @@ function _civicrm_api3_note_get_spec(&$params) { /** * Get all descendents of given note * - * @param array $params Associative array; only required 'id' parameter is used + * @param array $params + * Associative array; only required 'id' parameter is used. * * @return array Nested associative array beginning with direct children of given note. */ diff --git a/api/v3/OptionGroup.php b/api/v3/OptionGroup.php index e14f99b258..0f31b174b6 100644 --- a/api/v3/OptionGroup.php +++ b/api/v3/OptionGroup.php @@ -16,7 +16,8 @@ function civicrm_api3_option_group_get($params) { * In case of updating existing survey, id of that particular survey must * be in $params array. * - * @param array $params (reference) Associative array of property + * @param array $params + * (reference) Associative array of property. * name/value pairs to insert in new 'survey' * * @return array survey array @@ -31,7 +32,8 @@ function civicrm_api3_option_group_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_option_group_create_spec(&$params) { $params['name']['api.unique'] = 1; @@ -43,7 +45,8 @@ function _civicrm_api3_option_group_create_spec(&$params) { * This method is used to delete any existing Option Group. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array API Result Array diff --git a/api/v3/OptionValue.php b/api/v3/OptionValue.php index e342c99661..6e2eb8e1b9 100644 --- a/api/v3/OptionValue.php +++ b/api/v3/OptionValue.php @@ -59,7 +59,8 @@ function civicrm_api3_option_value_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_option_value_create_spec(&$params) { $params['is_active']['api.default'] = 1; @@ -72,7 +73,7 @@ function _civicrm_api3_option_value_create_spec(&$params) { /** * Deletes an existing OptionValue * - * @param array $params + * @param array $params * * {@example OptionValueDelete.php 0} * diff --git a/api/v3/Participant.php b/api/v3/Participant.php index b663e58483..4f289460fc 100644 --- a/api/v3/Participant.php +++ b/api/v3/Participant.php @@ -48,7 +48,8 @@ * Required parameters : event_id AND contact_id for new creation * : participant as name/value with participantid for edit * - * @param array $params an associative array of name/value property values of civicrm_participant + * @param array $params + * An associative array of name/value property values of civicrm_participant. * * @return array apiresult * {@getfields participant_create} @@ -141,7 +142,8 @@ function _civicrm_api3_participant_createlineitem(&$params, $participant){ * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_participant_create_spec(&$params) { $params['status_id']['api.default'] = "1"; @@ -158,7 +160,8 @@ function _civicrm_api3_participant_create_spec(&$params) { * If more than one matching participant exists, return an error, unless * the client has requested to return the first found contact * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @return array (reference ) array of properties, if error an array with an error id and error message * {@getfields participant_get} @@ -184,7 +187,8 @@ function civicrm_api3_participant_get($params) { * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_participant_get_spec(&$params) { $params['participant_test']['api.default'] = 0; @@ -196,7 +200,8 @@ function _civicrm_api3_participant_get_spec(&$params) { * * This API is used for deleting a contact participant * - * @param array $params Array containing Id of the contact participant to be deleted + * @param array $params + * Array containing Id of the contact participant to be deleted. * * {@getfields participant_delete} * @throws Exception diff --git a/api/v3/ParticipantPayment.php b/api/v3/ParticipantPayment.php index 7d7729163e..d9f5cfda01 100644 --- a/api/v3/ParticipantPayment.php +++ b/api/v3/ParticipantPayment.php @@ -47,7 +47,8 @@ * This API is used for creating a Participant Payment of Event. * Required parameters : participant_id, contribution_id. * - * @param array $params an associative array of name/value property values of civicrm_participant_payment + * @param array $params + * An associative array of name/value property values of civicrm_participant_payment. * @example ParticipantPaymentCreate.php * {@example ParticipantPaymentCreate.php 0} * @@ -73,7 +74,8 @@ function civicrm_api3_participant_payment_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_participant_payment_create_spec(&$params) { $params['participant_id']['api.required'] = 1; @@ -101,7 +103,8 @@ function civicrm_api3_participant_payment_delete($params) { * Retrieve one / all contribution(s) / participant(s) linked to a * contribution. * - * @param array $params input parameters + * @param array $params + * Input parameters. * * @return array array of properties, if error an array with an error id and error message * @example ParticipantPaymentGet diff --git a/api/v3/ParticipantStatusType.php b/api/v3/ParticipantStatusType.php index 32d7f27072..0ca2c5430e 100644 --- a/api/v3/ParticipantStatusType.php +++ b/api/v3/ParticipantStatusType.php @@ -41,7 +41,8 @@ * 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 + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'participant_status' * * @return array participant_status array @@ -56,7 +57,8 @@ function civicrm_api3_participant_status_type_create($params) { /** * Returns array of participant_statuses matching a set of one or more group properties * - * @param array $params Array of one or more valid + * @param array $params + * Array of one or more valid. * property_name=>value pairs. If $params is set * as null, all participant_statuses will be returned * @@ -75,7 +77,8 @@ function civicrm_api3_participant_status_type_get($params) { * 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 + * @param array $params + * (reference) array containing id of the group. * to be deleted * * @return array api result array diff --git a/api/v3/PaymentProcessor.php b/api/v3/PaymentProcessor.php index 5567282f42..17513278ec 100644 --- a/api/v3/PaymentProcessor.php +++ b/api/v3/PaymentProcessor.php @@ -53,7 +53,8 @@ function civicrm_api3_payment_processor_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_payment_processor_create_spec(&$params) { $params['payment_processor_type_id']['api.required'] = 1; @@ -64,7 +65,7 @@ function _civicrm_api3_payment_processor_create_spec(&$params) { /** * Deletes an existing PaymentProcessor * - * @param array $params + * @param array $params * {@getfields payment_processor_delete} * * @return array API result Array @@ -77,9 +78,10 @@ function civicrm_api3_payment_processor_delete($params) { /** * Retrieve one or more PaymentProcessor * - * @param mixed[] (reference) input parameters + * @param mixed[] (reference) input parameters * {@getfields payment_processor_get} - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array details of found PaymentProcessor * @access public diff --git a/api/v3/PaymentProcessorType.php b/api/v3/PaymentProcessorType.php index 1eefa1f303..7370d07030 100644 --- a/api/v3/PaymentProcessorType.php +++ b/api/v3/PaymentProcessorType.php @@ -44,7 +44,8 @@ /** * create payment_processor type * - * @param array $params Associative array of property name/value pairs to insert in new payment_processor type. + * @param array $params + * Associative array of property name/value pairs to insert in new payment_processor type. * * @return Newly created PaymentProcessor_type object * {@getfields PaymentProcessorType_create} @@ -71,7 +72,8 @@ function civicrm_api3_payment_processor_type_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_payment_processor_type_create_spec(&$params) { $params['billing_mode']['api.required'] = 1; @@ -97,7 +99,7 @@ function civicrm_api3_payment_processor_type_get($params) { /** * Delete a payment_processor type delete * - * @param id of payment_processor type $id + * @param id of payment_processor type $id * * @return array API Result Array * {@getfields PaymentProcessorType_delete} diff --git a/api/v3/Phone.php b/api/v3/Phone.php index e207f840a8..b09f29292f 100644 --- a/api/v3/Phone.php +++ b/api/v3/Phone.php @@ -56,7 +56,8 @@ function civicrm_api3_phone_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_phone_create_spec(&$params) { $params['contact_id']['api.required'] = 1; @@ -68,7 +69,7 @@ function _civicrm_api3_phone_create_spec(&$params) { /** * Deletes an existing Phone * - * @param array $params + * @param array $params * * @return array Api Result * {@getfields phone_delete} diff --git a/api/v3/Phone/Get.php b/api/v3/Phone/Get.php index d2e3238657..93a7845f85 100644 --- a/api/v3/Phone/Get.php +++ b/api/v3/Phone/Get.php @@ -3,11 +3,12 @@ /** * Retrieve one or more phones * - * @param mixed[] (reference ) input parameters + * @param mixed[] (reference ) input parameters * * {@schema Core/Phone.xml} * {@example PhoneDelete.php 0} - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array details of found phones else error * @access public diff --git a/api/v3/Pledge.php b/api/v3/Pledge.php index 00d21ca87a..2ab36addc5 100644 --- a/api/v3/Pledge.php +++ b/api/v3/Pledge.php @@ -44,7 +44,8 @@ /** * Creates or updates an Activity. See the example for usage * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs for the activity. * {@getfields pledge_create} * @@ -64,7 +65,8 @@ function civicrm_api3_pledge_create($params) { /** * Delete a pledge * - * @param array $params array included 'pledge_id' of pledge to delete + * @param array $params + * Array included 'pledge_id' of pledge to delete. * * @return boolean true if success, else false * @static void @@ -124,7 +126,8 @@ function _civicrm_api3_pledge_create_spec(&$params) { /** * Retrieve a set of pledges, given a set of input params * - * @param array $params input parameters. Use interrogate for possible fields + * @param array $params + * Input parameters. Use interrogate for possible fields. * * @return array array of pledges, if error an array with an error id and error message * {@getfields pledge_get} @@ -158,7 +161,8 @@ function _civicrm_api3_pledge_get_defaults() { * take the input parameter list as specified in the data model and * convert it into the same format that we use in QF and BAO object * - * @param array $values The reformatted properties that we can use internally + * @param array $values + * The reformatted properties that we can use internally. * @param bool $create * * @return array|CRM_Error diff --git a/api/v3/PledgePayment.php b/api/v3/PledgePayment.php index c2c4a2a21b..3bb811d26d 100644 --- a/api/v3/PledgePayment.php +++ b/api/v3/PledgePayment.php @@ -45,7 +45,8 @@ * @todo possibly add ability to add payment if there are less payments than pledge installments * @todo possibly add ability to recalculate dates if the schedule is changed * - * @param array $params input parameters + * @param array $params + * Input parameters. * {@getfields PledgePayment_create} * @example PledgePaymentCreate.php * @@ -83,7 +84,8 @@ function civicrm_api3_pledge_payment_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_pledge_payment_create_spec(&$params) { $params['pledge_id']['api.required'] = 1; @@ -93,7 +95,8 @@ function _civicrm_api3_pledge_payment_create_spec(&$params) { /** * Delete a pledge Payment - Note this deletes the contribution not just the link * - * @param array $params input parameters + * @param array $params + * Input parameters. * {@getfields PledgePayment_delete} * @example PledgePaymentDelete.php * @@ -114,7 +117,8 @@ function civicrm_api3_pledge_payment_delete($params) { /** * Retrieve a set of pledges, given a set of input params * - * @param array $params input parameters + * @param array $params + * Input parameters. * {@getfields PledgePayment_get} * @example PledgePaymentGet.php * * diff --git a/api/v3/PriceField.php b/api/v3/PriceField.php index cb6fc1e77d..0e5800cd28 100644 --- a/api/v3/PriceField.php +++ b/api/v3/PriceField.php @@ -38,7 +38,8 @@ /** * Create or update a price_field * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'price_field' * @example PriceFieldCreate.php Std Create example * @@ -54,7 +55,8 @@ function civicrm_api3_price_field_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_price_field_create_spec(&$params) { $params['label']['api.required'] = TRUE; @@ -63,7 +65,8 @@ function _civicrm_api3_price_field_create_spec(&$params) { /** * Returns array of price_fields 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 + * @param array $params + * Array of one or more valid property_name=>value pairs. If $params is set. * as null, all price_fields will be returned (default limit is 25) * * @return array Array of matching price_fields @@ -80,7 +83,8 @@ function civicrm_api3_price_field_get($params) { * This method is used to delete any existing price_field. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array API result array diff --git a/api/v3/PriceFieldValue.php b/api/v3/PriceFieldValue.php index 76537cd0f1..f3a294ffea 100644 --- a/api/v3/PriceFieldValue.php +++ b/api/v3/PriceFieldValue.php @@ -38,7 +38,8 @@ /** * Create or update a price_field_value * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'price_field_value' * @example PriceFieldValueCreate.php Std Create example * @@ -64,7 +65,8 @@ function civicrm_api3_price_field_value_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_price_field_value_create_spec(&$params) { $params['price_field_id']['api.required'] = TRUE; @@ -76,7 +78,8 @@ function _civicrm_api3_price_field_value_create_spec(&$params) { /** * Returns array of price_field_values 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 + * @param array $params + * Array of one or more valid property_name=>value pairs. If $params is set. * as null, all price_field_values will be returned (default limit is 25) * * @return array Array of matching price_field_values @@ -93,7 +96,8 @@ function civicrm_api3_price_field_value_get($params) { * This method is used to delete any existing price_field_value. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array API result array diff --git a/api/v3/PriceSet.php b/api/v3/PriceSet.php index 5fe4abe603..1c4c785b37 100644 --- a/api/v3/PriceSet.php +++ b/api/v3/PriceSet.php @@ -38,7 +38,8 @@ /** * Create or update a price_set * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'price_set' * @example PriceSetCreate.php Std Create example * @@ -68,7 +69,8 @@ function civicrm_api3_price_set_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_price_set_create_spec(&$params) { $params['title']['api.required'] = TRUE; @@ -77,7 +79,8 @@ function _civicrm_api3_price_set_create_spec(&$params) { /** * Returns array of price_sets 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 + * @param array $params + * Array of one or more valid property_name=>value pairs. If $params is set. * as null, all price_sets will be returned (default limit is 25) * * @return array Array of matching price_sets @@ -104,7 +107,8 @@ function civicrm_api3_price_set_get($params) { * This method is used to delete any existing price_set. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array API result array diff --git a/api/v3/Profile.php b/api/v3/Profile.php index 7b15b6bfdf..8a7084b80a 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -39,7 +39,8 @@ /** * Retrieve Profile field values. * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs to get profile field values * * @throws API_Exception @@ -292,7 +293,8 @@ function civicrm_api3_profile_submit($params) { * so we accept 'email-primary' but pass 'email-Primary' to the BAO * we could make the BAO handle email-primary but this would alter the fieldname seen by hooks * & we would need to consider that change - * @param string $fieldName API field name + * @param string $fieldName + * API field name. * * @return string BAO Field Name */ @@ -330,7 +332,8 @@ function _civicrm_api3_profile_submit_spec(&$params, $apirequest) { * use submit * Update Profile field values. * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs to update profile field values * * @return array Updated Contact/ Activity object|CRM_Error @@ -345,7 +348,8 @@ function civicrm_api3_profile_set($params) { * @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 + * @param array $params + * Associative array of property name/value. * pairs to profile field values * * @throws API_Exception @@ -478,8 +482,9 @@ function _civicrm_api3_profile_getbillingpseudoprofile(&$params) { * & participant has 'participant_status' so we have to standardise from the outside in here - * find the oddities, 'mask them' at this layer, add tests & work to standardise over time so we can remove this handling * - * @param integer $profileID - * @param integer $optionsBehaviour 0 = don't resolve, 1 = resolve non-aggressively, 2 = resolve aggressively - ie include country & state + * @param int $profileID + * @param int $optionsBehaviour + * 0 = don't resolve, 1 = resolve non-aggressively, 2 = resolve aggressively - ie include country & state. * @param $is_flush * * @return diff --git a/api/v3/Relationship.php b/api/v3/Relationship.php index 5f363babd2..97867e07ea 100644 --- a/api/v3/Relationship.php +++ b/api/v3/Relationship.php @@ -40,7 +40,8 @@ /** * Add or update a relationship * - * @param array $params input parameters + * @param array $params + * Input parameters. * * @throws API_Exception * @example RelationshipCreate.php Std Create example @@ -58,7 +59,8 @@ function civicrm_api3_relationship_create($params) { /** * Adjust Metadata for Create action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_relationship_create_spec(&$params) { $params['contact_id_a']['api.required'] = 1; @@ -70,7 +72,7 @@ function _civicrm_api3_relationship_create_spec(&$params) { /** * Delete a relationship * - * @param array $params + * @param array $params * * @return array API Result Array * {@getfields relationship_delete} @@ -99,7 +101,8 @@ function civicrm_api3_relationship_delete($params) { /** * get the relationship * - * @param array $params input parameters. + * @param array $params + * Input parameters. * @todo Result is inconsistent depending on whether contact_id is passed in : * - if you pass in contact_id - it just returns all relationships for 'contact_id' * - if you don't pass in contact_id then it does a filter on the relationship table (DAO based search) @@ -143,8 +146,9 @@ function civicrm_api3_relationship_get($params) { /** * legacy handling for relationship_type parameter * - * @param array $params Associative array of property name/value - * pairs to insert in new contact. + * @param array $params + * Associative array of property name/value. + * pairs to insert in new contact. */ function _civicrm_api3_handle_relationship_type(&$params) { if (empty($params['relationship_type_id']) && !empty($params['relationship_type'])) { diff --git a/api/v3/RelationshipType.php b/api/v3/RelationshipType.php index b6a85ba1db..c1d76e19df 100644 --- a/api/v3/RelationshipType.php +++ b/api/v3/RelationshipType.php @@ -39,7 +39,8 @@ /** * create relationship type * - * @param array $params Associative array of property name/value pairs to insert in new relationship type. + * @param array $params + * Associative array of property name/value pairs to insert in new relationship type. * * @return Newly created Relationship_type object * {@getfields RelationshipType_create} @@ -80,7 +81,8 @@ function civicrm_api3_relationship_type_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_relationship_type_create_spec(&$params) { $params['contact_type_a']['api.required'] = 1; @@ -104,7 +106,7 @@ function civicrm_api3_relationship_type_get($params) { /** * Delete a relationship type delete * - * @param id of relationship type $id + * @param id of relationship type $id * * @return array API Result Array * {@getfields RelationshipType_delete} diff --git a/api/v3/ReportInstance.php b/api/v3/ReportInstance.php index feb4c0693a..845aa640ec 100644 --- a/api/v3/ReportInstance.php +++ b/api/v3/ReportInstance.php @@ -3,7 +3,8 @@ /** * Retrieve a report instance * - * @param array $params input parameters + * @param array $params + * Input parameters. * * @return array details of found instances * @access public @@ -28,7 +29,8 @@ function civicrm_api3_report_instance_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_report_instance_create_spec(&$params) { $params['report_id']['api.required'] = 1; @@ -38,7 +40,7 @@ function _civicrm_api3_report_instance_create_spec(&$params) { /** * Deletes an existing ReportInstance * - * @param array $params + * @param array $params * * @return array Api result * @access public diff --git a/api/v3/ReportTemplate.php b/api/v3/ReportTemplate.php index 2d57c6cdea..a90112a972 100644 --- a/api/v3/ReportTemplate.php +++ b/api/v3/ReportTemplate.php @@ -51,7 +51,8 @@ function civicrm_api3_report_template_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_report_template_create_spec(&$params) { require_once 'api/v3/OptionValue.php'; @@ -67,7 +68,7 @@ function _civicrm_api3_report_template_create_spec(&$params) { /** * Deletes an existing ReportTemplate * - * @param array $params + * @param array $params * * {@example ReportTemplateDelete.php 0} * @@ -83,7 +84,8 @@ function civicrm_api3_report_template_delete($params) { /** * Retrieve rows from a report template * - * @param array $params input parameters + * @param array $params + * Input parameters. * * @return array details of found instances * @access public @@ -159,7 +161,8 @@ function civicrm_api3_report_template_getstatistics($params) { /** * Retrieve rows from a report template * - * @param array $params input parameters + * @param array $params + * Input parameters. * * @return array details of found instances * @access public diff --git a/api/v3/Setting.php b/api/v3/Setting.php index cf16d45648..aa62527a07 100644 --- a/api/v3/Setting.php +++ b/api/v3/Setting.php @@ -110,7 +110,8 @@ function civicrm_api3_setting_getdefaults(&$params){ /** * Metadata for setting create function * - * @param array $params parameters as passed to the API + * @param array $params + * Parameters as passed to the API. */ function _civicrm_api3_setting_getdefaults_spec(&$params) { $params['domain_id'] = array( @@ -195,7 +196,8 @@ function _civicrm_api3_setting_fill_spec(&$params) { /** * Create or update a setting * - * @param array $params Associative array of setting + * @param array $params + * Associative array of setting. * name/value pairs + other vars as applicable - see getfields for more * @example SettingCreate.php Std Create example * @@ -212,7 +214,8 @@ function civicrm_api3_setting_create($params) { /** * Metadata for setting create function * - * @param array $params parameters as passed to the API + * @param array $params + * Parameters as passed to the API. */ function _civicrm_api3_setting_create_spec(&$params) { $params['domain_id'] = array( @@ -231,7 +234,8 @@ function _civicrm_api3_setting_create_spec(&$params) { /** * Returns array of settings matching input parameters * - * @param array $params Array of one or more valid + * @param array $params + * Array of one or more valid. * property_name=>value pairs. * * @return array Array of matching settings @@ -246,7 +250,8 @@ function civicrm_api3_setting_get($params) { /** * Metadata for setting create function * - * @param array $params parameters as passed to the API + * @param array $params + * Parameters as passed to the API. */ function _civicrm_api3_setting_get_spec(&$params) { $params['domain_id'] = array( @@ -264,7 +269,8 @@ function _civicrm_api3_setting_get_spec(&$params) { * Returns value for specific parameter. Function requires more fields than 'get' but is intended for * runtime usage & should be quicker * - * @param array $params (reference) Array of one or more valid + * @param array $params + * (reference) Array of one or more valid. * property_name=>value pairs. * * @return array Array of matching settings @@ -289,7 +295,8 @@ function civicrm_api3_setting_getvalue($params) { /** * Metadata for setting create function * - * @param array $params parameters as passed to the API + * @param array $params + * Parameters as passed to the API. */ function _civicrm_api3_setting_getvalue_spec(&$params) { diff --git a/api/v3/Survey.php b/api/v3/Survey.php index bc12a4502f..33a8cff1fa 100644 --- a/api/v3/Survey.php +++ b/api/v3/Survey.php @@ -38,7 +38,8 @@ /** * Create or update a survey * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'survey' * @example SurveyCreate.php Std Create example * @@ -54,7 +55,8 @@ function civicrm_api3_survey_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_survey_create_spec(&$params) { $params['title']['api.required'] = 1; @@ -63,7 +65,8 @@ function _civicrm_api3_survey_create_spec(&$params) { /** * Returns array of surveys matching a set of one or more group properties * - * @param array $params Array of one or more valid + * @param array $params + * Array of one or more valid. * property_name=>value pairs. If $params is set * as null, all surveys will be returned * @@ -81,7 +84,8 @@ function civicrm_api3_survey_get($params) { * This method is used to delete any existing survey. id of the group * to be deleted is required field in $params array * - * @param array $params array containing id of the group + * @param array $params + * Array containing id of the group. * to be deleted * * @return array api result array diff --git a/api/v3/SurveyRespondant.php b/api/v3/SurveyRespondant.php index 77b2f750ad..ececf93cfb 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 * - * @param array $params (reference ) input parameters + * @param array $params + * (reference ) input parameters. * * @return array (reference ) contribution_id of created or updated record * @static void diff --git a/api/v3/System.php b/api/v3/System.php index 6e93f47620..b456f94b78 100644 --- a/api/v3/System.php +++ b/api/v3/System.php @@ -40,7 +40,8 @@ /** * Flush all system caches * - * @param array $params input parameters + * @param array $params + * Input parameters. * - triggers: bool, whether to drop/create SQL triggers; default: FALSE * - session: bool, whether to reset the CiviCRM session data; defaul: FALSE * @@ -62,7 +63,8 @@ function civicrm_api3_system_flush($params) { * Adjust Metadata for Flush action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_system_flush_spec(&$params){ $params['triggers'] = array('title' => 'rebuild triggers (boolean)'); @@ -73,7 +75,8 @@ function _civicrm_api3_system_flush_spec(&$params){ * System.Check API specification (optional) * This is used for documentation and validation. * - * @param array $spec description of fields supported by this API call + * @param array $spec + * Description of fields supported by this API call. * @return void * @see http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards */ diff --git a/api/v3/Tag.php b/api/v3/Tag.php index 20183361fc..5af6853eb9 100644 --- a/api/v3/Tag.php +++ b/api/v3/Tag.php @@ -67,7 +67,7 @@ function _civicrm_api3_tag_create_spec(&$params) { /** * Deletes an existing Tag * - * @param array $params + * @param array $params * * @example TagDelete.ph * @@ -87,7 +87,8 @@ function civicrm_api3_tag_delete($params) { * * @example TagGet.php * - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array details of found tags else error * {@getfields tag_get} diff --git a/api/v3/UFField.php b/api/v3/UFField.php index cfb086fbe6..b18ad19f95 100644 --- a/api/v3/UFField.php +++ b/api/v3/UFField.php @@ -40,7 +40,8 @@ /** * Defines 'uf field' within a group. * - * @param $params array Associative array of property name/value pairs to create new uf field. + * @param $params + * Array Associative array of property name/value pairs to create new uf field. * * @throws API_Exception * @@ -129,7 +130,8 @@ function _civicrm_api3_uf_field_create_spec(&$params) { /** * Returns array of uf groups (profiles) matching a set of one or more group properties * - * @param array $params (reference) Array of one or more valid + * @param array $params + * (reference) Array of one or more valid. * property_name=>value pairs. If $params is set * as null, all surveys will be returned * diff --git a/api/v3/UFGroup.php b/api/v3/UFGroup.php index 18f5ac1565..114ad3b4eb 100644 --- a/api/v3/UFGroup.php +++ b/api/v3/UFGroup.php @@ -51,7 +51,8 @@ function _civicrm_api3_uf_group_create_spec(&$params) { /** * Use this API to create a new group. See the CRM Data Model for uf_group property definitions * - * @param $params array Associative array of property name/value pairs to insert in group. + * @param $params + * Array Associative array of property name/value pairs to insert in group. * * @return array API result array * {@getfields UFGroup_create} @@ -65,7 +66,8 @@ function civicrm_api3_uf_group_create($params) { /** * Returns array of uf groups (profiles) matching a set of one or more group properties * - * @param array $params (reference) Array of one or more valid + * @param array $params + * (reference) Array of one or more valid. * property_name=>value pairs. If $params is set * as null, all surveys will be returned * diff --git a/api/v3/UFJoin.php b/api/v3/UFJoin.php index 85d99f1b54..df86d5744b 100644 --- a/api/v3/UFJoin.php +++ b/api/v3/UFJoin.php @@ -40,7 +40,8 @@ /** * takes an associative array and creates a uf join in the database * - * @param array $params assoc array of name/value pairs + * @param array $params + * Assoc array of name/value pairs. * * @return array CRM_Core_DAO_UFJoin Array * @access public @@ -58,7 +59,8 @@ function civicrm_api3_uf_join_create($params) { /** * Adjust Metadata for Create action * - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. * @todo - suspect module, weight don't need to be required - need to test */ function _civicrm_api3_uf_join_create_spec(&$params) { @@ -70,7 +72,8 @@ function _civicrm_api3_uf_join_create_spec(&$params) { /** * Get CiviCRM UF_Joins (ie joins between CMS user records & CiviCRM user record * - * @param array $params (reference) an assoc array of name/value pairs + * @param array $params + * (reference) an assoc array of name/value pairs. * * @return array $result CiviCRM Result Array or null * @todo Delete function missing diff --git a/api/v3/UFMatch.php b/api/v3/UFMatch.php index bf49340e5b..88d7b7fc0e 100644 --- a/api/v3/UFMatch.php +++ b/api/v3/UFMatch.php @@ -55,7 +55,8 @@ function civicrm_api3_uf_match_get($params) { /** * Create or update a UF Match record * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'survey' * @example UFMatch.php Std Create example * @@ -71,7 +72,8 @@ function civicrm_api3_uf_match_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_uf_match_create_spec(&$params) { $params['contact_id']['api.required'] = 1; @@ -82,7 +84,8 @@ function _civicrm_api3_uf_match_create_spec(&$params) { /** * Create or update a survey * - * @param array $params Associative array of property + * @param array $params + * Associative array of property. * name/value pairs to insert in new 'survey' * @example UFMatch.php Std Create example * diff --git a/api/v3/Website.php b/api/v3/Website.php index 257ee34096..9b77894231 100644 --- a/api/v3/Website.php +++ b/api/v3/Website.php @@ -63,7 +63,8 @@ function civicrm_api3_website_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_website_create_spec(&$params) { $params['contact_id']['api.required'] = 1; @@ -72,7 +73,7 @@ function _civicrm_api3_website_create_spec(&$params) { /** * Deletes an existing Website * - * @param array $params + * @param array $params * {@getfields website_delete} * @example WebsiteDelete.php Std Delete Example * @@ -100,11 +101,12 @@ function civicrm_api3_website_delete($params) { /** * Retrieve one or more websites * - * @param mixed[] (reference ) input parameters + * @param mixed[] (reference ) input parameters * {@getfields website_get} * {@example WebsiteGet.php 0} * @example WebsiteGet.php - * @param array $params an associative array of name/value pairs. + * @param array $params + * An associative array of name/value pairs. * * @return array details of found websites * diff --git a/api/v3/WordReplacement.php b/api/v3/WordReplacement.php index 5581295f48..4a906a1b45 100644 --- a/api/v3/WordReplacement.php +++ b/api/v3/WordReplacement.php @@ -68,7 +68,8 @@ function civicrm_api3_word_replacement_create($params) { * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation - * @param array $params array or parameters determined by getfields + * @param array $params + * Array or parameters determined by getfields. */ function _civicrm_api3_word_replacement_create_spec(&$params) { unset($params['version']); @@ -78,7 +79,8 @@ function _civicrm_api3_word_replacement_create_spec(&$params) { * delete an existing word_replacement * * - * @param array $params array containing id of the word_replacement + * @param array $params + * Array containing id of the word_replacement. * to be deleted * * @return array api result array diff --git a/api/v3/utils.php b/api/v3/utils.php index 681671ed41..d60e34a7d4 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -48,9 +48,12 @@ function _civicrm_api3_initialize() { /** * Wrapper Function for civicrm_verify_mandatory to make it simple to pass either / or fields for checking * - * @param array $params array of fields to check - * @param array $daoName string DAO to check for required fields (create functions only) - * @param array $keyoptions list of required fields options. One of the options is required + * @param array $params + * Array of fields to check. + * @param array $daoName + * String DAO to check for required fields (create functions only). + * @param array $keyoptions + * List of required fields options. One of the options is required. * * @return null or throws error if there the required fields not present * @ @@ -67,9 +70,12 @@ function civicrm_api3_verify_one_mandatory($params, $daoName = NULL, $keyoptions /** * check mandatory fields are included * - * @param array $params array of fields to check - * @param array $daoName string DAO to check for required fields (create functions only) - * @param array $keys list of required fields. A value can be an array denoting that either this or that is required. + * @param array $params + * Array of fields to check. + * @param array $daoName + * String DAO to check for required fields (create functions only). + * @param array $keys + * List of required fields. A value can be an array denoting that either this or that is required. * @param bool $verifyDAO * * @throws API_Exception @@ -151,11 +157,16 @@ function civicrm_api3_create_error($msg, $data = array()) { * Format array in result output styple * * @param array|int $values values generated by API operation (the result) - * @param array $params parameters passed into API call - * @param string $entity the entity being acted on - * @param string $action the action passed to the API - * @param object $dao DAO object to be freed here - * @param array $extraReturnValues additional values to be added to top level of result array( + * @param array $params + * Parameters passed into API call. + * @param string $entity + * The entity being acted on. + * @param string $action + * The action passed to the API. + * @param object $dao + * DAO object to be freed here. + * @param array $extraReturnValues + * Additional values to be added to top level of result array(. * - this param is currently used for legacy behaviour support * * @return array $result @@ -271,7 +282,8 @@ function _civicrm_api3_load_DAO($entity) { /** * return the DAO of the function or Entity - * @param String $name either a function of the api (civicrm_{entity}_create or the entity name + * @param string $name + * Either a function of the api (civicrm_{entity}_create or the entity name. * return the DAO name to manipulate this function * eg. "civicrm_api3_contact_create" or "Contact" will return "CRM_Contact_BAO_Contact" * @return mixed|string @@ -338,7 +350,8 @@ function _civicrm_api3_get_DAO($name) { /** * return the DAO of the function or Entity - * @param String $name is either a function of the api (civicrm_{entity}_create or the entity name + * @param string $name + * Is either a function of the api (civicrm_{entity}_create or the entity name. * return the DAO name to manipulate this function * eg. "civicrm_contact_create" or "Contact" will return "CRM_Contact_BAO_Contact" * @return mixed @@ -427,9 +440,12 @@ function _civicrm_api3_store_values(&$fields, &$params, &$values) { * * Ideally this would be merged with _civicrm_get_query_object but we need to resolve differences in what the * 2 variants call * @param $entity - * @param array $params as passed into api get or getcount function - * @param array $additional_options array of options (so we can modify the filter) - * @param bool $getCount are we just after the count + * @param array $params + * As passed into api get or getcount function. + * @param array $additional_options + * Array of options (so we can modify the filter). + * @param bool $getCount + * Are we just after the count. * * @return */ @@ -648,9 +664,12 @@ function _civicrm_api3_dao_set_filter(&$dao, $params, $unique = TRUE, $entity) { /** * Apply filters (e.g. high, low) to DAO object (prior to find) - * @param string $filterField field name of filter - * @param string $filterValue field value of filter - * @param object $dao DAO object + * @param string $filterField + * Field name of filter. + * @param string $filterValue + * Field value of filter. + * @param object $dao + * DAO object. */ function _civicrm_api3_apply_filters_to_dao($filterField, $filterValue, &$dao) { if (strstr($filterField, 'high')) { @@ -675,8 +694,10 @@ function _civicrm_api3_apply_filters_to_dao($filterField, $filterValue, &$dao) { * Get sort, limit etc options from the params - supporting old & new formats. * get returnproperties for legacy * - * @param array $params params array as passed into civicrm_api - * @param bool $queryObject - is this supporting a queryobject api (e.g contact) - if so we support more options + * @param array $params + * Params array as passed into civicrm_api. + * @param bool $queryObject + * Is this supporting a queryobject api (e.g contact) - if so we support more options. * for legacy report & return a unique fields array * * @param string $entity @@ -777,8 +798,10 @@ function _civicrm_api3_get_options_from_params(&$params, $queryObject = FALSE, $ /** * Apply options (e.g. sort, limit, order by) to DAO object (prior to find) * - * @param array $params params array as passed into civicrm_api - * @param object $dao DAO object + * @param array $params + * Params array as passed into civicrm_api. + * @param object $dao + * DAO object. * @param $entity */ function _civicrm_api3_apply_options_to_dao(&$params, &$dao, $entity) { @@ -833,7 +856,8 @@ function _civicrm_api3_get_unique_name_array(&$bao) { /** * Converts an DAO object to an array * - * @param CRM_Core_DAO $dao object to convert + * @param CRM_Core_DAO $dao + * Object to convert. * @param array $params * @param bool $uniqueFields * @param string $entity @@ -889,7 +913,8 @@ function _civicrm_api3_dao_to_array($dao, $params = NULL, $uniqueFields = TRUE, * @todo filter so only required fields are queried * * @param array $params - * @param string $entity - entity name in CamelCase + * @param string $entity + * Entity name in CamelCase. * * @return bool */ @@ -907,8 +932,10 @@ function _civicrm_api3_custom_fields_are_required($entity, $params) { /** * Converts an object to an array * - * @param object $dao (reference) object to convert - * @param array $values (reference) array + * @param object $dao + * (reference) object to convert. + * @param array $values + * (reference) array. * @param array|bool $uniqueFields * * @return array @@ -936,8 +963,10 @@ function _civicrm_api3_object_to_array_unique_fields(&$dao, &$values) { * * @param array $params * @param array $values - * @param string $extends entity that this custom field extends (e.g. contribution, event, contact) - * @param string $entityId ID of entity per $extends + * @param string $extends + * Entity that this custom field extends (e.g. contribution, event, contact). + * @param string $entityId + * ID of entity per $extends. */ function _civicrm_api3_custom_format_params($params, &$values, $extends, $entityId = NULL) { $values['custom'] = array(); @@ -1089,7 +1118,8 @@ function formatCheckBoxField(&$checkboxFieldValue, $customFieldLabel, $entity) { * api level. Hence the intention is to remove this function * & the associated param from viery_mandatory * - * @param array $params Associative array of property name/value + * @param array $params + * Associative array of property name/value. * pairs to insert in new history. * @param string $daoName * @param bool $return @@ -1148,9 +1178,12 @@ function _civicrm_api3_check_required_fields($params, $daoName, $return = FALSE) /** * Function to do a 'standard' api get - when the api is only doing a $bao->find then use this * - * @param string $bao_name name of BAO - * @param array $params params from api - * @param bool $returnAsSuccess return in api success format + * @param string $bao_name + * Name of BAO. + * @param array $params + * Params from api. + * @param bool $returnAsSuccess + * Return in api success format. * @param string $entity * * @return array @@ -1169,9 +1202,12 @@ function _civicrm_api3_basic_get($bao_name, &$params, $returnAsSuccess = TRUE, $ /** * Function to do a 'standard' api create - when the api is only doing a $bao::create then use this * - * @param string $bao_name Name of BAO Class - * @param array $params parameters passed into the api call - * @param string $entity Entity - pass in if entity is non-standard & required $ids array + * @param string $bao_name + * Name of BAO Class. + * @param array $params + * Parameters passed into the api call. + * @param string $entity + * Entity - pass in if entity is non-standard & required $ids array. * * @throws API_Exception * @return array @@ -1295,12 +1331,17 @@ function _civicrm_api3_basic_delete($bao_name, &$params) { * Get custom data for the given entity & Add it to the returnArray as 'custom_123' = 'custom string' AND 'custom_123_1' = 'custom string' * Where 123 is field value & 1 is the id within the custom group data table (value ID) * - * @param array $returnArray - array to append custom data too - generally $result[4] where 4 is the entity id. - * @param string $entity e.g membership, event + * @param array $returnArray + * Array to append custom data too - generally $result[4] where 4 is the entity id. + * @param string $entity + * E.g membership, event. * @param int $entity_id - * @param int $groupID - per CRM_Core_BAO_CustomGroup::getTree - * @param int $subType e.g. membership_type_id where custom data doesn't apply to all membership types - * @param string $subName - Subtype of entity + * @param int $groupID + * Per CRM_Core_BAO_CustomGroup::getTree. + * @param int $subType + * E.g. membership_type_id where custom data doesn't apply to all membership types. + * @param string $subName + * Subtype of entity. */ function _civicrm_api3_custom_data_get(&$returnArray, $entity, $entity_id, $groupID = NULL, $subType = NULL, $subName = NULL) { $groupTree = CRM_Core_BAO_CustomGroup::getTree($entity, @@ -1343,9 +1384,12 @@ function _civicrm_api3_custom_data_get(&$returnArray, $entity, $entity_id, $grou * As of writing only date was implemented. * @param string $entity * @param string $action - * @param array $params - - * @param array $fields response from getfields all variables are the same as per civicrm_api - * @param bool $errorMode errorMode do intensive post fail checks? + * @param array $params + * -. + * @param array $fields + * Response from getfields all variables are the same as per civicrm_api. + * @param bool $errorMode + * ErrorMode do intensive post fail checks?. * @throws Exception */ function _civicrm_api3_validate_fields($entity, $action, &$params, $fields, $errorMode = False) { @@ -1406,9 +1450,12 @@ function _civicrm_api3_validate_fields($entity, $action, &$params, $fields, $err * It also checks against the RULE:date function. This is a centralisation of code that was scattered and * may not be the best thing to do. There is no code level documentation on the existing functions to work off * - * @param array $params params from civicrm_api - * @param string $fieldName uniquename of field being checked - * @param array $fieldInfo array of fields from getfields function + * @param array $params + * Params from civicrm_api. + * @param string $fieldName + * Uniquename of field being checked. + * @param array $fieldInfo + * Array of fields from getfields function. * @throws Exception */ function _civicrm_api3_validate_date(&$params, &$fieldName, &$fieldInfo) { @@ -1449,9 +1496,12 @@ function _civicrm_api3_getValidDate($dateValue, $fieldName, $fieldType) { /** * Validate foreign constraint fields being passed into API. * - * @param array $params params from civicrm_api - * @param string $fieldName uniquename of field being checked - * @param array $fieldInfo array of fields from getfields function + * @param array $params + * Params from civicrm_api. + * @param string $fieldName + * Uniquename of field being checked. + * @param array $fieldInfo + * Array of fields from getfields function. * @throws Exception */ function _civicrm_api3_validate_constraint(&$params, &$fieldName, &$fieldInfo) { @@ -1467,9 +1517,12 @@ function _civicrm_api3_validate_constraint(&$params, &$fieldName, &$fieldInfo) { /** * Validate foreign constraint fields being passed into API. * - * @param array $params params from civicrm_api - * @param string $fieldName uniquename of field being checked - * @param $fieldInfo array of fields from getfields function + * @param array $params + * Params from civicrm_api. + * @param string $fieldName + * Uniquename of field being checked. + * @param $fieldInfo + * Array of fields from getfields function. * @throws Exception */ function _civicrm_api3_validate_uniquekey(&$params, &$fieldName, &$fieldInfo) { @@ -1493,8 +1546,10 @@ function _civicrm_api3_validate_uniquekey(&$params, &$fieldName, &$fieldInfo) { * Note: This will verify that 'values' is present, but it does not directly verify * any other parameters. * - * @param string $entity entity name - * @param array $params params from civicrm_api, including: + * @param string $entity + * Entity name. + * @param array $params + * Params from civicrm_api, including:. * - 'values': an array of records to save * - all other items: keys which identify new/pre-existing records * @return array|int @@ -1577,8 +1632,10 @@ function _civicrm_api3_generic_replace_base_params($params) { /** * returns fields allowable by api * - * @param $entity string Entity to query - * @param bool $unique index by unique fields? + * @param $entity + * String Entity to query. + * @param bool $unique + * Index by unique fields?. * @param array $params * * @return array @@ -1725,9 +1782,12 @@ function _civicrm_api3_swap_out_aliases(&$apiRequest, $fields) { * Validate integer fields being passed into API. * It currently converts the incoming value 'user_contact_id' into the id of the currently logged in user * - * @param array $params params from civicrm_api - * @param string $fieldName uniquename of field being checked - * @param array $fieldInfo array of fields from getfields function + * @param array $params + * Params from civicrm_api. + * @param string $fieldName + * Uniquename of field being checked. + * @param array $fieldInfo + * Array of fields from getfields function. * @param string $entity * @throws API_Exception */ @@ -1766,7 +1826,8 @@ function _civicrm_api3_validate_integer(&$params, &$fieldName, &$fieldInfo, $ent /** * Determine a contact ID using a string expression * - * @param string $contactIdExpr e.g. "user_contact_id" or "@user:username" + * @param string $contactIdExpr + * E.g. "user_contact_id" or "@user:username". * @return int|NULL|'unknown-user' */ function _civicrm_api3_resolve_contactID($contactIdExpr) { @@ -1810,9 +1871,12 @@ function _civicrm_api3_validate_html(&$params, &$fieldName, $fieldInfo) { /** * Validate string fields being passed into API. - * @param array $params params from civicrm_api - * @param string $fieldName uniquename of field being checked - * @param array $fieldInfo array of fields from getfields function + * @param array $params + * Params from civicrm_api. + * @param string $fieldName + * Uniquename of field being checked. + * @param array $fieldInfo + * Array of fields from getfields function. * @param string $entity * @throws API_Exception * @throws Exception @@ -1926,8 +1990,10 @@ function _civicrm_api3_api_match_pseudoconstant_value(&$value, $options, $fieldN /** * Returns the canonical name of a field * - * @param $entity : api entity name (string should already be standardized - no camelCase) - * @param $fieldName : any variation of a field's name (name, unique_name, api.alias) + * @param $entity + * : api entity name (string should already be standardized - no camelCase). + * @param $fieldName + * : any variation of a field's name (name, unique_name, api.alias). * * @return bool|string (string|bool) fieldName or FALSE if the field does not exist */ -- 2.25.1