Commit 72b3a70c authored by colemanw's avatar colemanw

INFRA-132 - Docblock @param and @return tag fixes

parent 4de9f932
......@@ -328,7 +328,8 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
* @param array $tables
* Tables that will be needed in the FROM.
*
* @return string|null - WHERE-style clause to filter results,
* @return string|null
* WHERE-style clause to filter results,
* or null if $table or $id is null
* @static
*/
......
......@@ -144,7 +144,6 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
* Delete the activity
*
* @param array $params
* Associated array.
* @param bool $moveToTrash
*
* @return void
......@@ -1513,7 +1512,8 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
* The activity ID that tracks the message.
* @param int $userID
*
* @return mixed true on success or PEAR_Error object
* @return bool|PEAR_Error
* true on success or PEAR_Error object
* @static
*/
static function sendSMSMessage(
......@@ -2108,7 +2108,8 @@ AND cl.modified_id = c.id
* Activity id.
* @param string $crmDir
*
* @return string|bool if file exists returns $activityTypeFile activity filename otherwise false.
* @return string|bool
* if file exists returns $activityTypeFile activity filename otherwise false.
*
* @static
*/
......@@ -2140,7 +2141,6 @@ AND cl.modified_id = c.id
* Restore the activity
*
* @param array $params
* Associated array.
*
* @return void
*/
......
......@@ -828,7 +828,8 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
* The uploaded files if any.
* @param $self
*
* @return true if no errors, else array of errors
* @return bool|array
* true if no errors, else array of errors
* @static
*/
public static function formRule($fields, $files, $self) {
......
......@@ -90,7 +90,8 @@ class CRM_Admin_Form_ContactType extends CRM_Admin_Form {
* @param $files
* @param $self
*
* @return true if no errors, else array of errors
* @return bool|array
* true if no errors, else array of errors
* @static
*/
public static function formRule($fields, $files, $self) {
......
......@@ -157,7 +157,8 @@ class CRM_Admin_Form_Extensions extends CRM_Admin_Form {
* @param array $self
* This object.
*
* @return true if no errors, else an array of errors
* @return bool|array
* true if no errors, else an array of errors
* @static
*/
public static function formRule($fields, $files, $self) {
......
......@@ -268,7 +268,8 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form {
* @param array $fields
* The input form values.
*
* @return true if no errors, else array of errors
* @return bool|array
* true if no errors, else array of errors
* @static
*/
public static function formRule($fields, $files, $self) {
......
......@@ -74,7 +74,8 @@ class CRM_Admin_Form_Setting_Component extends CRM_Admin_Form_Setting {
* @param array $options
* Additional user data.
*
* @return true if no errors, else array of errors
* @return bool|array
* true if no errors, else array of errors
* @static
*/
public static function formRule($fields, $files, $options) {
......
......@@ -63,7 +63,8 @@ class CRM_Admin_Form_Setting_Mapping extends CRM_Admin_Form_Setting {
* @param array $fields
* The input form values.
*
* @return true if no errors, else array of errors
* @return bool|array
* true if no errors, else array of errors
* @static
*/
public static function formRule($fields) {
......
......@@ -126,7 +126,8 @@ class CRM_Admin_Form_Setting_Miscellaneous extends CRM_Admin_Form_Setting {
* @param array $options
* Additional user data.
*
* @return true if no errors, else array of errors
* @return bool|array
* true if no errors, else array of errors
* @static
*/
public static function formRule($fields, $files, $options) {
......
......@@ -53,7 +53,6 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
* Create a new batch
*
* @param array $params
* Associated array.
* @param array $ids
* Associated array of ids.
* @param string $context
......@@ -131,7 +130,8 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
/**
* Generate batch name
*
* @return batch name
* @return string
* batch name
* @static
*/
public static function generateBatchName() {
......@@ -142,9 +142,9 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
/**
* Create entity batch entry
*
* @param array $params
* Associated array.
* @return batch array
* @return array
*/
public static function addBatchEntity(&$params) {
$entityBatch = new CRM_Batch_DAO_EntityBatch();
......@@ -156,7 +156,6 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
/**
* Remove entries from entity batch
* @param array $params
* Associated array.
* @return CRM_Batch_DAO_EntityBatch
*/
public static function removeBatchEntity($params) {
......@@ -172,7 +171,7 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
* @param int $batchId
* Batch id.
*
* @return void
* @return bool
*/
public static function deleteBatch($batchId) {
// delete entry from batch table
......@@ -506,8 +505,7 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
* Get batch list
*
* @return array
* array of all batches
* excluding batches with data entry in progress
* all batches excluding batches with data entry in progress
*/
public static function getBatches() {
$dataEntryStatusId = CRM_Core_OptionGroup::getValue('batch_status', 'Data Entry', 'name');
......@@ -553,8 +551,10 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
/**
* Format markup for comparing two totals
*
* @param $actual : calculated total
* @param $expected : user-entered total
* @param $actual
* calculated total
* @param $expected
* user-entered total
* @return array
*/
public static function displayTotals($actual, $expected) {
......@@ -643,11 +643,11 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
*
* @param int $entityID
* @param array $returnValues
* @param null $notPresent
* @param bool $notPresent
* @param array $params
* @param bool $getCount
*
* @return Object
* @return CRM_Core_DAO
*/
public static function getBatchFinancialItems($entityID, $returnValues, $notPresent = NULL, $params = NULL, $getCount = FALSE) {
if (!$getCount) {
......
......@@ -153,7 +153,8 @@ class CRM_Campaign_BAO_Campaign extends CRM_Campaign_DAO_Campaign {
* @param bool $appendDatesToTitle
* @param bool $forceAll
*
* @return mixed $campaigns a set of campaigns.
* @return mixed
* $campaigns a set of campaigns.
* @access public
*/
public static function getCampaigns(
......
......@@ -808,7 +808,8 @@ INNER JOIN civicrm_contact contact_a ON ( activityTarget.contact_id = contact_a
* @param int $surveyId
* @param bool $enclosedInUL
* @param string $extraULName
* @return array|string $url array of permissioned links
* @return array|string
* $url array of permissioned links
* @static
*/
public static function buildPermissionLinks($surveyId, $enclosedInUL = FALSE, $extraULName = 'more') {
......
......@@ -1599,7 +1599,8 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
* @param int $file
* Email sent.
*
* @return array|void $activity object of newly creted activity via email
* @return array|void
* $activity object of newly creted activity via email
* @access public
*/
public static function recordActivityViaEmail($file) {
......@@ -1763,7 +1764,7 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
* @param int $caseId
* Id of the case to restore.
*
* @return true if success.
* @return bool
* @static
*/
public static function restoreCase($caseId) {
......@@ -1861,9 +1862,10 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
* @param array $criteriaParams
* Given criteria.
* @param bool $latestDate
* If set newest or oldest date is selceted.
* If set newest or oldest date is selected.
*
* @return returns case activities due dates
* @return array
* case activities due dates
*
* @static
*/
......@@ -2059,7 +2061,7 @@ SELECT civicrm_contact.id as casemanager_id,
* @param bool $excludeDeleted
*
* @return array
* of case and related data keyed on case id
* case and related data keyed on case id
*/
public static function getUnclosedCases($params = array(), $excludeCaseIds = array(), $excludeDeleted = TRUE, $includeClosed = FALSE) {
//params from ajax call.
......@@ -2187,7 +2189,7 @@ LEFT JOIN civicrm_case_contact ON ( civicrm_case.id = civicrm_case_contact.case
* @param bool $excludeDeleted
* Do not include deleted cases.
*
* @return an array of cases.
* @return array
*/
public static function getContactCases($contactId, $excludeDeleted = TRUE) {
$cases = array();
......@@ -2230,7 +2232,7 @@ INNER JOIN civicrm_case_contact ON ( civicrm_case.id = civicrm_case_contact.cas
* @param bool $excludeDeleted
* Do not include deleted cases.
*
* @return an array of related cases.
* @return array
*/
public static function getRelatedCases($mainCaseId, $contactId, $excludeDeleted = TRUE) {
//FIXME : do check for permissions.
......@@ -3151,7 +3153,6 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')';
/**
* Get all the case type ids currently in use
*
*
* @return array
*/
public static function getUsedCaseType() {
......@@ -3176,7 +3177,6 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')';
/**
* Get all the case status ids currently in use
*
*
* @return array
*/
public static function getUsedCaseStatuses() {
......@@ -3197,6 +3197,7 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')';
/**
* Get all the encounter medium ids currently in use
*
* @return array
*/
public static function getUsedEncounterMediums() {
......@@ -3267,6 +3268,8 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')';
/**
* Used during case component enablement and during ugprade
*
* @return bool
*/
public static function createCaseViews() {
$errorScope = CRM_Core_TemporaryErrorScope::ignoreException();
......@@ -3301,6 +3304,8 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')';
/**
* Helper function, also used by the upgrade in case of error
*
* @return string
*/
public static function createCaseViewsQuery($section = 'upcoming') {
$sql = "";
......@@ -3398,9 +3403,9 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')';
*
* @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
*/
......
......@@ -359,7 +359,8 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType {
* Determine if the case-type has *both* DB and file-based definitions.
*
* @param int $caseTypeId
* @return bool|null TRUE if there are *both* DB and file-based definitions
* @return bool|null
* TRUE if there are *both* DB and file-based definitions
*/
public static function isForked($caseTypeId) {
$caseTypeName = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_CaseType', $caseTypeId, 'name', 'id', TRUE);
......
......@@ -361,7 +361,8 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity {
* The uploaded files if any.
* @param $self
*
* @return true if no errors, else array of errors
* @return bool|array
* true if no errors, else array of errors
* @static
*/
public static function formRule($fields, $files, $self) {
......
......@@ -138,7 +138,8 @@ class CRM_Case_XMLRepository {
/**
* @param string $caseType
* @return null|string file path
* @return null|string
* file path
*/
public function findXmlFile($caseType) {
// first check custom templates directory
......
......@@ -520,7 +520,8 @@ WHERE civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer');
* - 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:
* @return array|NULL
* NULL if unavailable, or an array. array has keys:
* - path: string
* - query: string
* - title: string
......@@ -743,7 +744,8 @@ WHERE civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer');
* @param int $id
* Id of the contact.
*
* @return null|string display name of the contact if found
* @return null|string
* display name of the contact if found
* @static
*/
public static function displayName($id) {
......@@ -2558,7 +2560,8 @@ AND civicrm_openid.is_primary = 1";
* @param string $tableName
* Optional tableName if component is custom group.
*
* @return total number of count of occurence in database
* @return int
* total number in database
* @static
*/
public static function getCountComponent($component, $contactId, $tableName = NULL) {
......@@ -3114,7 +3117,8 @@ AND civicrm_openid.is_primary = 1";
* @param int $contactId
* Contact id.
*
* @return display name |null the found display name or null.
* @return string|null
* the found display name or null.
* @static
*/
public static function getMasterDisplayName($masterAddressId = NULL, $contactId = NULL) {
......
......@@ -125,7 +125,8 @@ LEFT JOIN civicrm_phone ON ( civicrm_phone.contact_id = civicrm_contact.id )
* @param int $locationTypeID
* @param bool $imageUrlOnly
*
* @return null|string display name of the contact if found
* @return null|string
* display name of the contact if found
* @static
*/
public static function &getMapInfo($ids, $locationTypeID = NULL, $imageUrlOnly = FALSE) {
......
......@@ -120,7 +120,8 @@ class CRM_Contact_BAO_Contact_Utils {
* @param array $contactIds
* Array of contact ids.
*
* @return boolen true or false true if mix contact array else fale
* @return bool
* true if mix contact array else false
*
* @static
*/
......@@ -259,7 +260,7 @@ WHERE id IN ( $idString )
* Contact id.
*
* @return int
* $locationCount max locations for the contact
* max locations for the contact
* @static
*/
public static function maxLocations($contactId) {
......
......@@ -241,12 +241,12 @@ WHERE subtype.name IS NOT NULL AND subtype.parent_id IS NOT NULL {$ctWHERE}
* retrieve subtype pairs with name as 'subtype-name' and 'label' as value
*
* @param array $contactType
* ..
* @param bool $all
* @param string $labelPrefix
* @param bool $ignoreCache
*
* @return list of subtypes with name as 'subtype-name' and 'label' as value
* @return array
* list of subtypes with name as 'subtype-name' and 'label' as value
* @static
*/
public static function subTypePairs($contactType = NULL, $all = FALSE, $labelPrefix = '- ', $ignoreCache = FALSE) {
......
......@@ -351,7 +351,8 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
* @param array $params
* Associative array of parameters.
*
* @return object|NULL The new group BAO (if created)
* @return CRM_Contact_BAO_Group|NULL
* The new group BAO (if created)
* @static
*/
public static function &create(&$params) {
......@@ -533,7 +534,8 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
* @param array $params
* Associative array of parameters.
*
* @return object|NULL The new group BAO (if created)
* @return CRM_Contact_BAO_Group|NULL
* The new group BAO (if created)
* @static
*/
public static function createSmartGroup(&$params) {
......@@ -563,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 Object
* @return CRM_Core_DAO
* DAO object on sucess, NULL otherwise
* @static
*/
......
......@@ -145,7 +145,8 @@ class CRM_Contact_BAO_GroupOrganization extends CRM_Contact_DAO_GroupOrganizatio
* @param int $groupOrganizationID
* Group organization id that needs to be deleted.
*
* @return mixed|null $results no of deleted group organization on success, false otherwise
* @return int|null
* no of deleted group organization on success, false otherwise
* @access public
*/
public static function deleteGroupOrganization($groupOrganizationID) {
......
......@@ -5470,8 +5470,9 @@ AND displayRelType.is_active = 1
* @param string $dataType
* The dataType we should check for the values, default integer.
*
* @return bool|array if string does not match the patter
* array of numeric values if string does match the pattern
* @return bool|array
* false if string does not match the pattern
* array of numeric values if string does match the pattern
* @static
*/
public static function parseSearchBuilderString($string, $dataType = 'Integer') {
......
......@@ -1699,7 +1699,8 @@ AND cc.sort_name LIKE '%$name%'";
/**
* Set 'is_valid' field to false for all relationships whose end date is in the past, ie. are expired.
*
* @return True on success, false if error is encountered.
* @return bool
* True on success, false if error is encountered.
*/
public static function disableExpiredRelationships() {
$query = "SELECT id FROM civicrm_relationship WHERE is_active = 1 AND end_date < CURDATE()";
......
......@@ -1317,7 +1317,8 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
* @param array $parseResult
* An array of address blk instance and its status.
*
* @return null|string $statusMsg string status message for all address blocks.
* @return null|string
* $statusMsg string status message for all address blocks.
* @static
*/
public static function parseAddressStatusMsg($parseResult) {
......@@ -1349,7 +1350,8 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
* @param int $number
* number to convert in to ordinal number.
*
* @return ordinal number for given number.
* @return string
* ordinal number for given number.
* @static
*/
public static function ordinalNumber($number) {
......@@ -1386,7 +1388,8 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
* @param array $deceasedParams
* having contact id and deceased value.
*
* @return null|string $updateMembershipMsg string status message for updated membership.
* @return null|string
* $updateMembershipMsg string status message for updated membership.
*/
public function updateMembershipStatus($deceasedParams) {
$updateMembershipMsg = NULL;
......
......@@ -279,7 +279,8 @@ class CRM_Contact_Form_Edit_Address {
* @param $files
* @param $self
*
* @return array|bool if no errors
* @return array|bool
* if no errors
*
* @static
*/
......
......@@ -140,7 +140,8 @@ class CRM_Contact_Form_Edit_CommunicationPreferences {
* The uploaded files if any.
* @param $self
*
* @return true if no errors, else array of errors
* @return bool|array
* true if no errors, else array of errors
* @static
*/
public static function formRule($fields, $files, $self) {
......
......@@ -87,7 +87,8 @@ class CRM_Contact_Form_Edit_Household {
* Unused.
* @param int $contactID
*
* @return array|bool $error
* @return array|bool
* $error
* @static
*/
public static function formRule($fields, $files, $contactID = NULL) {
......
......@@ -60,7 +60,8 @@ class CRM_Contact_Form_Edit_Lock {
* The uploaded files if any.
* @param int $contactID
*
* @return true if no errors, else array of errors
* @return bool|array
* true if no errors, else array of errors
* @static
*/
public static function formRule($fields, $files, $contactID = NULL) {
......
......@@ -71,7 +71,8 @@ class CRM_Contact_Form_Inline_Lock {
* The uploaded files if any.
* @param int $contactID
*
* @return true if no errors, else array of errors
* @return bool|array
* true if no errors, else array of errors
* @static
*/
public static function formRule($fields, $files, $contactID = NULL) {
......
......@@ -559,7 +559,8 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form {
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
* @return mixed true or array of errors
* @return bool|array
* mixed true or array of errors
* @static
*/
public static function dateRule($params) {
......
......@@ -199,7 +199,8 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task {
* @param array $fields
* The input form values.