/**
* Perform action.
*
- * @param $action
- * @param $params
+ * @param string $action
+ * @param array $params
*
* @return bool
*/
/**
* Call via rest.
*
- * @param $entity
- * @param $action
+ * @param string $entity
+ * @param string $action
* @param array $params
*
* @return \stdClass
/**
* Call api function.
*
- * @param $entity
+ * @param string $entity
* @param string $action
* @param array $params
*
/**
* Get attribute.
*
- * @param $name
- * @param null $value
+ * @param string $name
+ * @param mixed $value
*
* @return $this
*/
* When creating a new case, run the xmlProcessor to get all necessary params/configuration
* for the new case, as cases use an xml file to store their configuration.
*
- * @param $params
- * @param $caseBAO
+ * @param array $params
+ * @param CRM_Case_DAO_Case $caseBAO
*
* @throws \Exception
*/
/**
* Needed due to the above override
- * @param $params
- * @param $apiRequest
+ * @param array $params
+ * @param array $apiRequest
*/
function _civicrm_api3_case_getlist_spec(&$params, $apiRequest) {
require_once 'api/v3/Generic/Getlist.php';
/**
* Support for supported output variables.
*
- * @param $contribution
+ * @param array $contribution
*/
function _civicrm_api3_contribution_add_supported_fields(&$contribution) {
// These are output fields that are supported in our test contract.
* As of v4.4 we support multiple soft credit, so now contribution returns array with 'soft_credit' as key
* but we still return first soft credit as a part of contribution array
*
- * @param $contribution
+ * @param array $contribution
*/
function _civicrm_api3_format_soft_credit(&$contribution) {
if (!empty($contribution['soft_credit'])) {
/**
* Spec function for getfields
- * @param $fields
+ * @param array $fields
*/
function _civicrm_api3_extension_install_spec(&$fields) {
$fields['keys'] = [
/**
* Spec function for getfields
- * @param $fields
+ * @param array $fields
*/
function _civicrm_api3_extension_enable_spec(&$fields) {
_civicrm_api3_extension_install_spec($fields);
/**
* Spec function for getfields
- * @param $fields
+ * @param array $fields
*/
function _civicrm_api3_extension_disable_spec(&$fields) {
_civicrm_api3_extension_install_spec($fields);
/**
* Spec function for getfields
- * @param $fields
+ * @param array $fields
*/
function _civicrm_api3_extension_uninstall_spec(&$fields) {
_civicrm_api3_extension_install_spec($fields);
/**
* Spec function for getfields
- * @param $fields
+ * @param array $fields
*/
function _civicrm_api3_extension_download_spec(&$fields) {
$fields['key'] = [
/**
* Spec function for getfields
- * @param $fields
+ * @param array $fields
*/
function _civicrm_api3_extension_refresh_spec(&$fields) {
$fields['local'] = [
/**
* Provide metadata for this generic action
*
- * @param $params
- * @param $apiRequest
+ * @param array $params
+ * @param array $apiRequest
*/
function _civicrm_api3_generic_getoptions_spec(&$params, $apiRequest) {
$params += [
/**
* Common postprocess for getlist output
*
- * @param $result
- * @param $request
- * @param $values
+ * @param array $result
+ * @param array $request
+ * @param array $values
*/
function _civicrm_api3_generic_getlist_postprocess($result, $request, &$values) {
$chains = [];
/**
* Metadata for batch merge function.
*
- * @param $params
+ * @param array $params
*/
function _civicrm_api3_job_process_batch_merge_spec(&$params) {
$params['rule_group_id'] = [
* Helper function for mailing contact queries.
*
* @param int $contactID
- * @param $offset
- * @param $limit
- * @param $selectFields
- * @param $fromClause
- * @param $whereClause
- * @param $sort
- * @param $getCount
+ * @param int $offset
+ * @param int $limit
+ * @param array|null $selectFields
+ * @param string|null $fromClause
+ * @param string|null $whereClause
+ * @param string|null $sort
+ * @param bool $getCount
*
* @return array
*/
* Get delivered mailing contacts.
*
* @param int $contactID
- * @param $offset
- * @param $limit
- * @param $sort
- * @param $getCount
+ * @param int $offset
+ * @param int $limit
+ * @param string|null $sort
+ * @param bool $getCount
*
* @return array
*/
* Get bounced mailing contact records.
*
* @param int $contactID
- * @param $offset
- * @param $limit
- * @param $sort
- * @param $getCount
+ * @param int $offset
+ * @param int $limit
+ * @param string|null $sort
+ * @param bool $getCount
*
* @return array
*/
* @param array $params
* Parameters passed into get function.
* @param int $membershipTypeId
- * @param $activeOnly
+ * @param bool $activeOnly
*
* @return array
* result for calling function
*
* @param array $params
* Parameters passed into get function.
- * @param $membershipValues
+ * @param array $membershipValues
* @param int $contactID
*
* @return array
/**
* Create or updates an Pledge.
*
- * @param $params
+ * @param array $params
*
* @return array
* Array containing 'is_error' to denote success or failure and details of the created pledge
* @param int $profileID
* @param int $optionsBehaviour
* 0 = don't resolve, 1 = resolve non-aggressively, 2 = resolve aggressively - ie include country & state.
- * @param $is_flush
+ * @param bool $is_flush
*
* @return array|void
*/
* Here we map the profile fields as stored in the uf_field table to their 'real entity'
* we also return the profile fieldname
*
- * @param $field
+ * @param array $field
*
* @return array
*/
*
* e.g getfields response incl 'membership_type_id' - with api.aliases = 'membership_type'
* returned array will include both as keys (with the same values)
- * @param $entity
+ * @param string $entity
*
* @return array
*/
/**
* Load the DAO of the entity.
*
- * @param $entity
+ * @param string $entity
*
* @return bool
*/
/**
* Recursive function to explode value-separated strings into arrays.
*
- * @param $values
+ * @param array $values
*/
function _civicrm_api3_separate_values(&$values) {
$sp = CRM_Core_DAO::VALUE_SEPARATOR;
* 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 string $entity
* @param array $params
* As passed into api get or getcount function.
* @param array $additional_options
* Params array as passed into civicrm_api.
* @param object $dao
* DAO object.
- * @param $entity
+ * @param string $entity
*
* @throws \API_Exception
* @throws \CRM_Core_Exception
/**
* Wrapper for _civicrm_object_to_array when api supports unique fields.
*
- * @param $dao
- * @param $values
+ * @param CRM_Core_DAO $dao
+ * @param array $values
*
* @return array
*/
* Format parameters for create action.
*
* @param array $params
- * @param $entity
+ * @param string $entity
*/
function _civicrm_api3_format_params_for_create(&$params, $entity) {
$nonGenericEntities = array_merge(['Contact'], CRM_Contact_BAO_ContactType::basicTypes(TRUE));
*
* @param array $returnArray
* Array to append custom data too - generally $result[4] where 4 is the entity id.
- * @param $checkPermission
+ * @param bool $checkPermission
* @param string $entity
* E.g membership, event.
* @param int $entity_id
/**
* Used by the Validate API.
- * @param $fieldName
+ * @param string $fieldName
* @param array $fieldInfo
* @param string $entity
* @param array $params
*
* @param string $dateValue
* @param string $fieldName
- * @param $fieldType
+ * @param int $fieldType
*
* @throws Exception
* @return mixed
/**
* Returns fields allowable by api.
*
- * @param $entity
+ * @param string $entity
* String Entity to query.
* @param bool $unique
* Index by unique fields?.
*
* This is the same as the BAO function but fields are prefixed with 'custom_' to represent api params.
*
- * @param $entity
+ * @param string $entity
* @param array $params
*
* @return array
*
* Function also swaps unique fields for non-unique fields & vice versa.
*
- * @param $apiRequest
- * @param $fields
+ * @param array $apiRequest
+ * @param array $fields
*/
function _civicrm_api3_swap_out_aliases(&$apiRequest, $fields) {
foreach ($fields as $field => $values) {
/**
* Helper function to determine country_id given the myriad of values for country_id or country that are supported
- * @param $params
+ * @param array $params
*
* @return int|null
*/
/**
* Returns the canonical name of a field.
*
- * @param $entity
+ * @param string $entity
* api entity name (string should already be standardized - no camelCase).
- * @param $fieldName
+ * @param string $fieldName
* any variation of a field's name (name, unique_name, api.alias).
*
* @param string $action
* _civicrm_api3_basic_get but does not use DAO/BAO. This is useful for
* small/mid-size data loaded from external JSON or XML documents.
*
- * @param $entity
+ * @param string $entity
* @param array $params
* API parameters.
* @param array $records