From 4c6ce4745aaf47583a2d67a5ccbc7e32de02eea1 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 24 May 2014 14:35:43 +1200 Subject: [PATCH] CRM/Case add automatically generated comments --- CRM/Campaign/BAO/Survey.php | 4 + CRM/Case/Audit/Audit.php | 26 ++++++ CRM/Case/Audit/AuditConfig.php | 49 ++++++++++ CRM/Case/BAO/Case.php | 32 +++++++ CRM/Case/BAO/CaseType.php | 5 + CRM/Case/BAO/Query.php | 25 +++++ .../Form/Activity/ChangeCaseStartDate.php | 8 ++ CRM/Case/Form/Activity/ChangeCaseStatus.php | 8 ++ CRM/Case/Form/Activity/ChangeCaseType.php | 8 ++ CRM/Case/Form/Activity/LinkCases.php | 8 ++ CRM/Case/Form/Activity/OpenCase.php | 3 + CRM/Case/Form/EditClient.php | 7 ++ CRM/Case/Form/Search.php | 3 + CRM/Case/Form/Task.php | 4 + CRM/Case/Info.php | 27 ++++++ CRM/Case/Selector/Search.php | 6 ++ CRM/Case/XMLProcessor.php | 19 ++++ CRM/Case/XMLProcessor/Process.php | 91 +++++++++++++++++++ CRM/Case/XMLProcessor/Report.php | 84 +++++++++++++++++ CRM/Case/XMLProcessor/Settings.php | 5 + CRM/Core/HTMLInputCoder.php | 4 + CRM/Core/Payment/PaymentExpress.php | 4 + CRM/Core/Payment/PaymentExpressIPN.php | 4 + CRM/Core/Payment/PaymentExpressUtils.php | 4 + CRM/Core/Report/Excel.php | 4 + CRM/Core/Session.php | 4 + CRM/Custom/Import/Controller.php | 6 +- CRM/Custom/Import/Field.php | 4 + CRM/Custom/Import/Form/MapField.php | 6 +- CRM/Custom/Import/Form/Preview.php | 6 +- CRM/Custom/Import/Form/Summary.php | 6 +- CRM/Custom/Import/Parser/Api.php | 4 + CRM/Dedupe/BAO/QueryBuilder.php | 4 + .../BAO/QueryBuilder/IndividualGeneral.php | 3 + .../QueryBuilder/IndividualUnsupervised.php | 4 + CRM/Mailing/BAO/MailingJob.php | 4 + CRM/Mailing/Event/BAO/Confirm.php | 4 + CRM/Mailing/Event/BAO/Resubscribe.php | 4 + CRM/Mailing/Event/BAO/Unsubscribe.php | 4 + CRM/Queue/Page/AJAX.php | 4 + 40 files changed, 505 insertions(+), 4 deletions(-) diff --git a/CRM/Campaign/BAO/Survey.php b/CRM/Campaign/BAO/Survey.php index ae90b07488..143ccd7edf 100644 --- a/CRM/Campaign/BAO/Survey.php +++ b/CRM/Campaign/BAO/Survey.php @@ -33,6 +33,10 @@ * */ require_once 'CRM/Campaign/DAO/Survey.php'; + +/** + * Class CRM_Campaign_BAO_Survey + */ class CRM_Campaign_BAO_Survey extends CRM_Campaign_DAO_Survey { /** diff --git a/CRM/Case/Audit/Audit.php b/CRM/Case/Audit/Audit.php index 96790f3482..e2b6685a8e 100644 --- a/CRM/Case/Audit/Audit.php +++ b/CRM/Case/Audit/Audit.php @@ -1,14 +1,26 @@ xmlString = $xmlString; $this->auditConfig = new CRM_Case_Audit_AuditConfig($confFilename); } + /** + * @param bool $printReport + * + * @return array + */ public function getActivities($printReport = FALSE) { $retval = array(); @@ -173,6 +185,12 @@ class CRM_Case_Audit_Audit { * */ + /** + * @param $a + * @param $b + * + * @return int + */ public function compareActivities($a, $b) { // This should work foreach ($this->auditConfig->getSortByLabels() as $label) { @@ -191,6 +209,14 @@ class CRM_Case_Audit_Audit { } } + /** + * @param $xmlString + * @param $clientID + * @param $caseID + * @param bool $printReport + * + * @return mixed + */ static function run($xmlString, $clientID, $caseID, $printReport = FALSE) { /* diff --git a/CRM/Case/Audit/AuditConfig.php b/CRM/Case/Audit/AuditConfig.php index 02bfafe76f..57b791e18c 100644 --- a/CRM/Case/Audit/AuditConfig.php +++ b/CRM/Case/Audit/AuditConfig.php @@ -1,5 +1,8 @@ filename = $filename; @@ -22,18 +28,30 @@ class CRM_Case_Audit_AuditConfig { $this->loadConfig(); } + /** + * @return string + */ public function getCompletionValue() { return $this->completionValue; } + /** + * @return string + */ public function getCompletionLabel() { return $this->completionLabel; } + /** + * @return array + */ public function getSortByLabels() { return $this->sortByLabels; } + /** + * @return array + */ public function getIfBlanks() { return $this->ifBlanks; } @@ -118,6 +136,12 @@ class CRM_Case_Audit_AuditConfig { * Check if label $n is explicitly listed in region $r in the config. */ + /** + * @param $n + * @param $r + * + * @return bool + */ public function inRegion($n, $r) { if (empty($this->regionFieldList[$r])) { return FALSE; @@ -132,6 +156,12 @@ class CRM_Case_Audit_AuditConfig { * Should field $n be included in region $r, taking into account exclusion rules. */ + /** + * @param $n + * @param $r + * + * @return bool + */ public function includeInRegion($n, $r) { $add_it = FALSE; $rules = $this->includeRules[$r]; @@ -151,6 +181,12 @@ class CRM_Case_Audit_AuditConfig { * Should the time component of field $n in region $r be displayed? */ + /** + * @param $n + * @param $r + * + * @return bool + */ public function includeTime($n, $r) { $retval = FALSE; if (empty($this->regionFieldList[$r][$n]['includeTime'])) { @@ -179,6 +215,9 @@ class CRM_Case_Audit_AuditConfig { * Return a list of all the regions in the config file. */ + /** + * @return array + */ public function getRegions() { return array_keys($this->regionFieldList); } @@ -189,6 +228,10 @@ class CRM_Case_Audit_AuditConfig { * The array to be sorted should have elements that have a member with a key of 'label', and the value should be the field label. */ + /** + * @param $f + * @param $r + */ public function sort(&$f, $r) { // For exclusion-type regions, there's nothing to do, because we won't have been given any ordering. if ($this->includeRules[$r]['rule'] == 'exclude') { @@ -205,6 +248,12 @@ class CRM_Case_Audit_AuditConfig { * See also PHP's usort(). */ + /** + * @param $a + * @param $b + * + * @return int + */ public function compareFields($a, $b) { if (empty($this->regionFieldList[$this->sortRegion][$a['label']])) { $x = 0; diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index 7002f030e8..caac6b3c11 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -47,6 +47,9 @@ class CRM_Case_BAO_Case extends CRM_Case_DAO_Case { */ static $_exportableFields = NULL; + /** + * + */ function __construct() { parent::__construct(); } @@ -550,6 +553,14 @@ WHERE cc.contact_id = %1 AND civicrm_case_type.name = '{$caseType}'"; return $caseArray; } + /** + * @param string $type + * @param null $userID + * @param null $condition + * @param int $isDeleted + * + * @return string + */ static function getCaseActivityQuery($type = 'upcoming', $userID = NULL, $condition = NULL, $isDeleted = 0) { if (!$userID) { $session = CRM_Core_Session::singleton(); @@ -1757,6 +1768,16 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c return TRUE; } + /** + * @param $groupInfo + * @param null $sort + * @param null $showLinks + * @param bool $returnOnlyCount + * @param int $offset + * @param int $rowCount + * + * @return array + */ static function getGlobalContacts(&$groupInfo, $sort = NULL, $showLinks = NULL, $returnOnlyCount = FALSE, $offset = 0, $rowCount = 25) { $globalContacts = array(); @@ -1793,6 +1814,11 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c /* * Convenience function to get both case contacts and global in one array */ + /** + * @param $caseId + * + * @return array + */ static function getRelatedAndGlobalContacts($caseId) { $relatedContacts = self::getRelatedContacts($caseId); @@ -2080,6 +2106,12 @@ SELECT civicrm_contact.id as casemanager_id, return $unclosedCases; } + /** + * @param null $contactId + * @param bool $excludeDeleted + * + * @return null|string + */ static function caseCount($contactId = NULL, $excludeDeleted = TRUE) { $whereConditions = array(); if ($excludeDeleted) { diff --git a/CRM/Case/BAO/CaseType.php b/CRM/Case/BAO/CaseType.php index 3b361b0154..1f876df88b 100644 --- a/CRM/Case/BAO/CaseType.php +++ b/CRM/Case/BAO/CaseType.php @@ -153,6 +153,11 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType { return $caseType; } + /** + * @param $caseTypeId + * + * @return mixed + */ static function del($caseTypeId) { $caseType = new CRM_Case_DAO_CaseType(); $caseType->id = $caseTypeId; diff --git a/CRM/Case/BAO/Query.php b/CRM/Case/BAO/Query.php index 12dc66a566..9cb19932c7 100644 --- a/CRM/Case/BAO/Query.php +++ b/CRM/Case/BAO/Query.php @@ -34,6 +34,11 @@ */ class CRM_Case_BAO_Query { + /** + * @param bool $excludeActivityFields + * + * @return array + */ static function &getFields($excludeActivityFields = FALSE) { $fields = array(); $fields = CRM_Case_BAO_Case::exportableFields(); @@ -515,6 +520,13 @@ class CRM_Case_BAO_Query { } } + /** + * @param $name + * @param $mode + * @param $side + * + * @return string + */ static function from($name, $mode, $side) { $from = ""; @@ -592,6 +604,12 @@ case_relation_type.id = case_relationship.relationship_type_id )"; return (isset($this->_qill)) ? $this->_qill : ""; } + /** + * @param $mode + * @param bool $includeCustomFields + * + * @return array|null + */ static function defaultReturnProperties($mode, $includeCustomFields = TRUE ) { @@ -655,6 +673,9 @@ case_relation_type.id = case_relationship.relationship_type_id )"; return $properties; } + /** + * @param $tables + */ static function tableNames(&$tables) { if (!empty($tables['civicrm_case'])) { $tables = array_merge(array('civicrm_case_contact' => 1), $tables); @@ -741,6 +762,10 @@ case_relation_type.id = case_relationship.relationship_type_id )"; $form->setDefaults(array('case_owner' => 1)); } + /** + * @param $row + * @param $id + */ static function searchAction(&$row, $id) {} } diff --git a/CRM/Case/Form/Activity/ChangeCaseStartDate.php b/CRM/Case/Form/Activity/ChangeCaseStartDate.php index 35a3197949..b9a6172be2 100644 --- a/CRM/Case/Form/Activity/ChangeCaseStartDate.php +++ b/CRM/Case/Form/Activity/ChangeCaseStartDate.php @@ -39,6 +39,11 @@ */ class CRM_Case_Form_Activity_ChangeCaseStartDate { + /** + * @param $form + * + * @throws Exception + */ static function preProcess(&$form) { if (!isset($form->_caseId)) { CRM_Core_Error::fatal(ts('Case Id not found.')); @@ -79,6 +84,9 @@ class CRM_Case_Form_Activity_ChangeCaseStartDate { return $defaults; } + /** + * @param $form + */ static function buildQuickForm(&$form) { $form->removeElement('status_id'); $form->removeElement('priority_id'); diff --git a/CRM/Case/Form/Activity/ChangeCaseStatus.php b/CRM/Case/Form/Activity/ChangeCaseStatus.php index d08c1f86f3..ae670cde6a 100644 --- a/CRM/Case/Form/Activity/ChangeCaseStatus.php +++ b/CRM/Case/Form/Activity/ChangeCaseStatus.php @@ -39,6 +39,11 @@ */ class CRM_Case_Form_Activity_ChangeCaseStatus { + /** + * @param $form + * + * @throws Exception + */ static function preProcess(&$form) { if (!isset($form->_caseId)) { CRM_Core_Error::fatal(ts('Case Id not found.')); @@ -63,6 +68,9 @@ class CRM_Case_Form_Activity_ChangeCaseStatus { return $defaults; } + /** + * @param $form + */ static function buildQuickForm(&$form) { $form->removeElement('status_id'); $form->removeElement('priority_id'); diff --git a/CRM/Case/Form/Activity/ChangeCaseType.php b/CRM/Case/Form/Activity/ChangeCaseType.php index 04697789fd..1feb2f0041 100644 --- a/CRM/Case/Form/Activity/ChangeCaseType.php +++ b/CRM/Case/Form/Activity/ChangeCaseType.php @@ -39,6 +39,11 @@ */ class CRM_Case_Form_Activity_ChangeCaseType { + /** + * @param $form + * + * @throws Exception + */ static function preProcess(&$form) { if (!isset($form->_caseId)) { CRM_Core_Error::fatal(ts('Case Id not found.')); @@ -67,6 +72,9 @@ class CRM_Case_Form_Activity_ChangeCaseType { return $defaults; } + /** + * @param $form + */ static function buildQuickForm(&$form) { $form->removeElement('status_id'); $form->removeElement('priority_id'); diff --git a/CRM/Case/Form/Activity/LinkCases.php b/CRM/Case/Form/Activity/LinkCases.php index 6840c11bfc..f0a6fd9dee 100644 --- a/CRM/Case/Form/Activity/LinkCases.php +++ b/CRM/Case/Form/Activity/LinkCases.php @@ -38,6 +38,11 @@ * */ class CRM_Case_Form_Activity_LinkCases { + /** + * @param $form + * + * @throws Exception + */ static function preProcess(&$form) { if (!isset($form->_caseId)) { CRM_Core_Error::fatal(ts('Case Id not found.')); @@ -73,6 +78,9 @@ class CRM_Case_Form_Activity_LinkCases { return $defaults = array(); } + /** + * @param $form + */ static function buildQuickForm(&$form) { $form->add('text', 'link_to_case_id', ts('Link To Case'), array('class' => 'huge'), TRUE); } diff --git a/CRM/Case/Form/Activity/OpenCase.php b/CRM/Case/Form/Activity/OpenCase.php index 7a563cf9aa..2fe9f30927 100644 --- a/CRM/Case/Form/Activity/OpenCase.php +++ b/CRM/Case/Form/Activity/OpenCase.php @@ -47,6 +47,9 @@ class CRM_Case_Form_Activity_OpenCase { */ public $_contactID; + /** + * @param $form + */ static function preProcess(&$form) { //get multi client case configuration $xmlProcessorProcess = new CRM_Case_XMLProcessor_Process(); diff --git a/CRM/Case/Form/EditClient.php b/CRM/Case/Form/EditClient.php index 3b9b9759d1..5b5da5c94a 100644 --- a/CRM/Case/Form/EditClient.php +++ b/CRM/Case/Form/EditClient.php @@ -103,6 +103,13 @@ class CRM_Case_Form_EditClient extends CRM_Core_Form { $this->addFormRule(array(get_class($this), 'formRule'), $this); } + /** + * @param $vals + * @param $rule + * @param $form + * + * @return array + */ static function formRule($vals, $rule, $form) { $errors = array(); if (empty($vals['reassign_contact_id']) || $vals['reassign_contact_id'] == $form->get('cid')) { diff --git a/CRM/Case/Form/Search.php b/CRM/Case/Form/Search.php index 7fa31fb8df..73332948e5 100644 --- a/CRM/Case/Form/Search.php +++ b/CRM/Case/Form/Search.php @@ -514,6 +514,9 @@ class CRM_Case_Form_Search extends CRM_Core_Form_Search { } } + /** + * @return null + */ function getFormValues() { return NULL; } diff --git a/CRM/Case/Form/Task.php b/CRM/Case/Form/Task.php index bbecf90cf8..53c293d897 100644 --- a/CRM/Case/Form/Task.php +++ b/CRM/Case/Form/Task.php @@ -79,6 +79,10 @@ class CRM_Case_Form_Task extends CRM_Core_Form { self::preProcessCommon($this); } + /** + * @param $form + * @param bool $useTable + */ static function preProcessCommon(&$form, $useTable = FALSE) { $form->_caseIds = array(); diff --git a/CRM/Case/Info.php b/CRM/Case/Info.php index 842a3b5669..6af83a35ba 100644 --- a/CRM/Case/Info.php +++ b/CRM/Case/Info.php @@ -42,6 +42,9 @@ class CRM_Case_Info extends CRM_Core_Component_Info { protected $keyword = 'case'; // docs inherited from interface + /** + * @return array + */ public function getInfo() { return array( 'name' => 'CiviCase', @@ -76,6 +79,10 @@ class CRM_Case_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @return array + * @throws CRM_Core_Exception + */ public function getManagedEntities() { // Use hook_civicrm_caseTypes to build a list of OptionValues // In the long run, we may want more specialized logic for this, but @@ -118,6 +125,11 @@ class CRM_Case_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @param bool $getAllUnconditionally + * + * @return array + */ public function getPermissions($getAllUnconditionally = FALSE) { return array( 'delete in CiviCase', @@ -164,11 +176,17 @@ class CRM_Case_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @return array + */ public function getUserDashboardElement() { return array(); } // docs inherited from interface + /** + * @return array + */ public function registerTab() { return array('title' => ts('Cases'), 'url' => 'case', @@ -177,6 +195,9 @@ class CRM_Case_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @return array + */ public function registerAdvancedSearchPane() { return array('title' => ts('Cases'), 'weight' => 50, @@ -184,11 +205,17 @@ class CRM_Case_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @return null + */ public function getActivityTypes() { return NULL; } // add shortcut to Create New + /** + * @param $shortCuts + */ public function creatNewShortcut(&$shortCuts) { if (CRM_Core_Permission::check('access all cases and activities') || CRM_Core_Permission::check('add cases') diff --git a/CRM/Case/Selector/Search.php b/CRM/Case/Selector/Search.php index 5af458ae86..72b8c74453 100644 --- a/CRM/Case/Selector/Search.php +++ b/CRM/Case/Selector/Search.php @@ -489,10 +489,16 @@ class CRM_Case_Selector_Search extends CRM_Core_Selector_Base { return self::$_columnHeaders; } + /** + * @return mixed + */ function alphabetQuery() { return $this->_query->searchQuery(NULL, NULL, NULL, FALSE, FALSE, TRUE); } + /** + * @return string + */ function &getQuery() { return $this->_query; } diff --git a/CRM/Case/XMLProcessor.php b/CRM/Case/XMLProcessor.php index 04e4c83a5a..c83ed41864 100644 --- a/CRM/Case/XMLProcessor.php +++ b/CRM/Case/XMLProcessor.php @@ -44,10 +44,20 @@ class CRM_Case_XMLProcessor { */ const REL_TYPE_CNAME = 'label_b_a'; + /** + * @param $caseType + * + * @return FALSE|SimpleXMLElement + */ public function retrieve($caseType) { return CRM_Case_XMLRepository::singleton()->retrieve($caseType); } + /** + * @param $caseType + * + * @return mixed|string + */ public static function mungeCaseType($caseType) { // trim all spaces from $caseType $caseType = str_replace('_', ' ', $caseType); @@ -55,6 +65,12 @@ class CRM_Case_XMLProcessor { return $caseType; } + /** + * @param bool $indexName + * @param bool $all + * + * @return array + */ function &allActivityTypes($indexName = TRUE, $all = FALSE) { static $activityTypes = NULL; if (!$activityTypes) { @@ -63,6 +79,9 @@ class CRM_Case_XMLProcessor { return $activityTypes; } + /** + * @return array + */ function &allRelationshipTypes() { static $relationshipTypes = array(); diff --git a/CRM/Case/XMLProcessor/Process.php b/CRM/Case/XMLProcessor/Process.php index bacd687b78..c1d2f98ed7 100644 --- a/CRM/Case/XMLProcessor/Process.php +++ b/CRM/Case/XMLProcessor/Process.php @@ -33,6 +33,12 @@ * */ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor { + /** + * @param $caseType + * @param $params + * + * @throws Exception + */ function run($caseType, &$params) { $xml = $this->retrieve($caseType); @@ -50,6 +56,15 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor { $this->process($xml, $params); } + /** + * @param $caseType + * @param $fieldSet + * @param bool $isLabel + * @param bool $maskAction + * + * @return array|bool|mixed + * @throws Exception + */ function get($caseType, $fieldSet, $isLabel = FALSE, $maskAction = FALSE) { $xml = $this->retrieve($caseType); if ($xml === FALSE) { @@ -72,6 +87,12 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor { } } + /** + * @param $xml + * @param $params + * + * @throws Exception + */ function process($xml, &$params) { $standardTimeline = CRM_Utils_Array::value('standardTimeline', $params); $activitySetName = CRM_Utils_Array::value('activitySetName', $params); @@ -119,6 +140,10 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor { } } + /** + * @param $activitySetXML + * @param $params + */ function processStandardTimeline($activitySetXML, &$params) { if ('Change Case Type' == CRM_Utils_Array::value('activityTypeName', $params) && CRM_Utils_Array::value('resetTimeline', $params, TRUE)) { @@ -133,6 +158,10 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor { } } + /** + * @param $activitySetXML + * @param $params + */ function processActivitySet($activitySetXML, &$params) { foreach ($activitySetXML->ActivityTypes as $activityTypesXML) { foreach ($activityTypesXML as $activityTypeXML) { @@ -141,6 +170,12 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor { } } + /** + * @param $caseRolesXML + * @param bool $isCaseManager + * + * @return array|mixed + */ function &caseRoles($caseRolesXML, $isCaseManager = FALSE) { $relationshipTypes = &$this->allRelationshipTypes(); @@ -166,6 +201,13 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor { return $result; } + /** + * @param $relationshipTypeName + * @param $params + * + * @return bool + * @throws Exception + */ function createRelationships($relationshipTypeName, &$params) { $relationshipTypes = &$this->allRelationshipTypes(); // get the relationship id @@ -202,6 +244,11 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor { return TRUE; } + /** + * @param $params + * + * @return bool + */ function createRelationship(&$params) { $dao = new CRM_Contact_DAO_Relationship(); $dao->copyValues($params); @@ -212,6 +259,14 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor { return TRUE; } + /** + * @param $activityTypesXML + * @param bool $maxInst + * @param bool $isLabel + * @param bool $maskAction + * + * @return array + */ function activityTypes($activityTypesXML, $maxInst = FALSE, $isLabel = FALSE, $maskAction = FALSE) { $activityTypes = &$this->allActivityTypes(TRUE, TRUE); $result = array(); @@ -299,6 +354,9 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor { return $result; } + /** + * @param $params + */ function deleteEmptyActivity(&$params) { $activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name'); $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts); @@ -316,6 +374,11 @@ AND a.is_current_revision = 1 CRM_Core_DAO::executeQuery($query, $sqlParams); } + /** + * @param $params + * + * @return bool + */ function isActivityPresent(&$params) { $query = " SELECT count(a.id) @@ -338,6 +401,14 @@ AND a.is_deleted = 0 return $maxInstance ? ($count < $maxInstance ? FALSE : TRUE) : FALSE; } + /** + * @param $activityTypeXML + * @param $params + * + * @return bool + * @throws CRM_Core_Exception + * @throws Exception + */ function createActivity($activityTypeXML, &$params) { $activityTypeName = (string) $activityTypeXML->name; $activityTypes = &$this->allActivityTypes(TRUE, TRUE); @@ -500,6 +571,11 @@ AND a.is_deleted = 0 return TRUE; } + /** + * @param $activitySetsXML + * + * @return array + */ static function activitySets($activitySetsXML) { $result = array(); foreach ($activitySetsXML as $activitySetXML) { @@ -513,6 +589,13 @@ AND a.is_deleted = 0 return $result; } + /** + * @param $caseType + * @param null $activityTypeName + * + * @return array|bool|mixed + * @throws Exception + */ function getMaxInstance($caseType, $activityTypeName = NULL) { $xml = $this->retrieve($caseType); @@ -525,11 +608,19 @@ AND a.is_deleted = 0 return $activityTypeName ? CRM_Utils_Array::value($activityTypeName, $activityInstances) : $activityInstances; } + /** + * @param $caseType + * + * @return array|mixed + */ function getCaseManagerRoleId($caseType) { $xml = $this->retrieve($caseType); return $this->caseRoles($xml->CaseRoles, TRUE); } + /** + * @return int + */ function getRedactActivityEmail() { $xml = $this->retrieve("Settings"); return ( string ) $xml->RedactActivityEmail ? 1 : 0; diff --git a/CRM/Case/XMLProcessor/Report.php b/CRM/Case/XMLProcessor/Report.php index b5800ab2e6..180f89a171 100644 --- a/CRM/Case/XMLProcessor/Report.php +++ b/CRM/Case/XMLProcessor/Report.php @@ -41,8 +41,19 @@ class CRM_Case_XMLProcessor_Report extends CRM_Case_XMLProcessor { */ protected $_isRedact; + /** + * + */ public function __construct() {} + /** + * @param $clientID + * @param $caseID + * @param $activitySetName + * @param $params + * + * @return mixed + */ function run($clientID, $caseID, $activitySetName, $params) { $contents = self::getCaseReport($clientID, $caseID, @@ -77,6 +88,12 @@ class CRM_Case_XMLProcessor_Report extends CRM_Case_XMLProcessor { } } + /** + * @param $clientID + * @param $caseID + * + * @return array + */ function &caseInfo($clientID, $caseID ) { @@ -129,6 +146,12 @@ class CRM_Case_XMLProcessor_Report extends CRM_Case_XMLProcessor { return $case; } + /** + * @param $xml + * @param $activitySetName + * + * @return array|bool + */ function getActivityTypes($xml, $activitySetName) { foreach ($xml->ActivitySets as $activitySetsXML) { foreach ($activitySetsXML->ActivitySet as $activitySetXML) { @@ -151,6 +174,12 @@ class CRM_Case_XMLProcessor_Report extends CRM_Case_XMLProcessor { return FALSE; } + /** + * @param $xml + * @param $activitySetName + * + * @return null|string + */ function getActivitySetLabel($xml, $activitySetName) { foreach ($xml->ActivitySets as $activitySetsXML) { foreach ($activitySetsXML->ActivitySet as $activitySetXML) { @@ -162,6 +191,12 @@ class CRM_Case_XMLProcessor_Report extends CRM_Case_XMLProcessor { return NULL; } + /** + * @param $clientID + * @param $caseID + * @param $activityTypes + * @param $activities + */ function getActivities($clientID, $caseID, $activityTypes, &$activities) { // get all activities for this case that in this activityTypes set foreach ($activityTypes as $aType) { @@ -200,6 +235,14 @@ AND ac.case_id = %1 } } + /** + * @param $clientID + * @param $activityID + * @param bool $anyActivity + * @param int $redact + * + * @return mixed + */ function &getActivityInfo($clientID, $activityID, $anyActivity = FALSE, $redact = 0) { static $activityInfos = array(); if ($redact) { @@ -261,6 +304,13 @@ WHERE a.id = %1 return $activityInfos[$index]; } + /** + * @param $clientID + * @param $activityDAO + * @param $activityTypeInfo + * + * @return array + */ function &getActivity($clientID, $activityDAO, &$activityTypeInfo) { if (empty($this->_redactionStringRules)) { $this->_redactionStringRules = array(); @@ -483,6 +533,13 @@ WHERE a.id = %1 return $activity; } + /** + * @param $clientID + * @param $activityDAO + * @param $activityTypeInfo + * + * @return array|null + */ function getCustomData($clientID, $activityDAO, &$activityTypeInfo) { list($typeValues, $options, $sql) = $this->getActivityTypeCustomSQL($activityTypeInfo['id'], '%Y-%m-%d'); @@ -536,6 +593,12 @@ WHERE a.id = %1 return empty($customGroups) ? NULL : $customGroups; } + /** + * @param $activityTypeID + * @param null $dateFormat + * + * @return mixed + */ function getActivityTypeCustomSQL($activityTypeID, $dateFormat = NULL) { static $cache = array(); @@ -632,6 +695,11 @@ WHERE entity_id = %1 return $cache[$activityTypeID]; } + /** + * @param $activityID + * + * @return null|string + */ function getCreatedBy($activityID) { $query = " SELECT c.display_name @@ -647,6 +715,13 @@ LIMIT 1 return CRM_Core_DAO::singleValueQuery($query, $params); } + /** + * @param $string + * @param bool $printReport + * @param array $replaceString + * + * @return mixed + */ private function redact($string, $printReport = FALSE, $replaceString = array( )) { if ($printReport) { @@ -659,6 +734,15 @@ LIMIT 1 return $string; } + /** + * @param $clientID + * @param $caseID + * @param $activitySetName + * @param $params + * @param $form + * + * @return mixed + */ static function getCaseReport($clientID, $caseID, $activitySetName, $params, $form) { $template = CRM_Core_Smarty::singleton(); diff --git a/CRM/Case/XMLProcessor/Settings.php b/CRM/Case/XMLProcessor/Settings.php index c03a619f33..ebf7756448 100644 --- a/CRM/Case/XMLProcessor/Settings.php +++ b/CRM/Case/XMLProcessor/Settings.php @@ -38,6 +38,11 @@ class CRM_Case_XMLProcessor_Settings extends CRM_Case_XMLProcessor { // Input: The base filename without the .xml extension // Output: An array of settings. + /** + * @param string $filename + * + * @return array + */ function run($filename = 'settings') { $xml = $this->retrieve($filename); diff --git a/CRM/Core/HTMLInputCoder.php b/CRM/Core/HTMLInputCoder.php index 50cc797832..96ce85954d 100644 --- a/CRM/Core/HTMLInputCoder.php +++ b/CRM/Core/HTMLInputCoder.php @@ -24,6 +24,10 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ */ + +/** + * Class CRM_Core_HTMLInputCoder + */ class CRM_Core_HTMLInputCoder { /** diff --git a/CRM/Core/Payment/PaymentExpress.php b/CRM/Core/Payment/PaymentExpress.php index 2efa379d4c..767bd728ab 100644 --- a/CRM/Core/Payment/PaymentExpress.php +++ b/CRM/Core/Payment/PaymentExpress.php @@ -32,6 +32,10 @@ * Grateful acknowledgements go to Donald Lobo for invaluable assistance * in creating this payment processor module */ + +/** + * Class CRM_Core_Payment_PaymentExpress + */ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment { CONST CHARSET = 'iso-8859-1'; diff --git a/CRM/Core/Payment/PaymentExpressIPN.php b/CRM/Core/Payment/PaymentExpressIPN.php index b46c792b8b..5cc135389f 100644 --- a/CRM/Core/Payment/PaymentExpressIPN.php +++ b/CRM/Core/Payment/PaymentExpressIPN.php @@ -32,6 +32,10 @@ * Grateful acknowledgements go to Donald Lobo for invaluable assistance * in creating this payment processor module */ + +/** + * Class CRM_Core_Payment_PaymentExpressIPN + */ class CRM_Core_Payment_PaymentExpressIPN extends CRM_Core_Payment_BaseIPN { /** diff --git a/CRM/Core/Payment/PaymentExpressUtils.php b/CRM/Core/Payment/PaymentExpressUtils.php index de7aa09ebc..ca37097e98 100644 --- a/CRM/Core/Payment/PaymentExpressUtils.php +++ b/CRM/Core/Payment/PaymentExpressUtils.php @@ -32,6 +32,10 @@ * Grateful acknowledgements go to Donald Lobo for invaluable assistance * in creating this payment processor module */ + +/** + * Class CRM_Core_Payment_PaymentExpressUtils + */ class CRM_Core_Payment_PaymentExpressUtils { static function _valueXml($element, $value = NULL) { diff --git a/CRM/Core/Report/Excel.php b/CRM/Core/Report/Excel.php index b4aed5ee2a..3aeefb50f8 100644 --- a/CRM/Core/Report/Excel.php +++ b/CRM/Core/Report/Excel.php @@ -24,6 +24,10 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ */ + +/** + * Class CRM_Core_Report_Excel + */ class CRM_Core_Report_Excel { /** diff --git a/CRM/Core/Session.php b/CRM/Core/Session.php index 964d423315..a688685e19 100644 --- a/CRM/Core/Session.php +++ b/CRM/Core/Session.php @@ -27,6 +27,10 @@ require_once "PEAR.php"; + +/** + * Class CRM_Core_Session + */ class CRM_Core_Session { /** diff --git a/CRM/Custom/Import/Controller.php b/CRM/Custom/Import/Controller.php index 7720c428e8..2194f10775 100644 --- a/CRM/Custom/Import/Controller.php +++ b/CRM/Custom/Import/Controller.php @@ -1,4 +1,8 @@ addActions($config->uploadDir, array('uploadFile')); } -} \ No newline at end of file +} diff --git a/CRM/Custom/Import/Field.php b/CRM/Custom/Import/Field.php index 6a505c7c25..8ac92d3303 100644 --- a/CRM/Custom/Import/Field.php +++ b/CRM/Custom/Import/Field.php @@ -24,5 +24,9 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ */ + +/** + * Class CRM_Custom_Import_Field + */ class CRM_Custom_Import_Field extends CRM_Contact_Import_Field{} diff --git a/CRM/Custom/Import/Form/MapField.php b/CRM/Custom/Import/Form/MapField.php index 7fe922d634..d7796703a0 100644 --- a/CRM/Custom/Import/Form/MapField.php +++ b/CRM/Custom/Import/Form/MapField.php @@ -1,4 +1,8 @@ addFormRule(array('CRM_Custom_Import_Form_MapField', 'formRule')); } diff --git a/CRM/Custom/Import/Form/Preview.php b/CRM/Custom/Import/Form/Preview.php index 2003975769..27dba3aeb0 100644 --- a/CRM/Custom/Import/Form/Preview.php +++ b/CRM/Custom/Import/Form/Preview.php @@ -1,4 +1,8 @@ set('downloadMismatchRecordsUrl', CRM_Utils_System::url('civicrm/export', $urlParams)); } } -} \ No newline at end of file +} diff --git a/CRM/Custom/Import/Form/Summary.php b/CRM/Custom/Import/Form/Summary.php index 90ce14d825..87cb95166a 100644 --- a/CRM/Custom/Import/Form/Summary.php +++ b/CRM/Custom/Import/Form/Summary.php @@ -1,4 +1,8 @@ pushUserContext(CRM_Utils_System::url('civicrm/import/custom', 'reset=1')); } -} \ No newline at end of file +} diff --git a/CRM/Custom/Import/Parser/Api.php b/CRM/Custom/Import/Parser/Api.php index 9eb91b2194..b6d4ae53ec 100644 --- a/CRM/Custom/Import/Parser/Api.php +++ b/CRM/Custom/Import/Parser/Api.php @@ -1,4 +1,8 @@ params); diff --git a/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php b/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php index c0d4fc313e..7c0d55d3cf 100644 --- a/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php +++ b/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php @@ -24,6 +24,10 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ */ + +/** + * Class CRM_Dedupe_BAO_QueryBuilder_IndividualUnsupervised + */ class CRM_Dedupe_BAO_QueryBuilder_IndividualUnsupervised extends CRM_Dedupe_BAO_QueryBuilder { static function record($rg) { diff --git a/CRM/Mailing/BAO/MailingJob.php b/CRM/Mailing/BAO/MailingJob.php index 960889b693..fbf1a15d87 100644 --- a/CRM/Mailing/BAO/MailingJob.php +++ b/CRM/Mailing/BAO/MailingJob.php @@ -34,6 +34,10 @@ */ require_once 'Mail.php'; + +/** + * Class CRM_Mailing_BAO_MailingJob + */ class CRM_Mailing_BAO_MailingJob extends CRM_Mailing_DAO_MailingJob { CONST MAX_CONTACTS_TO_PROCESS = 1000; diff --git a/CRM/Mailing/Event/BAO/Confirm.php b/CRM/Mailing/Event/BAO/Confirm.php index fc91244dd7..f29ec3c2b7 100644 --- a/CRM/Mailing/Event/BAO/Confirm.php +++ b/CRM/Mailing/Event/BAO/Confirm.php @@ -34,6 +34,10 @@ */ require_once 'Mail/mime.php'; + +/** + * Class CRM_Mailing_Event_BAO_Confirm + */ class CRM_Mailing_Event_BAO_Confirm extends CRM_Mailing_Event_DAO_Confirm { /** diff --git a/CRM/Mailing/Event/BAO/Resubscribe.php b/CRM/Mailing/Event/BAO/Resubscribe.php index 3b1e467b60..7f0ba9745d 100644 --- a/CRM/Mailing/Event/BAO/Resubscribe.php +++ b/CRM/Mailing/Event/BAO/Resubscribe.php @@ -34,6 +34,10 @@ */ require_once 'Mail/mime.php'; + +/** + * Class CRM_Mailing_Event_BAO_Resubscribe + */ class CRM_Mailing_Event_BAO_Resubscribe { /** diff --git a/CRM/Mailing/Event/BAO/Unsubscribe.php b/CRM/Mailing/Event/BAO/Unsubscribe.php index d4b54042c5..355de5d3a3 100644 --- a/CRM/Mailing/Event/BAO/Unsubscribe.php +++ b/CRM/Mailing/Event/BAO/Unsubscribe.php @@ -34,6 +34,10 @@ */ require_once 'Mail/mime.php'; + +/** + * Class CRM_Mailing_Event_BAO_Unsubscribe + */ class CRM_Mailing_Event_BAO_Unsubscribe extends CRM_Mailing_Event_DAO_Unsubscribe { /** diff --git a/CRM/Queue/Page/AJAX.php b/CRM/Queue/Page/AJAX.php index 68eab48d1f..2b87ac5792 100644 --- a/CRM/Queue/Page/AJAX.php +++ b/CRM/Queue/Page/AJAX.php @@ -24,6 +24,10 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ */ + +/** + * Class CRM_Queue_Page_AJAX + */ class CRM_Queue_Page_AJAX { /** -- 2.25.1