Commit 16b10e64 authored by colemanw's avatar colemanw

INFRA-132 - Docblock formatting fixes

parent c6e262c5
......@@ -330,7 +330,7 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
*
* @return string|null
* WHERE-style clause to filter results,
* or null if $table or $id is null
* or null if $table or $id is null
* @static
*/
public static function getClause($table, $id, &$tables) {
......
......@@ -78,7 +78,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
* @param array $defaults
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Activity_DAO_Activity object
* @return CRM_Activity_DAO_Activity
*/
public static function retrieve(&$params, &$defaults) {
$activity = new CRM_Activity_DAO_Activity();
......@@ -907,7 +907,7 @@ ORDER BY fixed_sort_order
* component related activities w/ core activity retrieve process.
*
* @return array
* of component id and name.
* Array of component id and name.
* @static
**/
public static function activityComponents() {
......
......@@ -51,7 +51,8 @@ class CRM_Badge_BAO_Layout extends CRM_Core_DAO_PrintLabel {
* @param array $defaults
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_DAO_PrintLabel object on success, null otherwise
* @return CRM_Core_DAO_PrintLabel|null
* object on success, null otherwise
* @static
*/
public static function retrieve(&$params, &$defaults) {
......
......@@ -44,7 +44,7 @@ class CRM_Campaign_BAO_Campaign extends CRM_Campaign_DAO_Campaign {
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Campaign_DAO_Campaign object
* @return CRM_Campaign_DAO_Campaign
* @static
*/
public static function create(&$params) {
......
......@@ -79,7 +79,7 @@ class CRM_Campaign_BAO_Survey extends CRM_Campaign_DAO_Survey {
*
* @param array $params
*
* @return CRM_Survey_DAO_Survey object
* @return CRM_Survey_DAO_Survey
* @static
*/
public static function create(&$params) {
......
......@@ -73,7 +73,7 @@ class CRM_Case_BAO_Case extends CRM_Case_DAO_Case {
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Case_BAO_Case object
* @return CRM_Case_BAO_Case
* @static
*/
public static function add(&$params) {
......@@ -115,7 +115,7 @@ class CRM_Case_BAO_Case extends CRM_Case_DAO_Case {
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Case_BAO_Case object
* @return CRM_Case_BAO_Case
* @static
*/
public static function &create(&$params) {
......@@ -259,7 +259,7 @@ class CRM_Case_BAO_Case extends CRM_Case_DAO_Case {
* @param array $ids
* (reference) the array that holds all the db ids.
*
* @return CRM_Case_BAO_Case object
* @return CRM_Case_BAO_Case
* @static
*/
public static function retrieve(&$params, &$defaults, &$ids) {
......@@ -1037,7 +1037,7 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
* @param null $type
*
* @return array
* of case activities
* Array of case activities
*
* @static
*/
......
......@@ -59,7 +59,7 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType {
*
* @throws CRM_Core_Exception
*
* @return CRM_Case_BAO_CaseType object
* @return CRM_Case_BAO_CaseType
* @static
*/
public static function add(&$params) {
......@@ -274,7 +274,7 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType {
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Case_BAO_CaseType object
* @return CRM_Case_BAO_CaseType
* @static
*/
public static function &create(&$params) {
......@@ -318,7 +318,7 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType {
* (reference ) an assoc array to hold the name / value pairs.
* in a hierarchical manner
*
* @return CRM_Case_BAO_CaseType object
* @return CRM_Case_BAO_CaseType
* @static
*/
public static function retrieve(&$params, &$defaults) {
......
......@@ -191,13 +191,13 @@ class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant {
}
/**
* Get all Activty types for the CiviCase component
* Get all Activity types for the CiviCase component
*
* The static array activityType is returned
*
* @param bool $indexName
* True return activity name in array.
* key else activity id as array key.
* key else activity id as array key.
*
* @param bool $all
*
......
......@@ -110,7 +110,7 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Contact_BAO_Contact object
* @return CRM_Contact_BAO_Contact
* @static
*/
public static function add(&$params) {
......@@ -276,7 +276,7 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
* @param bool $skipDelete
*
* @throws Exception
* @return CRM_Contact_BAO_Contact object
* @return CRM_Contact_BAO_Contact
* @static
*/
public static function &create(&$params, $fixAddress = TRUE, $invokeHooks = TRUE, $skipDelete = FALSE) {
......@@ -517,14 +517,12 @@ WHERE civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer');
/**
* @param array $crudLinkSpec
* With keys:.
* - action: int, CRM_Core_Action::UPDATE or CRM_Core_Action::VIEW [default: VIEW]
* - entity_table: string, eg "civicrm_contact"
* - entity_id: int
* - action: int, CRM_Core_Action::UPDATE or CRM_Core_Action::VIEW [default: VIEW]
* - entity_table: string, eg "civicrm_contact"
* - entity_id: int
* @return array|NULL
* NULL if unavailable, or an array. array has keys:
* - path: string
* - query: string
* - title: string
* NULL if unavailable, or
* [path: string, query: string, title: string]
* @see CRM_Utils_System::createDefaultCrudLink
*/
public function createDefaultCrudLink($crudLinkSpec) {
......@@ -696,7 +694,7 @@ WHERE civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer');
* @param bool $microformat
* For location in microformat.
*
* @return CRM_Contact_BAO_Contact object
* @return CRM_Contact_BAO_Contact
* @static
*/
public static function &retrieve(&$params, &$defaults, $microformat = FALSE) {
......@@ -1788,7 +1786,7 @@ WHERE civicrm_contact.id = %1 ";
* Id of the contact.
*
* @return array
* of display_name, email if found, do_not_email or (null,null,null)
* Array of display_name, email if found, do_not_email or (null,null,null)
* @static
*/
public static function getContactDetails($id) {
......@@ -2845,7 +2843,7 @@ AND civicrm_openid.is_primary = 1";
* @param int $contactId
*
* @return array
* of context menu for logged in user.
* Array of context menu for logged in user.
* @static
*/
public static function contextMenu($contactId = NULL) {
......@@ -3314,9 +3312,9 @@ LEFT JOIN civicrm_address add2 ON ( add1.master_id = add2.id )
*
* @param string $fieldName
* @param string $context
* : @see CRM_Core_DAO::buildOptionsContext.
* @see CRM_Core_DAO::buildOptionsContext.
* @param array $props
* : whatever is known about this dao object.
* whatever is known about this dao object.
*
* @return Array|bool
*/
......
......@@ -44,7 +44,7 @@ class CRM_Contact_BAO_Contact_Location {
* @param int $locationTypeID
*
* @return array
* of display_name, email, location type and location id if found, or (null,null,null, null)
* Array of display_name, email, location type and location id if found, or (null,null,null, null)
* @static
*/
public static function getEmailDetails($id, $isPrimary = TRUE, $locationTypeID = NULL) {
......
......@@ -42,7 +42,8 @@ class CRM_Contact_BAO_ContactType extends CRM_Contact_DAO_ContactType {
* @param array $defaults
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contact_BAO_ContactType object on success, null otherwise
* @return CRM_Contact_BAO_ContactType|null
* object on success, null otherwise
* @static
*/
public static function retrieve(&$params, &$defaults) {
......@@ -72,7 +73,7 @@ class CRM_Contact_BAO_ContactType extends CRM_Contact_DAO_ContactType {
* @param bool $all
*
* @return array
* of basic contact types information.
* Array of basic contact types information.
* @static
*/
public static function &basicTypeInfo($all = FALSE) {
......@@ -119,7 +120,7 @@ WHERE parent_id IS NULL
* @param bool $all
*
* @return array
* of basic contact types
* Array of basic contact types
* @static
*/
public static function basicTypes($all = FALSE) {
......@@ -153,7 +154,7 @@ WHERE parent_id IS NULL
* @param bool $reset
*
* @return array
* of sub type information
* Array of sub type information
* @static
*/
public static function &subTypeInfo($contactType = NULL, $all = FALSE, $ignoreCache = FALSE, $reset = FALSE) {
......@@ -223,8 +224,8 @@ WHERE subtype.name IS NOT NULL AND subtype.parent_id IS NOT NULL {$ctWHERE}
* @param bool $ignoreCache
*
* @return array
* of all subtypes OR list of subtypes associated to
* a given basic contact type
* all subtypes OR list of subtypes associated to
* a given basic contact type
* @static
*/
public static function subTypes($contactType = NULL, $all = FALSE, $columnName = 'name', $ignoreCache = FALSE) {
......@@ -266,7 +267,7 @@ WHERE subtype.name IS NOT NULL AND subtype.parent_id IS NOT NULL {$ctWHERE}
* @param bool $all
*
* @return array
* of basic types + all subtypes.
* Array of basic types + all subtypes.
* @static
*/
public static function contactTypes($all = FALSE) {
......@@ -281,7 +282,7 @@ WHERE subtype.name IS NOT NULL AND subtype.parent_id IS NOT NULL {$ctWHERE}
* @param bool $reset
*
* @return array
* of basic types + all subtypes.
* Array of basic types + all subtypes.
* @static
*/
public static function contactTypeInfo($all = FALSE, $reset = FALSE) {
......@@ -342,7 +343,7 @@ WHERE type.name IS NOT NULL
* @param null $delimiter
*
* @return array
* of basictypes with name as 'built-in name' and 'label' as value
* Array of basictypes with name as 'built-in name' and 'label' as value
* @static
*/
public static function contactTypePairs($all = FALSE, $typeName = NULL, $delimiter = NULL) {
......@@ -514,7 +515,7 @@ WHERE subtype.name IN ('" . implode("','", $subType) . "' )";
* @param bool $ignoreCache
*
* @return array
* of suppressed subTypes.
* Array of suppressed subTypes.
* @static
*/
public static function suppressSubTypes(&$subTypes, $ignoreCache = FALSE) {
......
......@@ -53,7 +53,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
* @param array $defaults
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contact_BAO_Group object
* @return CRM_Contact_BAO_Group
* @static
*/
public static function retrieve(&$params, &$defaults) {
......@@ -236,7 +236,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
* @param NULL $rowCount
*
* @return array
* of group objects.
* Array of group objects.
*
*
* @todo other BAO functions that use returnProperties (e.g. Query Objects) receive the array flipped & filled with 1s and
......@@ -565,7 +565,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
* @param bool $isActive
* Value we want to set the is_active field.
*
* @return CRM_Core_DAO
* @return CRM_Core_DAO|null
* DAO object on sucess, NULL otherwise
* @static
*/
......@@ -726,8 +726,8 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
*
* @return array
* associated array of group list
* -rp = rowcount
* -page= offset
* -rp = rowcount
* -page= offset
* @todo there seems little reason for the small number of functions that call this to pass in
* params that then need to be translated in this function since they are coding them when calling
*/
......
......@@ -51,7 +51,7 @@ class CRM_Contact_BAO_GroupContact extends CRM_Contact_DAO_GroupContact {
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Contact_BAO_Group object
* @return CRM_Contact_BAO_Group
* @static
*/
public static function add(&$params) {
......@@ -808,9 +808,9 @@ AND contact_id IN ( $contactStr )
*
* @param string $fieldName
* @param string $context
* : @see CRM_Core_DAO::buildOptionsContext.
* @see CRM_Core_DAO::buildOptionsContext.
* @param array $props
* : whatever is known about this dao object.
* whatever is known about this dao object.
*
* @return Array|bool
*/
......
......@@ -52,7 +52,7 @@ class CRM_Contact_BAO_Individual extends CRM_Contact_DAO_Contact {
* @param array $contact
* Contact object.
*
* @return CRM_Contact_BAO_Contact object
* @return CRM_Contact_BAO_Contact
* @static
*/
public static function format(&$params, &$contact) {
......
......@@ -61,7 +61,7 @@ class CRM_Contact_BAO_Query_Hook {
* Get or build the list of search objects (via hook)
*
* @return array
* of CRM_Contact_BAO_Query_Interface objects
* Array of CRM_Contact_BAO_Query_Interface objects
*/
public function getSearchQueryObjects() {
if ($this->_queryObjects === NULL) {
......
......@@ -47,7 +47,7 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
* and this is new in 4.6
* All existing calls have been changed to createMultiple except the api call - however, it is recommended
* that you call that as the end to end testing here is based on the api & refactoring may still be done
* @param $params
* @param array $params
* @return \CRM_Contact_BAO_Relationship
* @throws \CRM_Core_Exception
*/
......@@ -78,10 +78,10 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
* (reference ) an assoc array of name/value pairs.
* @param array $ids
* The array that holds all the db ids.
* per http://wiki.civicrm.org/confluence/display/CRM/Database+layer
* per http://wiki.civicrm.org/confluence/display/CRM/Database+layer
* "we are moving away from the $ids param "
*
* @return CRM_Contact_BAO_Relationship object
* @return CRM_Contact_BAO_Relationship
* @static
*/
public static function createMultiple(&$params, $ids = array()) {
......@@ -304,7 +304,7 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
/**
* Resolve passed in contact IDs to contact_id_a & contact_id_b
* @param $params
* @param array $params
* @param array $ids
* @param null $contactID
* @throws \CRM_Core_Exception
......@@ -1584,7 +1584,7 @@ WHERE id IN ( {$contacts} )
*
* @param int $contactID
* contact id whose employers.
* are to be found.
* are to be found.
* @param string $name
* employers sort name.
*
......@@ -1615,7 +1615,7 @@ WHERE id IN ( {$contacts} )
* @static
*
* @return array
* of contacts
* Array of contacts
*/
public static function getPermissionedContacts($contactID, $relTypeId, $name = NULL) {
$contacts = array();
......
......@@ -49,7 +49,7 @@ class CRM_Contact_BAO_RelationshipType extends CRM_Contact_DAO_RelationshipType
* @param array $defaults
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contact_BAO_RelationshipType object
* @return CRM_Contact_BAO_RelationshipType
* @static
*/
public static function retrieve(&$params, &$defaults) {
......
......@@ -82,7 +82,7 @@ class CRM_Contact_Form_Task_LabelCommon {
* UNUSED.
*
* @return array
* of rows for labels
* Array of rows for labels
*/
public static function getRows($contactIDs, $locationTypeID, $respectDoNotMail, $mergeSameAddress, $mergeSameHousehold) {
......@@ -253,13 +253,10 @@ class CRM_Contact_Form_Task_LabelCommon {
/**
* Get array of return properties for address fields required for mailing label
*
* @return array
* return properites for address e.g
* array (
* - [street_address] => 1,
* - [supplemental_address_1] => 1,
* - [supplemental_address_2] => 1
* )
* return properties for address e.g
* [street_address => 1, supplemental_address_1 => 1, supplemental_address_2 => 1]
*/
public static function getAddressReturnProperties() {
$mailingFormat = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
......@@ -277,8 +274,8 @@ class CRM_Contact_Form_Task_LabelCommon {
/**
* Get token list from mailing format & contacts
* @param unknown_type $contacts
* @return unknown
* @param array $contacts
* @return array
*/
public static function getTokenData(&$contacts) {
$mailingFormat = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
......@@ -307,12 +304,12 @@ class CRM_Contact_Form_Task_LabelCommon {
}
/**
* @param $rows
* @param array $rows
*
* @return array
*/
public function mergeSameHousehold(&$rows) {
# group selected contacts by type
// group selected contacts by type
$individuals = array();
$households = array();
foreach ($rows as $contact_id => $row) {
......@@ -324,7 +321,7 @@ class CRM_Contact_Form_Task_LabelCommon {
}
}
# exclude individuals belonging to selected households
// exclude individuals belonging to selected households
foreach ($households as $household_id => $row) {
$dao = new CRM_Contact_DAO_Relationship();
$dao->contact_id_b = $household_id;
......@@ -337,7 +334,7 @@ class CRM_Contact_Form_Task_LabelCommon {
}
}
# merge back individuals and households
// merge back individuals and households
$rows = array_merge($individuals, $households);
return $rows;
}
......
......@@ -1695,7 +1695,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser {
*
* @param array $params
* reference to an array containing all the.
* values for import
* values for import
* @param int $onDuplicate
* @param int $cid
* contact id.
......
......@@ -92,7 +92,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution {
* @param array $ids
* The array that holds all the db ids.
*
* @return CRM_Contribute_BAO_Contribution object
* @return CRM_Contribute_BAO_Contribution
* @static
*/
public static function add(&$params, $ids = array()) {
......@@ -297,7 +297,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution {
* @param array $ids
* The array that holds all the db ids.
*
* @return CRM_Contribute_BAO_Contribution object
* @return CRM_Contribute_BAO_Contribution
* @static
*/
public static function create(&$params, $ids = array()) {
......@@ -540,7 +540,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution {
* @param array $ids
* (reference) the array that holds all the db ids.
*
* @return CRM_Contribute_BAO_Contribution object
* @return CRM_Contribute_BAO_Contribution
* @static
*/
public static function retrieve(&$params, &$defaults, &$ids) {
......@@ -846,13 +846,12 @@ INNER JOIN civicrm_contact contact ON ( contact.id = civicrm_contribution.conta
* @param array $input
* An assoc array of name/value pairs.
* @param array $duplicates
* (reference ) store ids of duplicate contribs.
*
* (reference) store ids of duplicate contribs.
* @param int $id
*
* @return boolean
* true if duplicate, false otherwise
* static
* @static
*/
public static function checkDuplicate($input, &$duplicates, $id = NULL) {
if (!$id) {
......@@ -902,9 +901,9 @@ INNER JOIN civicrm_contact contact ON ( contact.id = civicrm_contribution.conta
* pairs
*
* @param array $params
* (reference ) an assoc array of name/value pairs.
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Contribute_BAO_ContributionProduct object
* @return CRM_Contribute_DAO_ContributionProduct
* @static
*/
public static function addPremium(&$params) {
......@@ -1161,7 +1160,7 @@ WHERE civicrm_contribution.contact_id = civicrm_contact.id
*
* @return array
* contribution id if success else NULL
* static
* @static
*/
public static function checkDuplicateIds($params) {
$dao = new CRM_Contribute_DAO_Contribution();
......@@ -1254,7 +1253,6 @@ LEFT JOIN civicrm_option_value contribution_status ON (civicrm_contribution.cont
* Create address associated with contribution record.
*
* @param array $params
* An associated array.
* @param int $billingLocationTypeID
*
* @return int
......@@ -1340,7 +1338,8 @@ WHERE $condition
* @param string $componentName
* Event/Membership.
*
* @return $contributionId pending contribution id.
* @return int
* pending contribution id.
* @static
*/
public static function checkOnlinePendingContribution($componentId, $componentName) {
......@@ -1395,7 +1394,7 @@ LEFT JOIN civicrm_contribution contribution ON ( componentPayment.contribution_
}
/**
* This function update contribution as well as related objects.
* Update contribution as well as related objects.
*/
public static function transitionComponents($params, $processContributionObject = FALSE) {
// get minimum required values.
......@@ -1751,7 +1750,7 @@ LEFT JOIN civicrm_contribution contribution ON ( componentPayment.contribution_
}
/**
* This function returns all contribution related object ids.
* Returns all contribution related object ids.
*/
public static function getComponentDetails($contributionId) {
$componentDetails = $pledgePayment = array();
......@@ -1949,11 +1948,13 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
);
}
/*
/**
* Load objects relations to contribution object
* Objects are stored in the $_relatedObjects property
* In the first instance we are just moving functionality from BASEIpn -
* see http://issues.civicrm.org/jira/browse/CRM-9996
* @see http://issues.civicrm.org/jira/browse/CRM-9996