From e0ef6999bd13664d0f36fe9adb861b133494144d Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 24 May 2014 15:10:30 +1200 Subject: [PATCH] CRM add remaining missing comment blocks (autogenerated) --- CRM/Admin/Form/Job.php | 9 ++++ CRM/Admin/Form/LabelFormats.php | 3 ++ CRM/Admin/Form/Mapping.php | 3 ++ CRM/Admin/Form/Navigation.php | 3 ++ CRM/Admin/Form/ParticipantStatus.php | 3 ++ CRM/Admin/Form/PaymentProcessor.php | 15 ++++++ CRM/Admin/Form/PaymentProcessorType.php | 3 ++ CRM/Admin/Form/PdfFormats.php | 3 ++ CRM/Admin/Form/Persistent.php | 3 ++ CRM/Admin/Form/Preferences.php | 6 +++ CRM/Admin/Form/Preferences/Address.php | 8 ++++ CRM/Admin/Form/Preferences/Display.php | 3 ++ CRM/Admin/Form/RelationshipType.php | 3 ++ CRM/Admin/Form/ScheduleReminders.php | 3 ++ CRM/Admin/Form/Setting.php | 3 ++ CRM/Admin/Form/Setting/Component.php | 8 ++++ CRM/Admin/Form/Setting/Localization.php | 5 ++ CRM/Admin/Form/Setting/Mail.php | 5 ++ .../Form/Setting/UpdateConfigBackend.php | 5 ++ CRM/Admin/Form/Setting/Url.php | 5 ++ CRM/Admin/Form/WordReplacements.php | 3 ++ CRM/Admin/Page/APIDoc.php | 6 +++ CRM/Admin/Page/APIExplorer.php | 3 ++ CRM/Admin/Page/Access.php | 3 ++ CRM/Admin/Page/Admin.php | 3 ++ CRM/Admin/Page/ConfigTaskList.php | 3 ++ CRM/Admin/Page/MessageTemplates.php | 19 ++++++++ CRM/Admin/Page/ParticipantStatus.php | 18 +++++++ CRM/Admin/Page/Persistent.php | 3 ++ CRM/Admin/Page/Setting.php | 4 ++ CRM/Badge/BAO/Badge.php | 21 +++++++-- CRM/Badge/Form/Layout.php | 5 +- CRM/Batch/BAO/Batch.php | 4 ++ CRM/Batch/Form/Search.php | 3 ++ CRM/Bridge/OG/CiviCRM.php | 18 +++++++ CRM/Bridge/OG/Drupal.php | 31 ++++++++++++ CRM/Bridge/OG/Utils.php | 34 ++++++++++++++ CRM/Campaign/Page/Vote.php | 3 ++ CRM/Contact/Form/Search/Custom/DateAdded.php | 3 ++ CRM/Custom/Form/ChangeFieldType.php | 11 +++++ CRM/Custom/Form/CustomData.php | 5 ++ CRM/Custom/Form/Group.php | 5 ++ CRM/Custom/Form/MoveField.php | 7 +++ CRM/Custom/Import/Form/DataSource.php | 5 +- CRM/Custom/Import/Parser.php | 12 +++++ CRM/Dedupe/BAO/QueryBuilder.php | 7 +++ .../BAO/QueryBuilder/IndividualGeneral.php | 10 ++++ .../BAO/QueryBuilder/IndividualSupervised.php | 10 ++++ .../QueryBuilder/IndividualUnsupervised.php | 10 ++++ CRM/Dedupe/BAO/Rule.php | 6 +++ CRM/Dedupe/BAO/RuleGroup.php | 10 ++++ CRM/Dedupe/Merger.php | 12 +++++ CRM/Export/BAO/Export.php | 47 +++++++++++++++++++ CRM/Export/Form/Select.php | 3 ++ CRM/Extension/Browser.php | 13 +++++ CRM/Extension/Container/Static.php | 8 ++++ CRM/Extension/Info.php | 7 +++ CRM/Extension/Manager.php | 19 ++++++++ CRM/Extension/Manager/Interface.php | 25 +++++++++- CRM/Extension/Manager/Module.php | 27 +++++++++++ CRM/Extension/Manager/Payment.php | 3 ++ CRM/Extension/Manager/Report.php | 25 ++++++++++ CRM/Extension/Manager/Search.php | 27 +++++++++++ CRM/Extension/Mapper.php | 12 +++++ CRM/Extension/System.php | 6 +++ CRM/Financial/BAO/ExportFormat.php | 43 +++++++++++++++++ CRM/Financial/BAO/ExportFormat/CSV.php | 16 +++++++ CRM/Financial/BAO/ExportFormat/IIF.php | 31 ++++++++++++ CRM/Financial/BAO/PaymentProcessor.php | 13 +++++ CRM/Financial/BAO/PaymentProcessorType.php | 5 ++ CRM/Financial/Form/BatchTransaction.php | 3 ++ CRM/Financial/Form/Search.php | 5 +- CRM/Financial/Page/AJAX.php | 9 ++++ CRM/Financial/Page/FinancialBatch.php | 5 ++ CRM/Friend/BAO/Friend.php | 3 ++ CRM/Grant/BAO/Query.php | 27 +++++++++++ CRM/Grant/Form/Grant.php | 3 ++ CRM/Grant/Form/Search.php | 3 ++ CRM/Grant/Form/Task.php | 4 ++ CRM/Grant/Info.php | 26 ++++++++++ CRM/Grant/Selector/Search.php | 3 ++ CRM/Group/Controller.php | 6 +++ CRM/Group/Form/Edit.php | 8 ++++ CRM/Group/Form/Search.php | 3 ++ CRM/Group/Page/Group.php | 3 ++ CRM/Import/DataSource/CSV.php | 33 +++++++++++++ CRM/Import/DataSource/SQL.php | 35 ++++++++++++++ CRM/Import/Parser.php | 41 ++++++++++++++++ CRM/Logging/Differ.php | 38 +++++++++++++++ CRM/Logging/ReportDetail.php | 23 +++++++-- CRM/Logging/ReportSummary.php | 23 +++++++++ CRM/Logging/Reverter.php | 7 +++ CRM/Logging/Schema.php | 30 ++++++++++++ CRM/Mailing/BAO/MailingJob.php | 33 +++++++++++++ CRM/Mailing/BAO/Query.php | 30 ++++++++++++ CRM/Mailing/BAO/Recipients.php | 12 +++++ CRM/Mailing/BAO/TrackableURL.php | 6 +++ CRM/Mailing/Event/BAO/Delivered.php | 4 ++ CRM/Mailing/Event/BAO/Queue.php | 9 ++++ CRM/Mailing/Event/BAO/Unsubscribe.php | 5 ++ CRM/Mailing/Form/Search.php | 5 +- CRM/Mailing/Form/Subscribe.php | 7 ++- CRM/Mailing/Form/Task.php | 4 ++ CRM/Mailing/Info.php | 29 ++++++++++++ CRM/Mailing/Page/Browse.php | 6 +++ CRM/Mailing/Page/Common.php | 4 ++ CRM/Mailing/Page/Component.php | 5 ++ CRM/Mailing/Page/Confirm.php | 4 ++ CRM/Mailing/Page/Report.php | 17 +++++++ CRM/Mailing/Page/Resubscribe.php | 3 ++ CRM/Mailing/Selector/Browse.php | 9 ++++ CRM/Mailing/Selector/Search.php | 6 +++ CRM/PCP/BAO/PCP.php | 15 ++++++ CRM/PCP/Form/PCPAccount.php | 3 ++ CRM/PCP/Page/PCP.php | 4 ++ CRM/PCP/Page/PCPInfo.php | 3 ++ CRM/Queue/ErrorPolicy.php | 9 ++++ CRM/Queue/Menu.php | 4 ++ CRM/Queue/Runner.php | 9 ++++ CRM/Queue/Service.php | 4 ++ CRM/Utils/Cache/Memcached.php | 3 ++ 121 files changed, 1306 insertions(+), 13 deletions(-) diff --git a/CRM/Admin/Form/Job.php b/CRM/Admin/Form/Job.php index 801629f207..5552856c31 100644 --- a/CRM/Admin/Form/Job.php +++ b/CRM/Admin/Form/Job.php @@ -108,6 +108,12 @@ class CRM_Admin_Form_Job extends CRM_Admin_Form { $this->addFormRule(array('CRM_Admin_Form_Job', 'formRule')); } + /** + * @param $fields + * + * @return array|bool + * @throws API_Exception + */ static function formRule($fields) { $errors = array(); @@ -130,6 +136,9 @@ class CRM_Admin_Form_Job extends CRM_Admin_Form { return empty($errors) ? TRUE : $errors; } + /** + * @return array + */ function setDefaultValues() { $defaults = array(); diff --git a/CRM/Admin/Form/LabelFormats.php b/CRM/Admin/Form/LabelFormats.php index fb951f61bb..30809ca257 100644 --- a/CRM/Admin/Form/LabelFormats.php +++ b/CRM/Admin/Form/LabelFormats.php @@ -153,6 +153,9 @@ class CRM_Admin_Form_LabelFormats extends CRM_Admin_Form { $this->addRule('weight', ts('Weight must be integer'), 'integer'); } + /** + * @return int + */ function setDefaultValues() { if ($this->_action & CRM_Core_Action::ADD) { $defaults['weight'] = CRM_Utils_Array::value('weight', CRM_Core_BAO_LabelFormat::getDefaultValues($this->_group), 0); diff --git a/CRM/Admin/Form/Mapping.php b/CRM/Admin/Form/Mapping.php index 53a4a7921d..38b3fcf592 100644 --- a/CRM/Admin/Form/Mapping.php +++ b/CRM/Admin/Form/Mapping.php @@ -78,6 +78,9 @@ class CRM_Admin_Form_Mapping extends CRM_Admin_Form { } } + /** + * @return array + */ function setDefaultValues() { $defaults = parent::setDefaultValues(); return $defaults; diff --git a/CRM/Admin/Form/Navigation.php b/CRM/Admin/Form/Navigation.php index 40db24cb83..dd0b6199a9 100644 --- a/CRM/Admin/Form/Navigation.php +++ b/CRM/Admin/Form/Navigation.php @@ -116,6 +116,9 @@ class CRM_Admin_Form_Navigation extends CRM_Admin_Form { } } + /** + * @return array + */ public function setDefaultValues() { $defaults = $this->_defaults; if (isset($this->_id)) { diff --git a/CRM/Admin/Form/ParticipantStatus.php b/CRM/Admin/Form/ParticipantStatus.php index 4c29aac941..5b955d30fa 100644 --- a/CRM/Admin/Form/ParticipantStatus.php +++ b/CRM/Admin/Form/ParticipantStatus.php @@ -67,6 +67,9 @@ class CRM_Admin_Form_ParticipantStatus extends CRM_Admin_Form { $this->add('select', 'visibility_id', ts('Visibility'), CRM_Core_PseudoConstant::visibility(), TRUE); } + /** + * @return array + */ function setDefaultValues() { $defaults = parent::setDefaultValues(); if (empty($defaults['weight'])) { diff --git a/CRM/Admin/Form/PaymentProcessor.php b/CRM/Admin/Form/PaymentProcessor.php index a2a074250c..73abfe7424 100644 --- a/CRM/Admin/Form/PaymentProcessor.php +++ b/CRM/Admin/Form/PaymentProcessor.php @@ -228,6 +228,11 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { $this->addFormRule(array('CRM_Admin_Form_PaymentProcessor', 'formRule')); } + /** + * @param $fields + * + * @return array|bool + */ static function formRule($fields) { // make sure that at least one of live or test is present @@ -248,6 +253,13 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { return empty($errors) ? TRUE : $errors; } + /** + * @param $fields + * @param $errors + * @param null $section + * + * @return bool + */ static function checkSection(&$fields, &$errors, $section = NULL) { $names = array('user_name'); @@ -273,6 +285,9 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { return $present; } + /** + * @return array + */ function setDefaultValues() { $defaults = array(); if ($this->_ppType) { diff --git a/CRM/Admin/Form/PaymentProcessorType.php b/CRM/Admin/Form/PaymentProcessorType.php index 5e58b6d70b..256c777dff 100644 --- a/CRM/Admin/Form/PaymentProcessorType.php +++ b/CRM/Admin/Form/PaymentProcessorType.php @@ -178,6 +178,9 @@ class CRM_Admin_Form_PaymentProcessorType extends CRM_Admin_Form { $this->add('checkbox', 'is_recur', ts('Does this Payment Processor Type support recurring donations?')); } + /** + * @return array + */ function setDefaultValues() { $defaults = array(); diff --git a/CRM/Admin/Form/PdfFormats.php b/CRM/Admin/Form/PdfFormats.php index cfaf6e11ca..b84da1be38 100644 --- a/CRM/Admin/Form/PdfFormats.php +++ b/CRM/Admin/Form/PdfFormats.php @@ -92,6 +92,9 @@ class CRM_Admin_Form_PdfFormats extends CRM_Admin_Form { $this->addRule('weight', ts('Weight must be integer'), 'integer'); } + /** + * @return int + */ function setDefaultValues() { if ($this->_action & CRM_Core_Action::ADD) { $defaults['weight'] = CRM_Utils_Array::value('weight', CRM_Core_BAO_PdfFormat::getDefaultValues(), 0); diff --git a/CRM/Admin/Form/Persistent.php b/CRM/Admin/Form/Persistent.php index 719d15cc6e..6ce507dc62 100644 --- a/CRM/Admin/Form/Persistent.php +++ b/CRM/Admin/Form/Persistent.php @@ -49,6 +49,9 @@ class CRM_Admin_Form_Persistent extends CRM_Core_Form { parent::preProcess(); } + /** + * @return array + */ public function setDefaultValues() { $defaults = array(); diff --git a/CRM/Admin/Form/Preferences.php b/CRM/Admin/Form/Preferences.php index 10e02561b8..6010d59015 100644 --- a/CRM/Admin/Form/Preferences.php +++ b/CRM/Admin/Form/Preferences.php @@ -97,6 +97,9 @@ class CRM_Admin_Form_Preferences extends CRM_Core_Form { $session->pushUserContext(CRM_Utils_System::url('civicrm/admin', 'reset=1')); } + /** + * @return array + */ function setDefaultValues() { $defaults = array(); @@ -109,6 +112,9 @@ class CRM_Admin_Form_Preferences extends CRM_Core_Form { return $defaults; } + /** + * @param $defaults + */ function cbsDefaultValues(&$defaults) { foreach ($this->_varNames as $groupName => $groupValues) { diff --git a/CRM/Admin/Form/Preferences/Address.php b/CRM/Admin/Form/Preferences/Address.php index 97bc6a4ec9..51a036ec55 100644 --- a/CRM/Admin/Form/Preferences/Address.php +++ b/CRM/Admin/Form/Preferences/Address.php @@ -87,6 +87,9 @@ class CRM_Admin_Form_Preferences_Address extends CRM_Admin_Form_Preferences { parent::preProcess(); } + /** + * @return array + */ function setDefaultValues() { $defaults = array(); $defaults['address_standardization_provider'] = $this->_config->address_standardization_provider; @@ -156,6 +159,11 @@ class CRM_Admin_Form_Preferences_Address extends CRM_Admin_Form_Preferences { parent::buildQuickForm(); } + /** + * @param $fields + * + * @return bool + */ static function formRule($fields) { $p = $fields['address_standardization_provider']; $u = $fields['address_standardization_userid']; diff --git a/CRM/Admin/Form/Preferences/Display.php b/CRM/Admin/Form/Preferences/Display.php index 8b26ac2595..152f910127 100644 --- a/CRM/Admin/Form/Preferences/Display.php +++ b/CRM/Admin/Form/Preferences/Display.php @@ -109,6 +109,9 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences { parent::preProcess(); } + /** + * @return array + */ function setDefaultValues() { $defaults = parent::setDefaultValues(); parent::cbsDefaultValues($defaults); diff --git a/CRM/Admin/Form/RelationshipType.php b/CRM/Admin/Form/RelationshipType.php index d40d93fbd7..995450231d 100644 --- a/CRM/Admin/Form/RelationshipType.php +++ b/CRM/Admin/Form/RelationshipType.php @@ -100,6 +100,9 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form { } } + /** + * @return array + */ function setDefaultValues() { if ($this->_action != CRM_Core_Action::DELETE && isset($this->_id) diff --git a/CRM/Admin/Form/ScheduleReminders.php b/CRM/Admin/Form/ScheduleReminders.php index cb962cf944..5d971f6684 100644 --- a/CRM/Admin/Form/ScheduleReminders.php +++ b/CRM/Admin/Form/ScheduleReminders.php @@ -273,6 +273,9 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form { return empty($errors) ? TRUE : $errors; } + /** + * @return int + */ function setDefaultValues() { if ($this->_action & CRM_Core_Action::ADD) { $defaults['is_active'] = 1; diff --git a/CRM/Admin/Form/Setting.php b/CRM/Admin/Form/Setting.php index 57e8d1cdf3..6c54d01e06 100644 --- a/CRM/Admin/Form/Setting.php +++ b/CRM/Admin/Form/Setting.php @@ -180,6 +180,9 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { self::commonProcess($params); } + /** + * @param $params + */ public function commonProcess(&$params) { // save autocomplete search options diff --git a/CRM/Admin/Form/Setting/Component.php b/CRM/Admin/Form/Setting/Component.php index 762f308fa5..ec318c3003 100644 --- a/CRM/Admin/Form/Setting/Component.php +++ b/CRM/Admin/Form/Setting/Component.php @@ -95,6 +95,9 @@ class CRM_Admin_Form_Setting_Component extends CRM_Admin_Form_Setting { return $errors; } + /** + * @return array + */ private function _getComponentSelectValues() { $ret = array(); $this->_components = CRM_Core_Component::getComponents(); @@ -115,6 +118,11 @@ class CRM_Admin_Form_Setting_Component extends CRM_Admin_Form_Setting { CRM_Core_BAO_Navigation::resetNavigation(); } + /** + * @param $dsn + * @param $fileName + * @param bool $lineMode + */ public static function loadCaseSampleData($dsn, $fileName, $lineMode = FALSE) { global $crmPath; diff --git a/CRM/Admin/Form/Setting/Localization.php b/CRM/Admin/Form/Setting/Localization.php index 125315d2e6..936e7bcd2f 100644 --- a/CRM/Admin/Form/Setting/Localization.php +++ b/CRM/Admin/Form/Setting/Localization.php @@ -195,6 +195,11 @@ class CRM_Admin_Form_Setting_Localization extends CRM_Admin_Form_Setting { parent::buildQuickForm(); } + /** + * @param $fields + * + * @return array|bool + */ static function formRule($fields) { $errors = array(); if (CRM_Utils_Array::value('monetaryThousandSeparator', $fields) == diff --git a/CRM/Admin/Form/Setting/Mail.php b/CRM/Admin/Form/Setting/Mail.php index 6bdcdcec26..1736a2b61e 100644 --- a/CRM/Admin/Form/Setting/Mail.php +++ b/CRM/Admin/Form/Setting/Mail.php @@ -67,6 +67,11 @@ class CRM_Admin_Form_Setting_Mail extends CRM_Admin_Form_Setting { parent::buildQuickForm($check); } + /** + * @param $fields + * + * @return array|bool + */ static function formRule($fields) { $errors = array(); diff --git a/CRM/Admin/Form/Setting/UpdateConfigBackend.php b/CRM/Admin/Form/Setting/UpdateConfigBackend.php index d1179cd092..b3d096db63 100644 --- a/CRM/Admin/Form/Setting/UpdateConfigBackend.php +++ b/CRM/Admin/Form/Setting/UpdateConfigBackend.php @@ -91,6 +91,11 @@ class CRM_Admin_Form_Setting_UpdateConfigBackend extends CRM_Admin_Form_Setting return $this->_defaults; } + /** + * @param $fields + * + * @return array + */ static function formRule($fields) { $tmpDir = trim($fields['newBaseDir']); diff --git a/CRM/Admin/Form/Setting/Url.php b/CRM/Admin/Form/Setting/Url.php index ceb0ccd8d2..375354e659 100644 --- a/CRM/Admin/Form/Setting/Url.php +++ b/CRM/Admin/Form/Setting/Url.php @@ -68,6 +68,11 @@ class CRM_Admin_Form_Setting_Url extends CRM_Admin_Form_Setting { parent::buildQuickForm(); } + /** + * @param $fields + * + * @return array|bool + */ static function formRule($fields) { if (isset($fields['enableSSL']) && $fields['enableSSL'] diff --git a/CRM/Admin/Form/WordReplacements.php b/CRM/Admin/Form/WordReplacements.php index 6541733855..21a1d99c06 100644 --- a/CRM/Admin/Form/WordReplacements.php +++ b/CRM/Admin/Form/WordReplacements.php @@ -57,6 +57,9 @@ class CRM_Admin_Form_WordReplacements extends CRM_Core_Form { CRM_Utils_System::appendBreadCrumb($breadCrumb); } + /** + * @return array + */ public function setDefaultValues() { if ($this->_defaults !== NULL) { return $this->_defaults; diff --git a/CRM/Admin/Page/APIDoc.php b/CRM/Admin/Page/APIDoc.php index 51a5440cc2..88ada1dc17 100644 --- a/CRM/Admin/Page/APIDoc.php +++ b/CRM/Admin/Page/APIDoc.php @@ -38,11 +38,17 @@ */ class CRM_Admin_Page_APIDoc extends CRM_Core_Page { + /** + * @return string + */ function run() { CRM_Utils_System::setTitle(ts('API parameters')); return parent::run(); } + /** + * @return string + */ function getTemplateFileName() { return 'CRM/Core/APIDoc.tpl'; } diff --git a/CRM/Admin/Page/APIExplorer.php b/CRM/Admin/Page/APIExplorer.php index a1902553f3..809fb95f84 100644 --- a/CRM/Admin/Page/APIExplorer.php +++ b/CRM/Admin/Page/APIExplorer.php @@ -38,6 +38,9 @@ */ class CRM_Admin_Page_APIExplorer extends CRM_Core_Page { + /** + * @return string + */ function run() { CRM_Utils_System::setTitle(ts('API explorer and generator')); CRM_Core_Resources::singleton() diff --git a/CRM/Admin/Page/Access.php b/CRM/Admin/Page/Access.php index acdd2a03bf..56ab09f7c5 100644 --- a/CRM/Admin/Page/Access.php +++ b/CRM/Admin/Page/Access.php @@ -38,6 +38,9 @@ * For initial version, this page only contains static links - so this class is empty for now. */ class CRM_Admin_Page_Access extends CRM_Core_Page { + /** + * @return string + */ function run() { $config = CRM_Core_Config::singleton(); diff --git a/CRM/Admin/Page/Admin.php b/CRM/Admin/Page/Admin.php index 58d8992d32..11d7f1e2bd 100644 --- a/CRM/Admin/Page/Admin.php +++ b/CRM/Admin/Page/Admin.php @@ -37,6 +37,9 @@ * Page for displaying Administer CiviCRM Control Panel */ class CRM_Admin_Page_Admin extends CRM_Core_Page { + /** + * @return string + */ function run() { $errorMessage = ''; // ensure that all CiviCRM tables are InnoDB, else abort diff --git a/CRM/Admin/Page/ConfigTaskList.php b/CRM/Admin/Page/ConfigTaskList.php index 25a2324def..d1a196c9e3 100644 --- a/CRM/Admin/Page/ConfigTaskList.php +++ b/CRM/Admin/Page/ConfigTaskList.php @@ -37,6 +37,9 @@ * Page for displaying list of site configuration tasks with links to each setting form */ class CRM_Admin_Page_ConfigTaskList extends CRM_Core_Page { + /** + * @return string + */ function run() { CRM_Utils_System::setTitle(ts("Configuration Checklist")); diff --git a/CRM/Admin/Page/MessageTemplates.php b/CRM/Admin/Page/MessageTemplates.php index 8974e7c4ce..44d4f0b0c2 100644 --- a/CRM/Admin/Page/MessageTemplates.php +++ b/CRM/Admin/Page/MessageTemplates.php @@ -52,6 +52,10 @@ class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic { // set to the id that we’re reverting at the given moment (if we are) protected $_revertedId; + /** + * @param null $title + * @param null $mode + */ function __construct($title = NULL, $mode = NULL) { parent::__construct($title, $mode); @@ -132,6 +136,14 @@ class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic { return self::$_links; } + /** + * @param CRM_Core_DAO $object + * @param int $action + * @param array $values + * @param array $links + * @param string $permission + * @param bool $forceAction + */ function action(&$object, $action, &$values, &$links, $permission, $forceAction = FALSE) { if ($object->workflow_id) { // do not expose action link for reverting to default if the template did not diverge or we just reverted it now @@ -168,6 +180,13 @@ class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic { } } + /** + * @param null $args + * @param null $pageArgs + * @param null $sort + * + * @throws Exception + */ function run($args = NULL, $pageArgs = NULL, $sort = NULL) { // handle the revert action and offload the rest to parent if (CRM_Utils_Request::retrieve('action', 'String', $this) & CRM_Core_Action::REVERT) { diff --git a/CRM/Admin/Page/ParticipantStatus.php b/CRM/Admin/Page/ParticipantStatus.php index 2f0a719e2d..ce5c78dbcf 100644 --- a/CRM/Admin/Page/ParticipantStatus.php +++ b/CRM/Admin/Page/ParticipantStatus.php @@ -35,10 +35,17 @@ class CRM_Admin_Page_ParticipantStatus extends CRM_Core_Page_Basic { public $useLivePageJS = TRUE; + + /** + * @return string + */ function getBAOName() { return 'CRM_Event_BAO_ParticipantStatusType'; } + /** + * @return array + */ function &links() { static $links = NULL; if ($links === NULL) { @@ -107,14 +114,25 @@ class CRM_Admin_Page_ParticipantStatus extends CRM_Core_Page_Basic { $this->assign('rows', $statusTypes); } + /** + * @return string + */ function editForm() { return 'CRM_Admin_Form_ParticipantStatus'; } + /** + * @return string + */ function editName() { return 'Participant Status'; } + /** + * @param null $mode + * + * @return string + */ function userContext($mode = NULL) { return 'civicrm/admin/participant_status'; } diff --git a/CRM/Admin/Page/Persistent.php b/CRM/Admin/Page/Persistent.php index c18ec0fb53..b467d1c47a 100644 --- a/CRM/Admin/Page/Persistent.php +++ b/CRM/Admin/Page/Persistent.php @@ -67,6 +67,9 @@ class CRM_Admin_Page_Persistent extends CRM_Core_Page { return self::$_stringActionLinks; } + /** + * @return array + */ function &customizeActionLinks() { // check if variable _actionsLinks is populated if (!isset(self::$_customizeActionLinks)) { diff --git a/CRM/Admin/Page/Setting.php b/CRM/Admin/Page/Setting.php index 911f0437a8..2b831f9626 100644 --- a/CRM/Admin/Page/Setting.php +++ b/CRM/Admin/Page/Setting.php @@ -37,6 +37,10 @@ * Page for displaying list of categories for Settings */ class CRM_Admin_Page_Setting extends CRM_Core_Page { + /** + * @return string + * @throws Exception + */ function run() { CRM_Core_Error::fatal('This page is deprecated. If you have followed a link or have been redirected here, please change link or redirect to Admin Console (/civicrm/admin?reset=1)'); CRM_Utils_System::setTitle(ts("Global Settings")); diff --git a/CRM/Badge/BAO/Badge.php b/CRM/Badge/BAO/Badge.php index 42da2026ce..0147d4cdf1 100644 --- a/CRM/Badge/BAO/Badge.php +++ b/CRM/Badge/BAO/Badge.php @@ -139,7 +139,7 @@ class CRM_Badge_BAO_Badge { } if (!empty($layout['data']['alignment_participant_image'])) { $formattedRow['alignment_participant_image'] = $layout['data']['alignment_participant_image']; - } + } if (!empty($layout['data']['add_barcode'])) { $formattedRow['barcode'] = array( @@ -154,6 +154,9 @@ class CRM_Badge_BAO_Badge { return $formattedRow; } + /** + * @param $formattedRow + */ public function generateLabel($formattedRow) { switch ($formattedRow['labelFormat']) { case 'A6 Badge Portrait 150x106': @@ -167,6 +170,10 @@ class CRM_Badge_BAO_Badge { } } + /** + * @param $formattedRow + * @param int $cellspacing + */ public function labelCreator(&$formattedRow, $cellspacing = 0) { $this->lMarginLogo = 18; $this->tMarginName = 20; @@ -228,8 +235,8 @@ class CRM_Badge_BAO_Badge { $value = ''; if ($formattedRow['token'][$i]['token'] != 'spacer') { $value = $formattedRow['token'][$i]['value']; - } - + } + $xAlign = $x; $rowWidth = $this->pdf->width; if (!empty($formattedRow['participant_image']) && !empty($formattedRow['width_participant_image'])) { @@ -370,6 +377,14 @@ class CRM_Badge_BAO_Badge { $this->pdf->SetXY($x, $y); } + /** + * @param $img + * @param int $imgRes + * @param null $w + * @param null $h + * + * @return array + */ static function getImageProperties($img, $imgRes = 300, $w = NULL, $h = NULL) { $imgsize = getimagesize($img); $f = $imgRes / 25.4; diff --git a/CRM/Badge/Form/Layout.php b/CRM/Badge/Form/Layout.php index 66ba783d69..707ada6bff 100644 --- a/CRM/Badge/Form/Layout.php +++ b/CRM/Badge/Form/Layout.php @@ -90,7 +90,7 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form { $fontNames = CRM_Core_BAO_LabelFormat::getFontNames('name_badge'); $textAlignment = CRM_Core_BAO_LabelFormat::getTextAlignments(); $imageAlignment = $textAlignment; - unset($imageAlignment['C']); + unset($imageAlignment['C']); $rowCount = self::FIELD_ROWCOUNT; for ( $i =1; $i <= $rowCount; $i++ ) { @@ -222,6 +222,9 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form { } } + /** + * @param $params + */ public function buildPreview(&$params) { // get a max participant id $participantID = CRM_Core_DAO::singleValueQuery('select max(id) from civicrm_participant'); diff --git a/CRM/Batch/BAO/Batch.php b/CRM/Batch/BAO/Batch.php index a756411917..a97216f6f7 100644 --- a/CRM/Batch/BAO/Batch.php +++ b/CRM/Batch/BAO/Batch.php @@ -606,6 +606,10 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch { } } + /** + * @param array $batchIds + * @param $status + */ static function closeReOpen($batchIds = array(), $status) { $batchStatus = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'status_id'); $params['status_id'] = CRM_Utils_Array::key( $status, $batchStatus ); diff --git a/CRM/Batch/Form/Search.php b/CRM/Batch/Form/Search.php index bd4ac56f48..fc8149492d 100644 --- a/CRM/Batch/Form/Search.php +++ b/CRM/Batch/Form/Search.php @@ -33,6 +33,9 @@ * */ class CRM_Batch_Form_Search extends CRM_Core_Form { + /** + * @return array + */ function setDefaultValues() { $defaults = array(); diff --git a/CRM/Bridge/OG/CiviCRM.php b/CRM/Bridge/OG/CiviCRM.php index 08cf1a8a1b..384780bd93 100644 --- a/CRM/Bridge/OG/CiviCRM.php +++ b/CRM/Bridge/OG/CiviCRM.php @@ -34,6 +34,11 @@ */ class CRM_Bridge_OG_CiviCRM { + /** + * @param $groupID + * @param $group + * @param $op + */ static function group($groupID, $group, $op) { if ($op == 'add') { self::groupAdd($groupID, $group); @@ -43,6 +48,10 @@ class CRM_Bridge_OG_CiviCRM { } } + /** + * @param $groupID + * @param $group + */ static function groupAdd($groupID, $group) { $ogID = CRM_Bridge_OG_Utils::ogID($groupID, FALSE); @@ -73,6 +82,10 @@ class CRM_Bridge_OG_CiviCRM { ); } + /** + * @param $groupID + * @param $group + */ static function groupDelete($groupID, $group) { $ogID = CRM_Bridge_OG_Utils::ogID($groupID, FALSE); if (!$ogID) { @@ -82,6 +95,11 @@ class CRM_Bridge_OG_CiviCRM { node_delete($ogID); } + /** + * @param $groupID + * @param $contactIDs + * @param $op + */ static function groupContact($groupID, $contactIDs, $op) { $config = CRM_Core_Config::singleton(); $ogID = CRM_Bridge_OG_Utils::ogID($groupID, FALSE); diff --git a/CRM/Bridge/OG/Drupal.php b/CRM/Bridge/OG/Drupal.php index 854334e5b7..58c4cb83c9 100644 --- a/CRM/Bridge/OG/Drupal.php +++ b/CRM/Bridge/OG/Drupal.php @@ -36,6 +36,10 @@ // d6 compatible class CRM_Bridge_OG_Drupal { + /** + * @param $params + * @param $op + */ static function nodeapi(&$params, $op) { $transaction = new CRM_Core_Transaction(); @@ -63,6 +67,11 @@ class CRM_Bridge_OG_Drupal { $transaction->commit(); } + /** + * @param $params + * @param $op + * @param null $groupType + */ static function updateCiviGroup(&$params, $op, $groupType = NULL) { $abort = false; $params['version'] = 3; @@ -88,6 +97,10 @@ class CRM_Bridge_OG_Drupal { unset($params['id']); } + /** + * @param $aclParams + * @param $op + */ static function updateCiviACLTables($aclParams, $op) { if ($op == 'delete') { self::updateCiviACL($aclParams, $op); @@ -101,6 +114,10 @@ class CRM_Bridge_OG_Drupal { } } + /** + * @param $params + * @param $op + */ static function updateCiviACLRole(&$params, $op) { $optionGroupID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', @@ -144,6 +161,10 @@ SELECT v.id $params['acl_role_id'] = $dao->value; } + /** + * @param $params + * @param $op + */ static function updateCiviACLEntityRole(&$params, $op) { $dao = new CRM_ACL_DAO_EntityRole(); @@ -162,6 +183,10 @@ SELECT v.id $params['acl_entity_role_id'] = $dao->id; } + /** + * @param $params + * @param $op + */ static function updateCiviACL(&$params, $op) { $dao = new CRM_ACL_DAO_ACL(); @@ -184,6 +209,12 @@ SELECT v.id $params['acl_id'] = $dao->id; } + /** + * @param $params + * @param $op + * + * @throws Exception + */ static function og(&$params, $op) { $contactID = CRM_Bridge_OG_Utils::contactID($params['uf_id']); diff --git a/CRM/Bridge/OG/Utils.php b/CRM/Bridge/OG/Utils.php index 62534b16bb..724dddb754 100644 --- a/CRM/Bridge/OG/Utils.php +++ b/CRM/Bridge/OG/Utils.php @@ -35,6 +35,9 @@ class CRM_Bridge_OG_Utils { CONST aclEnabled = 1, syncFromCiviCRM = 1; + /** + * @return int + */ static function aclEnabled() { return self::aclEnabled; } @@ -51,14 +54,31 @@ class CRM_Bridge_OG_Utils { return TRUE; } + /** + * @param $ogID + * + * @return string + */ static function ogSyncName($ogID) { return "OG Sync Group :{$ogID}:"; } + /** + * @param $ogID + * + * @return string + */ static function ogSyncACLName($ogID) { return "OG Sync Group ACL :{$ogID}:"; } + /** + * @param $groupID + * @param bool $abort + * + * @return int|null|string + * @throws Exception + */ static function ogID($groupID, $abort = TRUE) { $source = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Group', $groupID, @@ -77,6 +97,12 @@ class CRM_Bridge_OG_Utils { return NULL; } + /** + * @param $ufID + * + * @return int + * @throws Exception + */ static function contactID($ufID) { $contactID = CRM_Core_BAO_UFMatch::getContactId($ufID); if ($contactID) { @@ -94,6 +120,14 @@ class CRM_Bridge_OG_Utils { return $contactID; } + /** + * @param $source + * @param null $title + * @param bool $abort + * + * @return null|string + * @throws Exception + */ static function groupID($source, $title = NULL, $abort = FALSE) { $query = " SELECT id diff --git a/CRM/Campaign/Page/Vote.php b/CRM/Campaign/Page/Vote.php index 7457cf8641..d0a4e67652 100644 --- a/CRM/Campaign/Page/Vote.php +++ b/CRM/Campaign/Page/Vote.php @@ -53,6 +53,9 @@ class CRM_Campaign_Page_Vote extends CRM_Core_Page { return $controller->run(); } + /** + * @return mixed + */ function interview() { //build interview and release voter interface. $controller = new CRM_Core_Controller_Simple('CRM_Campaign_Form_Task_Interview', ts('Interview Respondents')); diff --git a/CRM/Contact/Form/Search/Custom/DateAdded.php b/CRM/Contact/Form/Search/Custom/DateAdded.php index 1511d59440..c762cd79d0 100644 --- a/CRM/Contact/Form/Search/Custom/DateAdded.php +++ b/CRM/Contact/Form/Search/Custom/DateAdded.php @@ -403,6 +403,9 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C } } + /** + * @return mixed + */ function count() { $sql = $this->all(); diff --git a/CRM/Custom/Form/ChangeFieldType.php b/CRM/Custom/Form/ChangeFieldType.php index 4f3d0d7c52..bc57ce0c79 100644 --- a/CRM/Custom/Form/ChangeFieldType.php +++ b/CRM/Custom/Form/ChangeFieldType.php @@ -195,6 +195,12 @@ class CRM_Custom_Form_ChangeFieldType extends CRM_Core_Form { ), ts('Field Type Changed'), 'success'); } + /** + * @param $dataType + * @param $htmlType + * + * @return array|null + */ static function fieldTypeTransitions($dataType, $htmlType) { // Text field is single value field, // can not be change to other single value option which contains option group @@ -293,6 +299,11 @@ class CRM_Custom_Form_ChangeFieldType extends CRM_Core_Form { } } + /** + * @param $str + * + * @return array + */ static function explode($str) { if (empty($str) || $str == CRM_Core_DAO::VALUE_SEPARATOR . CRM_Core_DAO::VALUE_SEPARATOR) { return array(); diff --git a/CRM/Custom/Form/CustomData.php b/CRM/Custom/Form/CustomData.php index e1f721438c..84caed3467 100644 --- a/CRM/Custom/Form/CustomData.php +++ b/CRM/Custom/Form/CustomData.php @@ -145,6 +145,11 @@ class CRM_Custom_Form_CustomData { } } + /** + * @param $form + * + * @return array + */ static function setDefaultValues(&$form) { $defaults = array(); CRM_Core_BAO_CustomGroup::setDefaults($form->_groupTree, $defaults, FALSE, FALSE, $form->get('action')); diff --git a/CRM/Custom/Form/Group.php b/CRM/Custom/Form/Group.php index 82720dcc0a..912ad98c87 100644 --- a/CRM/Custom/Form/Group.php +++ b/CRM/Custom/Form/Group.php @@ -536,6 +536,11 @@ class CRM_Custom_Form_Group extends CRM_Core_Form { * @static * return array array of relationship name. */ + /** + * @param $list + * + * @return array + */ static function getFormattedList(&$list) { $relName = array(); diff --git a/CRM/Custom/Form/MoveField.php b/CRM/Custom/Form/MoveField.php index 9100205b10..325bdc3529 100644 --- a/CRM/Custom/Form/MoveField.php +++ b/CRM/Custom/Form/MoveField.php @@ -141,6 +141,13 @@ class CRM_Custom_Form_MoveField extends CRM_Core_Form { $this->addFormRule(array('CRM_Custom_Form_MoveField', 'formRule'), $this); } + /** + * @param $fields + * @param $files + * @param $self + * + * @return array|bool + */ static function formRule($fields, $files, $self) { $self->_dstGID = $fields['dst_group_id']; $tmp = CRM_Core_BAO_CustomField::_moveFieldValidate($self->_srcFID, $self->_dstGID); diff --git a/CRM/Custom/Import/Form/DataSource.php b/CRM/Custom/Import/Form/DataSource.php index e29ddee448..b98c846e93 100644 --- a/CRM/Custom/Import/Form/DataSource.php +++ b/CRM/Custom/Import/Form/DataSource.php @@ -56,6 +56,9 @@ class CRM_Custom_Import_Form_DataSource extends CRM_Core_Form { $session->pushUserContext(CRM_Utils_System::url('civicrm/import/custom', $params)); } + /** + * @return array + */ function setDefaultValues() { $config = CRM_Core_Config::singleton(); $defaults = array( @@ -212,4 +215,4 @@ class CRM_Custom_Import_Form_DataSource extends CRM_Core_Form { public function getTitle() { return ts('Upload Data'); } -} \ No newline at end of file +} diff --git a/CRM/Custom/Import/Parser.php b/CRM/Custom/Import/Parser.php index 6eee623293..1a1b1dbbc3 100644 --- a/CRM/Custom/Import/Parser.php +++ b/CRM/Custom/Import/Parser.php @@ -65,6 +65,18 @@ abstract class CRM_Custom_Import_Parser extends CRM_Contact_Import_Parser { */ protected $_haveColumnHeader; + /** + * @param $fileName + * @param string $separator + * @param int $mapper + * @param bool $skipColumnHeader + * @param int|string $mode + * @param int|string $contactType + * @param int $onDuplicate + * + * @return mixed + * @throws Exception + */ function run($fileName, $separator = ',', &$mapper, diff --git a/CRM/Dedupe/BAO/QueryBuilder.php b/CRM/Dedupe/BAO/QueryBuilder.php index 0cadd83d3e..d372dab0d8 100644 --- a/CRM/Dedupe/BAO/QueryBuilder.php +++ b/CRM/Dedupe/BAO/QueryBuilder.php @@ -4,6 +4,13 @@ * Class CRM_Dedupe_BAO_QueryBuilder */ class CRM_Dedupe_BAO_QueryBuilder { + /** + * @param $rg + * @param string $strID1 + * @param string $strID2 + * + * @return string + */ static function internalFilters( $rg, $strID1 = 'contact1.id', $strID2 = 'contact2.id' ) { // Add a contact id filter for dedupe by group requests and add logic // to remove duplicate results with opposing orders, i.e. 1,2 and 2,1 diff --git a/CRM/Dedupe/BAO/QueryBuilder/IndividualGeneral.php b/CRM/Dedupe/BAO/QueryBuilder/IndividualGeneral.php index f33c239b3e..6438c7f382 100644 --- a/CRM/Dedupe/BAO/QueryBuilder/IndividualGeneral.php +++ b/CRM/Dedupe/BAO/QueryBuilder/IndividualGeneral.php @@ -5,6 +5,11 @@ * Class CRM_Dedupe_BAO_QueryBuilder_IndividualGeneral */ class CRM_Dedupe_BAO_QueryBuilder_IndividualGeneral extends CRM_Dedupe_BAO_QueryBuilder { + /** + * @param $rg + * + * @return array + */ static function record($rg) { $civicrm_contact = CRM_Utils_Array::value('civicrm_contact', $rg->params); $civicrm_address = CRM_Utils_Array::value('civicrm_address', $rg->params); @@ -39,6 +44,11 @@ class CRM_Dedupe_BAO_QueryBuilder_IndividualGeneral extends CRM_Dedupe_BAO_Query return array("civicrm_contact.{$rg->name}.{$rg->threshold}" => $query); } + /** + * @param $rg + * + * @return array + */ static function internal($rg) { $query = " SELECT contact1.id id1, contact2.id id2, {$rg->threshold} weight diff --git a/CRM/Dedupe/BAO/QueryBuilder/IndividualSupervised.php b/CRM/Dedupe/BAO/QueryBuilder/IndividualSupervised.php index 4608dee84f..273beaae5f 100644 --- a/CRM/Dedupe/BAO/QueryBuilder/IndividualSupervised.php +++ b/CRM/Dedupe/BAO/QueryBuilder/IndividualSupervised.php @@ -6,6 +6,11 @@ */ class CRM_Dedupe_BAO_QueryBuilder_IndividualSupervised extends CRM_Dedupe_BAO_QueryBuilder { + /** + * @param $rg + * + * @return array + */ static function record($rg) { $civicrm_contact = CRM_Utils_Array::value('civicrm_contact', $rg->params, array()); @@ -29,6 +34,11 @@ class CRM_Dedupe_BAO_QueryBuilder_IndividualSupervised extends CRM_Dedupe_BAO_Qu ); } + /** + * @param $rg + * + * @return array + */ static function internal($rg) { $query = " SELECT contact1.id as id1, contact2.id as id2, {$rg->threshold} as weight diff --git a/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php b/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php index 7c0d55d3cf..d15599d8d7 100644 --- a/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php +++ b/CRM/Dedupe/BAO/QueryBuilder/IndividualUnsupervised.php @@ -30,6 +30,11 @@ */ class CRM_Dedupe_BAO_QueryBuilder_IndividualUnsupervised extends CRM_Dedupe_BAO_QueryBuilder { + /** + * @param $rg + * + * @return array + */ static function record($rg) { $civicrm_email = CRM_Utils_Array::value('civicrm_email', $rg->params, array()); @@ -47,6 +52,11 @@ class CRM_Dedupe_BAO_QueryBuilder_IndividualUnsupervised extends CRM_Dedupe_BAO_ ); } + /** + * @param $rg + * + * @return array + */ static function internal($rg) { $query = " SELECT contact1.id as id1, contact2.id as id2, {$rg->threshold} as weight diff --git a/CRM/Dedupe/BAO/Rule.php b/CRM/Dedupe/BAO/Rule.php index 6541257855..e8bfb88d2e 100644 --- a/CRM/Dedupe/BAO/Rule.php +++ b/CRM/Dedupe/BAO/Rule.php @@ -208,6 +208,12 @@ class CRM_Dedupe_BAO_Rule extends CRM_Dedupe_DAO_Rule { return $ruleFields; } + /** + * @param $cid + * @param $oid + * + * @return bool + */ static function validateContacts($cid, $oid) { if (!$cid || !$oid) { return; diff --git a/CRM/Dedupe/BAO/RuleGroup.php b/CRM/Dedupe/BAO/RuleGroup.php index 28048a1c60..9e5076d4d6 100644 --- a/CRM/Dedupe/BAO/RuleGroup.php +++ b/CRM/Dedupe/BAO/RuleGroup.php @@ -267,6 +267,13 @@ class CRM_Dedupe_BAO_RuleGroup extends CRM_Dedupe_DAO_RuleGroup { // Function to determine if a given query set contains inclusive or exclusive set of weights. // The function assumes that the query set is already ordered by weight in desc order. + /** + * @param $tableQueries + * @param $threshold + * @param array $exclWeightSum + * + * @return array + */ static function isQuerySetInclusive($tableQueries, $threshold, $exclWeightSum = array( )) { $input = array(); @@ -301,6 +308,9 @@ class CRM_Dedupe_BAO_RuleGroup extends CRM_Dedupe_DAO_RuleGroup { } // sort queries by number of records for the table associated with them + /** + * @param $tableQueries + */ static function orderByTableCount(&$tableQueries) { static $tableCount = array(); diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index 6186aa06c0..ef3a6261a7 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -37,6 +37,9 @@ class CRM_Dedupe_Merger { // FIXME: consider creating a common structure with cidRefs() and eidRefs() // FIXME: the sub-pages references by the URLs should // be loaded dynamically on the merge form instead + /** + * @return array + */ static function relTables() { static $relTables; @@ -345,6 +348,15 @@ INNER JOIN civicrm_participant participant ON ( participant.id = payment.partic return $sqls; } + /** + * @param $mainId + * @param $otherId + * @param $tableName + * @param array $tableOperations + * @param string $mode + * + * @return array + */ static function operationSql($mainId, $otherId, $tableName, $tableOperations = array(), $mode = 'add') { $sqls = array(); if (!$tableName || !$mainId || !$otherId) { diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index 2940f68d0d..d50c91ffa0 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -1221,6 +1221,11 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c CRM_Utils_System::civiExit(); } + /** + * @param $customSearchClass + * @param $formValues + * @param $order + */ static function exportCustom($customSearchClass, $formValues, $order) { $ext = CRM_Extension_System::singleton()->getMapper(); if (!$ext->isExtensionClass($customSearchClass)) { @@ -1265,6 +1270,11 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c CRM_Utils_System::civiExit(); } + /** + * @param $query + * @param $sqlColumns + * @param $field + */ static function sqlColumnDefn(&$query, &$sqlColumns, $field) { if (substr($field, -4) == '_a_b' || substr($field, -4) == '_b_a') { return; @@ -1375,6 +1385,11 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c } } + /** + * @param $tableName + * @param $details + * @param $sqlColumns + */ static function writeDetailsToTable($tableName, &$details, &$sqlColumns) { if (empty($details)) { return; @@ -1418,6 +1433,11 @@ VALUES $sqlValueString CRM_Core_DAO::executeQuery($sql); } + /** + * @param $sqlColumns + * + * @return string + */ static function createTempTable(&$sqlColumns) { //creating a temporary table for the search result that need be exported $exportTempTable = CRM_Core_DAO::createTempTableName('civicrm_export', TRUE); @@ -1458,6 +1478,12 @@ CREATE TABLE {$exportTempTable} ( return $exportTempTable; } + /** + * @param $tableName + * @param $headerRows + * @param $sqlColumns + * @param $exportParams + */ static function mergeSameAddress($tableName, &$headerRows, &$sqlColumns, $exportParams) { // check if any records are present based on if they have used shared address feature, // and not based on if city / state .. matches. @@ -1560,6 +1586,12 @@ WHERE id IN ( $deleteIDString ) } } + /** + * @param $contactId + * @param $exportParams + * + * @return array + */ static function _replaceMergeTokens($contactId, $exportParams) { $greetings = array(); $contact = NULL; @@ -1616,6 +1648,13 @@ WHERE id IN ( $deleteIDString ) return $parsedString; } + /** + * @param $sql + * @param $exportParams + * @param bool $sharedAddress + * + * @return array + */ static function _buildMasterCopyArray($sql, $exportParams, $sharedAddress = FALSE) { static $contactGreetingTokens = array(); @@ -1794,6 +1833,14 @@ GROUP BY civicrm_primary_id "; CRM_Core_DAO::executeQuery($query); } + /** + * @param $exportTempTable + * @param $headerRows + * @param $sqlColumns + * @param $exportMode + * @param null $saveFile + * @param string $batchItems + */ static function writeCSVFromTable($exportTempTable, $headerRows, $sqlColumns, $exportMode, $saveFile = null, $batchItems = '') { $writeHeader = TRUE; $offset = 0; diff --git a/CRM/Export/Form/Select.php b/CRM/Export/Form/Select.php index c31b600fec..03dcb99128 100644 --- a/CRM/Export/Form/Select.php +++ b/CRM/Export/Form/Select.php @@ -491,6 +491,9 @@ FROM {$this->_componentTable} } } + /** + * @return array + */ static function getGreetingOptions() { $options = array(); $greetings = array( diff --git a/CRM/Extension/Browser.php b/CRM/Extension/Browser.php index 2bb17c2ff8..fa46980699 100644 --- a/CRM/Extension/Browser.php +++ b/CRM/Extension/Browser.php @@ -67,6 +67,9 @@ class CRM_Extension_Browser { return (FALSE !== $this->getRepositoryUrl()); } + /** + * @return string + */ public function getRepositoryUrl() { return $this->repoUrl; } @@ -147,6 +150,10 @@ class CRM_Extension_Browser { } } + /** + * @return array + * @throws CRM_Extension_Exception_ParseException + */ private function _discoverRemote() { $tsPath = $this->getTsPath(); $timestamp = FALSE; @@ -183,6 +190,9 @@ class CRM_Extension_Browser { return $this->_remotesDiscovered; } + /** + * @return array + */ private function grabCachedKeyList() { $result = array(); $cachedPath = $this->cacheDir . DIRECTORY_SEPARATOR; @@ -291,6 +301,9 @@ class CRM_Extension_Browser { } } + /** + * @return string + */ private function getTsPath() { return $this->cacheDir . DIRECTORY_SEPARATOR . 'timestamp.txt'; } diff --git a/CRM/Extension/Container/Static.php b/CRM/Extension/Container/Static.php index 4aa2277590..e40369b4db 100644 --- a/CRM/Extension/Container/Static.php +++ b/CRM/Extension/Container/Static.php @@ -36,6 +36,9 @@ * scanned for extensions. */ class CRM_Extension_Container_Static implements CRM_Extension_Container_Interface { + /** + * @param $exts + */ public function __construct($exts) { $this->exts = $exts; } @@ -83,6 +86,11 @@ class CRM_Extension_Container_Static implements CRM_Extension_Container_Interfac public function refresh() { } + /** + * @param $key + * + * @throws CRM_Extension_Exception_MissingException + */ protected function getExt($key) { if (isset($this->exts[$key])) { return $this->exts[$key]; diff --git a/CRM/Extension/Info.php b/CRM/Extension/Info.php index 5f662f8a27..ef30b76dc5 100644 --- a/CRM/Extension/Info.php +++ b/CRM/Extension/Info.php @@ -80,6 +80,13 @@ class CRM_Extension_Info { return $instance; } + /** + * @param null $key + * @param null $type + * @param null $name + * @param null $label + * @param null $file + */ function __construct($key = NULL, $type = NULL, $name = NULL, $label = NULL, $file = NULL) { $this->key = $key; $this->type = $type; diff --git a/CRM/Extension/Manager.php b/CRM/Extension/Manager.php index 2b5f48a93e..1d3da982f4 100644 --- a/CRM/Extension/Manager.php +++ b/CRM/Extension/Manager.php @@ -455,6 +455,11 @@ class CRM_Extension_Manager { } } + /** + * @param CRM_Extension_Info $info + * + * @return bool + */ private function _createExtensionEntry(CRM_Extension_Info $info) { $dao = new CRM_Core_DAO_Extension(); $dao->label = $info->label; @@ -466,6 +471,11 @@ class CRM_Extension_Manager { return (bool) ($dao->insert()); } + /** + * @param CRM_Extension_Info $info + * + * @return bool + */ private function _updateExtensionEntry(CRM_Extension_Info $info) { $dao = new CRM_Core_DAO_Extension(); $dao->full_name = $info->key; @@ -482,6 +492,11 @@ class CRM_Extension_Manager { } } + /** + * @param CRM_Extension_Info $info + * + * @throws CRM_Extension_Exception + */ private function _removeExtensionEntry(CRM_Extension_Info $info) { $dao = new CRM_Core_DAO_Extension(); $dao->full_name = $info->key; @@ -494,6 +509,10 @@ class CRM_Extension_Manager { } // else: post-condition already satisified } + /** + * @param CRM_Extension_Info $info + * @param $isActive + */ private function _setExtensionActive(CRM_Extension_Info $info, $isActive) { CRM_Core_DAO::executeQuery('UPDATE civicrm_extension SET is_active = %1 where full_name = %2', array( 1 => array($isActive, 'Integer'), diff --git a/CRM/Extension/Manager/Interface.php b/CRM/Extension/Manager/Interface.php index 5b6e7d487b..8ea9363928 100644 --- a/CRM/Extension/Manager/Interface.php +++ b/CRM/Extension/Manager/Interface.php @@ -59,7 +59,18 @@ interface CRM_Extension_Manager_Interface { */ public function onPostPostInstall(CRM_Extension_Info $info); + /** + * @param CRM_Extension_Info $info + * + * @return mixed + */ public function onPreEnable(CRM_Extension_Info $info); + + /** + * @param CRM_Extension_Info $info + * + * @return mixed + */ public function onPostEnable(CRM_Extension_Info $info); /** @@ -98,6 +109,18 @@ interface CRM_Extension_Manager_Interface { */ public function onPostUninstall(CRM_Extension_Info $info); + /** + * @param CRM_Extension_Info $oldInfo + * @param CRM_Extension_Info $newInfo + * + * @return mixed + */ public function onPreReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo); - public function onPostReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo); + + /** + * @param CRM_Extension_Info $oldInfo + * @param CRM_Extension_Info $newInfo + * + * @return mixed + */public function onPostReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo); } diff --git a/CRM/Extension/Manager/Module.php b/CRM/Extension/Manager/Module.php index 61796bf395..c0e9c05c03 100644 --- a/CRM/Extension/Manager/Module.php +++ b/CRM/Extension/Manager/Module.php @@ -35,20 +35,33 @@ */ class CRM_Extension_Manager_Module extends CRM_Extension_Manager_Base { + /** + * @param CRM_Extension_Mapper $mapper + */ public function __construct(CRM_Extension_Mapper $mapper) { parent::__construct(FALSE); $this->mapper = $mapper; } + /** + * @param CRM_Extension_Info $info + */ public function onPreInstall(CRM_Extension_Info $info) { $this->callHook($info, 'install'); $this->callHook($info, 'enable'); } + /** + * @param CRM_Extension_Info $info + */ public function onPostPostInstall(CRM_Extension_Info $info) { $this->callHook($info, 'postInstall'); } + /** + * @param CRM_Extension_Info $info + * @param $hookName + */ private function callHook(CRM_Extension_Info $info, $hookName) { try { $file = $this->mapper->keyToPath($info->key); @@ -65,18 +78,32 @@ class CRM_Extension_Manager_Module extends CRM_Extension_Manager_Base { } } + /** + * @param CRM_Extension_Info $info + * + * @return bool + */ public function onPreUninstall(CRM_Extension_Info $info) { $this->callHook($info, 'uninstall'); return TRUE; } + /** + * @param CRM_Extension_Info $info + */ public function onPostUninstall(CRM_Extension_Info $info) { } + /** + * @param CRM_Extension_Info $info + */ public function onPreDisable(CRM_Extension_Info $info) { $this->callHook($info, 'disable'); } + /** + * @param CRM_Extension_Info $info + */ public function onPreEnable(CRM_Extension_Info $info) { $this->callHook($info, 'enable'); } diff --git a/CRM/Extension/Manager/Payment.php b/CRM/Extension/Manager/Payment.php index 9f1b81adc7..1e0b2ac09c 100644 --- a/CRM/Extension/Manager/Payment.php +++ b/CRM/Extension/Manager/Payment.php @@ -40,6 +40,9 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { */ protected $mapper; + /** + * @param CRM_Extension_Mapper $mapper + */ public function __construct(CRM_Extension_Mapper $mapper) { parent::__construct(TRUE); $this->mapper = $mapper; diff --git a/CRM/Extension/Manager/Report.php b/CRM/Extension/Manager/Report.php index 908ae12539..057d0f1127 100644 --- a/CRM/Extension/Manager/Report.php +++ b/CRM/Extension/Manager/Report.php @@ -40,6 +40,9 @@ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base { */ CONST REPORT_GROUP_NAME = 'report_template'; + /** + * + */ public function __construct() { parent::__construct(TRUE); $this->groupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', @@ -47,6 +50,11 @@ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base { ); } + /** + * @param CRM_Extension_Info $info + * + * @throws Exception + */ public function onPreInstall(CRM_Extension_Info $info) { $customReports = $this->getCustomReportsByName(); if (array_key_exists($info->key, $customReports)) { @@ -81,6 +89,11 @@ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base { $optionValue = CRM_Core_BAO_OptionValue::add($params, $ids); } + /** + * @param CRM_Extension_Info $info + * + * @return bool + */ public function onPreUninstall(CRM_Extension_Info $info) { // if( !array_key_exists( $info->key, $this->customReports ) ) { @@ -95,6 +108,9 @@ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base { return $optionValue ? TRUE : FALSE; } + /** + * @param CRM_Extension_Info $info + */ public function onPreDisable(CRM_Extension_Info $info) { $customReports = $this->getCustomReportsByName(); $cr = $this->getCustomReportsById(); @@ -102,6 +118,9 @@ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base { $optionValue = CRM_Core_BAO_OptionValue::setIsActive($id, 0); } + /** + * @param CRM_Extension_Info $info + */ public function onPreEnable(CRM_Extension_Info $info) { $customReports = $this->getCustomReportsByName(); $cr = $this->getCustomReportsById(); @@ -109,10 +128,16 @@ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base { $optionValue = CRM_Core_BAO_OptionValue::setIsActive($id, 1); } + /** + * @return array + */ public function getCustomReportsByName() { return CRM_Core_OptionGroup::values(self::REPORT_GROUP_NAME, TRUE, FALSE, FALSE, NULL, 'name', FALSE, TRUE); } + /** + * @return array + */ public function getCustomReportsById() { return CRM_Core_OptionGroup::values(self::REPORT_GROUP_NAME, FALSE, FALSE, FALSE, NULL, 'id', FALSE, TRUE); } diff --git a/CRM/Extension/Manager/Search.php b/CRM/Extension/Manager/Search.php index 9d32aceb41..df95d066d6 100644 --- a/CRM/Extension/Manager/Search.php +++ b/CRM/Extension/Manager/Search.php @@ -40,6 +40,9 @@ class CRM_Extension_Manager_Search extends CRM_Extension_Manager_Base { */ CONST CUSTOM_SEARCH_GROUP_NAME = 'custom_search'; + /** + * + */ public function __construct() { parent::__construct(TRUE); $this->groupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', @@ -47,6 +50,12 @@ class CRM_Extension_Manager_Search extends CRM_Extension_Manager_Base { ); } + /** + * @param CRM_Extension_Info $info + * + * @return bool + * @throws Exception + */ public function onPreInstall(CRM_Extension_Info $info) { $customSearchesByName = $this->getCustomSearchesByName(); if (array_key_exists($info->key, $customSearchesByName)) { @@ -73,6 +82,12 @@ class CRM_Extension_Manager_Search extends CRM_Extension_Manager_Base { return $optionValue ? TRUE : FALSE; } + /** + * @param CRM_Extension_Info $info + * + * @return bool + * @throws Exception + */ public function onPreUninstall(CRM_Extension_Info $info) { $customSearchesByName = $this->getCustomSearchesByName(); if (!array_key_exists($info->key, $customSearchesByName)) { @@ -86,6 +101,9 @@ class CRM_Extension_Manager_Search extends CRM_Extension_Manager_Base { return TRUE; } + /** + * @param CRM_Extension_Info $info + */ public function onPreDisable(CRM_Extension_Info $info) { $customSearchesByName = $this->getCustomSearchesByName(); $cs = $this->getCustomSearchesById(); @@ -93,6 +111,9 @@ class CRM_Extension_Manager_Search extends CRM_Extension_Manager_Base { $optionValue = CRM_Core_BAO_OptionValue::setIsActive($id, 0); } + /** + * @param CRM_Extension_Info $info + */ public function onPreEnable(CRM_Extension_Info $info) { $customSearchesByName = $this->getCustomSearchesByName(); $cs = $this->getCustomSearchesById(); @@ -100,10 +121,16 @@ class CRM_Extension_Manager_Search extends CRM_Extension_Manager_Base { $optionValue = CRM_Core_BAO_OptionValue::setIsActive($id, 1); } + /** + * @return array + */ protected function getCustomSearchesByName() { return CRM_Core_OptionGroup::values(self::CUSTOM_SEARCH_GROUP_NAME, TRUE, FALSE, FALSE, NULL, 'name', FALSE, TRUE); } + /** + * @return array + */ protected function getCustomSearchesById() { return CRM_Core_OptionGroup::values(self::CUSTOM_SEARCH_GROUP_NAME, FALSE, FALSE, FALSE, NULL, 'id', FALSE, TRUE); } diff --git a/CRM/Extension/Mapper.php b/CRM/Extension/Mapper.php index 76ee2b9777..e393d8ee78 100755 --- a/CRM/Extension/Mapper.php +++ b/CRM/Extension/Mapper.php @@ -84,6 +84,13 @@ class CRM_Extension_Mapper { protected $civicrmUrl; + /** + * @param CRM_Extension_Container_Interface $container + * @param CRM_Utils_Cache_Interface $cache + * @param null $cacheKey + * @param null $civicrmPath + * @param null $civicrmUrl + */ public function __construct(CRM_Extension_Container_Interface $container, CRM_Utils_Cache_Interface $cache = NULL, $cacheKey = NULL, $civicrmPath = NULL, $civicrmUrl = NULL) { $this->container = $container; $this->cache = $cache; @@ -323,6 +330,11 @@ class CRM_Extension_Mapper { return $urls; } + /** + * @param $name + * + * @return bool + */ public function isActiveModule($name) { $activeModules = $this->getActiveModuleFiles(); foreach ($activeModules as $activeModule) { diff --git a/CRM/Extension/System.php b/CRM/Extension/System.php index 0ab76fa272..3d531807fc 100644 --- a/CRM/Extension/System.php +++ b/CRM/Extension/System.php @@ -68,10 +68,16 @@ class CRM_Extension_System { return self::$singleton; } + /** + * @param CRM_Extension_System $singleton + */ public static function setSingleton(CRM_Extension_System $singleton) { self::$singleton = $singleton; } + /** + * @param array $parameters + */ public function __construct($parameters = array()) { $config = CRM_Core_Config::singleton(); if (!array_key_exists('extensionsDir', $parameters)) { diff --git a/CRM/Financial/BAO/ExportFormat.php b/CRM/Financial/BAO/ExportFormat.php index f91d1f2c7a..d6105f9dde 100644 --- a/CRM/Financial/BAO/ExportFormat.php +++ b/CRM/Financial/BAO/ExportFormat.php @@ -61,11 +61,19 @@ class CRM_Financial_BAO_ExportFormat { } // Override to assemble the appropriate subset of financial data for the specific export format + /** + * @param $exportParams + * + * @return mixed + */ function export($exportParams) { $this->_exportParams = $exportParams; return $exportParams; } + /** + * @param null $fileName + */ function output($fileName = NULL) { switch ($this->getFileExtension()) { case 'csv': @@ -81,23 +89,39 @@ class CRM_Financial_BAO_ExportFormat { } } + /** + * @return string + */ function getMimeType() { return 'text/plain'; } + /** + * @return string + */ function getFileExtension() { return 'txt'; } // Override this if appropriate + /** + * @return null + */ function getTemplateFileName() { return null; } + /** + * @return object + */ static function &getTemplate() { return self::$_template; } + /** + * @param $var + * @param null $value + */ function assign($var, $value = NULL) { self::$_template->assign($var, $value); } @@ -108,6 +132,12 @@ class CRM_Financial_BAO_ExportFormat { * Depending on the output format might want to override this, e.g. for IIF tabs need to be escaped etc, * but for CSV it doesn't make sense because php has built in csv output functions. */ + /** + * @param $s + * @param string $type + * + * @return null + */ static function format($s, $type = 'string') { if (!empty($s)) { return $s; @@ -145,6 +175,12 @@ class CRM_Financial_BAO_ExportFormat { } } + /** + * @param $batchIds + * @param $fileName + * + * @throws CRM_Core_Exception + */ static function createActivityExport($batchIds, $fileName) { $session = CRM_Core_Session::singleton(); $values = array(); @@ -190,6 +226,13 @@ class CRM_Financial_BAO_ExportFormat { CRM_Activity_BAO_Activity::create($activityParams); } + /** + * @param array $files + * @param null $destination + * @param bool $overwrite + * + * @return bool + */ function createZip($files = array(), $destination = NULL, $overwrite = FALSE) { //if the zip file already exists and overwrite is false, return false if (file_exists($destination) && !$overwrite) { diff --git a/CRM/Financial/BAO/ExportFormat/CSV.php b/CRM/Financial/BAO/ExportFormat/CSV.php index 1efefc3456..f21e1c1223 100644 --- a/CRM/Financial/BAO/ExportFormat/CSV.php +++ b/CRM/Financial/BAO/ExportFormat/CSV.php @@ -54,6 +54,9 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat parent::__construct(); } + /** + * @param $exportParams + */ function export($exportParams) { $export = parent::export($exportParams); @@ -71,6 +74,11 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat $this->output($fileName); } + /** + * @param $batchId + * + * @return Object + */ function generateExportQuery($batchId) { $sql = "SELECT ft.id as financial_trxn_id, @@ -119,6 +127,11 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat return $dao; } + /** + * @param $export + * + * @return string + */ function putFile($export) { $config = CRM_Core_Config::singleton(); $fileName = $config->uploadDir.'Financial_Transactions_'.$this->_batchIds.'_'.date('YmdHis').'.'.$this->getFileExtension(); @@ -201,6 +214,9 @@ class CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat parent::initiateDownload(); } + /** + * @return string + */ function getFileExtension() { return 'csv'; } diff --git a/CRM/Financial/BAO/ExportFormat/IIF.php b/CRM/Financial/BAO/ExportFormat/IIF.php index 1bc9773e87..cb9003a6ae 100644 --- a/CRM/Financial/BAO/ExportFormat/IIF.php +++ b/CRM/Financial/BAO/ExportFormat/IIF.php @@ -58,6 +58,9 @@ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat self::$SEPARATOR = chr(9); } + /** + * @param $exportParams + */ function export( $exportParams ) { parent::export( $exportParams ); @@ -72,6 +75,11 @@ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat $this->output(); } + /** + * @param $out + * + * @return string + */ function putFile($out) { $config = CRM_Core_Config::singleton(); $fileName = $config->uploadDir.'Financial_Transactions_'.$this->_batchIds.'_'.date('YmdHis').'.'.$this->getFileExtension(); @@ -82,6 +90,11 @@ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat return $fileName; } + /** + * @param $batchId + * + * @return Object + */ function generateExportQuery($batchId) { $sql = "SELECT @@ -131,6 +144,9 @@ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat return $dao; } + /** + * @param $export + */ function makeIIF($export) { // Keep running list of accounts and contacts used in this batch, since we need to // include those in the output. Only want to include ones used in the batch, not everything in the db, @@ -294,14 +310,23 @@ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat self::assign( 'journalEntries', $this->_exportParams['journalEntries'] ); } + /** + * @return string + */ function getMimeType() { return 'application/octet-stream'; } + /** + * @return string + */ function getFileExtension() { return 'iif'; } + /** + * @return string + */ function getHookedTemplateFileName() { return 'CRM/Financial/ExportFormat/IIF.tpl'; } @@ -310,6 +335,12 @@ class CRM_Financial_BAO_ExportFormat_IIF extends CRM_Financial_BAO_ExportFormat * $s the input string * $type can be string, date, or notepad */ + /** + * @param $s + * @param string $type + * + * @return bool|mixed|string + */ static function format($s, $type = 'string') { // If I remember right there's a couple things: // NOTEPAD field needs to be surrounded by quotes and then get rid of double quotes inside, also newlines should be literal \n, and ditch any ascii 0x0d's. diff --git a/CRM/Financial/BAO/PaymentProcessor.php b/CRM/Financial/BAO/PaymentProcessor.php index 37c596e694..08a1d230fe 100644 --- a/CRM/Financial/BAO/PaymentProcessor.php +++ b/CRM/Financial/BAO/PaymentProcessor.php @@ -48,6 +48,12 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces * * @params array parameters for Processor entity */ + /** + * @param $params + * + * @return CRM_Financial_DAO_PaymentProcessor + * @throws Exception + */ static function create($params) { // FIXME Reconcile with CRM_Admin_Form_PaymentProcessor::updatePaymentProcessor $processor = new CRM_Financial_DAO_PaymentProcessor(); @@ -211,6 +217,13 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces } } + /** + * @param $paymentProcessorIDs + * @param $mode + * + * @return array + * @throws Exception + */ static function getPayments($paymentProcessorIDs, $mode) { if (!$paymentProcessorIDs) { CRM_Core_Error::fatal(ts('Invalid value passed to getPayment function')); diff --git a/CRM/Financial/BAO/PaymentProcessorType.php b/CRM/Financial/BAO/PaymentProcessorType.php index 23e27696b9..845a4a5f85 100644 --- a/CRM/Financial/BAO/PaymentProcessorType.php +++ b/CRM/Financial/BAO/PaymentProcessorType.php @@ -206,6 +206,11 @@ WHERE pp.payment_processor_type_id = ppt.id AND ppt.id = %1"; } } + /** + * @param $attr + * + * @return array + */ static private function getAllPaymentProcessorTypes($attr) { $ppt = array(); $dao = new CRM_Financial_DAO_PaymentProcessorType(); diff --git a/CRM/Financial/Form/BatchTransaction.php b/CRM/Financial/Form/BatchTransaction.php index b76ea255a2..907f4b3498 100644 --- a/CRM/Financial/Form/BatchTransaction.php +++ b/CRM/Financial/Form/BatchTransaction.php @@ -172,6 +172,9 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form { return $defaults; } + /** + * @return array|null + */ function &links() { if (!(self::$_links)) { self::$_links = array( diff --git a/CRM/Financial/Form/Search.php b/CRM/Financial/Form/Search.php index c1b163726b..2cdbcb08f2 100644 --- a/CRM/Financial/Form/Search.php +++ b/CRM/Financial/Form/Search.php @@ -41,6 +41,9 @@ class CRM_Financial_Form_Search extends CRM_Core_Form { $this->assign('batchStatus', $this->_batchStatus); } + /** + * @return array + */ function setDefaultValues() { $defaults = array(); $status = CRM_Utils_Request::retrieve('status', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, 1); @@ -56,7 +59,7 @@ class CRM_Financial_Form_Search extends CRM_Core_Form { $attributes = CRM_Core_DAO::getAttribute('CRM_Batch_DAO_Batch'); $attributes['total']['class'] = $attributes['item_count']['class'] = 'number'; $this->add('text', 'title', ts('Batch Name'), $attributes['title']); - + $batchStatus = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'status_id', array('labelColumn' => 'name')); $this->add( 'select', diff --git a/CRM/Financial/Page/AJAX.php b/CRM/Financial/Page/AJAX.php index 4b12cf42d1..98c1a43a4d 100644 --- a/CRM/Financial/Page/AJAX.php +++ b/CRM/Financial/Page/AJAX.php @@ -43,6 +43,9 @@ class CRM_Financial_Page_AJAX { * $financialAccountType array with key account relationship and value financial account type option groups * */ + /** + * @param $config + */ static function jqFinancial($config) { if (!isset($_GET['_value']) || empty($_GET['_value'])) { @@ -91,6 +94,9 @@ class CRM_Financial_Page_AJAX { CRM_Utils_System::civiExit(); } + /** + * @param $config + */ static function jqFinancialRelation($config) { if (!isset($_GET['_value']) || empty($_GET['_value'])) { @@ -148,6 +154,9 @@ class CRM_Financial_Page_AJAX { CRM_Utils_System::civiExit(); } + /** + * @param $config + */ static function jqFinancialType($config) { if (! isset($_GET['_value']) || empty($_GET['_value'])) { diff --git a/CRM/Financial/Page/FinancialBatch.php b/CRM/Financial/Page/FinancialBatch.php index 64261bf30b..4c94c5f8bc 100644 --- a/CRM/Financial/Page/FinancialBatch.php +++ b/CRM/Financial/Page/FinancialBatch.php @@ -134,6 +134,11 @@ class CRM_Financial_Page_FinancialBatch extends CRM_Core_Page_Basic { return 'civicrm'; } + /** + * @param null $mode + * + * @return string + */ function userContextParams($mode = NULL) { $context = $this->get("context"); if ($mode == CRM_Core_Action::UPDATE || ($mode = CRM_Core_Action::ADD & isset($context))) { diff --git a/CRM/Friend/BAO/Friend.php b/CRM/Friend/BAO/Friend.php index f158fb3e56..8c0285b542 100644 --- a/CRM/Friend/BAO/Friend.php +++ b/CRM/Friend/BAO/Friend.php @@ -38,6 +38,9 @@ * */ class CRM_Friend_BAO_Friend extends CRM_Friend_DAO_Friend { + /** + * + */ function __construct() { parent::__construct(); } diff --git a/CRM/Grant/BAO/Query.php b/CRM/Grant/BAO/Query.php index 65c3438147..0854220f62 100644 --- a/CRM/Grant/BAO/Query.php +++ b/CRM/Grant/BAO/Query.php @@ -34,6 +34,9 @@ * */ class CRM_Grant_BAO_Query { + /** + * @return array + */ static function &getFields() { $fields = array(); $fields = CRM_Grant_BAO_Grant::exportableFields(); @@ -117,6 +120,10 @@ class CRM_Grant_BAO_Query { } } + /** + * @param $values + * @param $query + */ static function whereClauseSingle(&$values, &$query) { $strtolower = function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower'; list($name, $op, $value, $grouping, $wildcard) = $values; @@ -230,6 +237,13 @@ class CRM_Grant_BAO_Query { } } + /** + * @param $name + * @param $mode + * @param $side + * + * @return null|string + */ static function from($name, $mode, $side) { $from = NULL; switch ($name) { @@ -270,6 +284,12 @@ class CRM_Grant_BAO_Query { return (isset($this->_qill)) ? $this->_qill : ""; } + /** + * @param $mode + * @param bool $includeCustomFields + * + * @return array|null + */ static function defaultReturnProperties($mode, $includeCustomFields = TRUE ) { @@ -366,8 +386,15 @@ class CRM_Grant_BAO_Query { $form->assign('validGrant', TRUE); } + /** + * @param $row + * @param $id + */ static function searchAction(&$row, $id) {} + /** + * @param $tables + */ static function tableNames(&$tables) {} } diff --git a/CRM/Grant/Form/Grant.php b/CRM/Grant/Form/Grant.php index c8ce6d1381..eac98fec4a 100644 --- a/CRM/Grant/Form/Grant.php +++ b/CRM/Grant/Form/Grant.php @@ -115,6 +115,9 @@ class CRM_Grant_Form_Grant extends CRM_Core_Form { } } + /** + * @return array + */ function setDefaultValues() { if ($this->_cdType) { return CRM_Custom_Form_CustomData::setDefaultValues($this); diff --git a/CRM/Grant/Form/Search.php b/CRM/Grant/Form/Search.php index 5f12d045eb..9cd8cc2ecc 100644 --- a/CRM/Grant/Form/Search.php +++ b/CRM/Grant/Form/Search.php @@ -393,6 +393,9 @@ class CRM_Grant_Form_Search extends CRM_Core_Form_Search { } } + /** + * @return null + */ function getFormValues() { return NULL; } diff --git a/CRM/Grant/Form/Task.php b/CRM/Grant/Form/Task.php index 79fa644cd3..fa3a980165 100644 --- a/CRM/Grant/Form/Task.php +++ b/CRM/Grant/Form/Task.php @@ -78,6 +78,10 @@ class CRM_Grant_Form_Task extends CRM_Core_Form { self::preProcessCommon($this); } + /** + * @param $form + * @param bool $useTable + */ static function preProcessCommon(&$form, $useTable = FALSE) { $form->_grantIds = array(); diff --git a/CRM/Grant/Info.php b/CRM/Grant/Info.php index 26b6867e31..5f279844ba 100644 --- a/CRM/Grant/Info.php +++ b/CRM/Grant/Info.php @@ -41,6 +41,9 @@ class CRM_Grant_Info extends CRM_Core_Component_Info { protected $keyword = 'grant'; // docs inherited from interface + /** + * @return array + */ public function getInfo() { return array( 'name' => 'CiviGrant', @@ -54,6 +57,11 @@ class CRM_Grant_Info extends CRM_Core_Component_Info { // docs inherited from interface + /** + * @param bool $getAllUnconditionally + * + * @return array + */ public function getPermissions($getAllUnconditionally = FALSE) { return array( 'access CiviGrant', @@ -63,18 +71,27 @@ class CRM_Grant_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @return null + */ public function getUserDashboardElement() { // no dashboard element for this component return NULL; } // docs inherited from interface + /** + * @return null + */ public function getUserDashboardObject() { // no dashboard element for this component return NULL; } // docs inherited from interface + /** + * @return array + */ public function registerTab() { return array('title' => ts('Grants'), 'url' => 'grant', @@ -83,6 +100,9 @@ class CRM_Grant_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @return array + */ public function registerAdvancedSearchPane() { return array('title' => ts('Grants'), 'weight' => 50, @@ -90,11 +110,17 @@ class CRM_Grant_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 CiviGrant') && CRM_Core_Permission::check('edit grants') diff --git a/CRM/Grant/Selector/Search.php b/CRM/Grant/Selector/Search.php index e286fbd249..70112e1daf 100644 --- a/CRM/Grant/Selector/Search.php +++ b/CRM/Grant/Selector/Search.php @@ -413,6 +413,9 @@ class CRM_Grant_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co return self::$_columnHeaders; } + /** + * @return string + */ function &getQuery() { return $this->_query; } diff --git a/CRM/Group/Controller.php b/CRM/Group/Controller.php index 2e359ebfaa..a62c48b422 100644 --- a/CRM/Group/Controller.php +++ b/CRM/Group/Controller.php @@ -68,10 +68,16 @@ class CRM_Group_Controller extends CRM_Core_Controller { $this->addActions($uploadDir, $uploadNames); } + /** + * @return mixed + */ function run() { return parent::run(); } + /** + * @return mixed + */ public function selectorName() { return $this->get('selectorName'); } diff --git a/CRM/Group/Form/Edit.php b/CRM/Group/Form/Edit.php index f43d5426de..a7f1cf8ef2 100644 --- a/CRM/Group/Form/Edit.php +++ b/CRM/Group/Form/Edit.php @@ -159,6 +159,9 @@ class CRM_Group_Form_Edit extends CRM_Core_Form { * @access public * @return void */ + /** + * @return array + */ function setDefaultValues() { $defaults = array(); @@ -447,6 +450,11 @@ WHERE title = %1 * @static * @access public */ + /** + * @param $obj + * + * @return array + */ static function buildParentGroups( &$obj ) { $groupNames = CRM_Core_PseudoConstant::group(); $parentGroups = $parentGroupElements = array(); diff --git a/CRM/Group/Form/Search.php b/CRM/Group/Form/Search.php index 54eecf6bb1..359951ac6f 100644 --- a/CRM/Group/Form/Search.php +++ b/CRM/Group/Form/Search.php @@ -38,6 +38,9 @@ class CRM_Group_Form_Search extends CRM_Core_Form { parent::preProcess(); } + /** + * @return array + */ function setDefaultValues() { $defaults = array(); $defaults['group_status[1]'] = 1; diff --git a/CRM/Group/Page/Group.php b/CRM/Group/Page/Group.php index f0898a8aed..bb74bcf460 100644 --- a/CRM/Group/Page/Group.php +++ b/CRM/Group/Page/Group.php @@ -35,6 +35,9 @@ class CRM_Group_Page_Group extends CRM_Core_Page_Basic { protected $_sortByCharacter; + /** + * @return string + */ function getBAOName() { return 'CRM_Contact_BAO_Group'; } diff --git a/CRM/Import/DataSource/CSV.php b/CRM/Import/DataSource/CSV.php index d6d8ccc003..bf4e102ef9 100644 --- a/CRM/Import/DataSource/CSV.php +++ b/CRM/Import/DataSource/CSV.php @@ -36,12 +36,35 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource { CONST NUM_ROWS_TO_INSERT = 100; + /** + * Provides information about the data source + * + * @return array collection of info about this data source + * + * @access public + * + */ function getInfo() { return array('title' => ts('Comma-Separated Values (CSV)')); } + /** + * Function to set variables up before form is built + * + * @access public + */ function preProcess(&$form) {} + /** + * This is function is called by the form object to get the DataSource's + * form snippet. It should add all fields necesarry to get the data + * uploaded to the temporary table in the DB. + * + * @param $form + * + * @return void (operates directly on form argument) + * @access public + */ function buildQuickForm(&$form) { $form->add('hidden', 'hidden_dataSource', 'CRM_Import_DataSource_CSV'); @@ -61,6 +84,11 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource { $form->addElement('checkbox', 'skipColumnHeader', ts('First row contains column headers')); } + /** + * Function to process the form + * + * @access public + */ function postProcess(&$params, &$db, &$form) { $file = $params['uploadFile']['name']; @@ -219,6 +247,11 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource { } } +/** + * @param $string + * + * @return string + */ function civicrm_mysql_real_escape_string($string) { static $dao = NULL; if (!$dao) { diff --git a/CRM/Import/DataSource/SQL.php b/CRM/Import/DataSource/SQL.php index 8f9bd90779..435a2c1384 100644 --- a/CRM/Import/DataSource/SQL.php +++ b/CRM/Import/DataSource/SQL.php @@ -34,18 +34,48 @@ */ class CRM_Import_DataSource_SQL extends CRM_Import_DataSource { + /** + * Provides information about the data source + * + * @return array collection of info about this data source + * + * @access public + * + */ public function getInfo() { return array('title' => ts('SQL Query')); } + /** + * Function to set variables up before form is built + * + * @access public + */ public function preProcess(&$form) {} + /** + * This is function is called by the form object to get the DataSource's + * form snippet. It should add all fields necesarry to get the data + * uploaded to the temporary table in the DB. + * + * @param $form + * + * @return void (operates directly on form argument) + * @access public + */ public function buildQuickForm(&$form) { $form->add('hidden', 'hidden_dataSource', 'CRM_Import_DataSource_SQL'); $form->add('textarea', 'sqlQuery', ts('Specify SQL Query'), 'rows=10 cols=45', TRUE); $form->addFormRule(array('CRM_Import_DataSource_SQL', 'formRule'), $form); } + /** + * @param $fields + * @param $files + * @param $form + * + * @return array|bool + */ static function formRule($fields, $files, $form) { $errors = array(); @@ -60,6 +90,11 @@ class CRM_Import_DataSource_SQL extends CRM_Import_DataSource { return $errors ? $errors : TRUE; } + /** + * Function to process the form + * + * @access public + */ public function postProcess(&$params, &$db, &$form) { $importJob = new CRM_Contact_Import_ImportJob( CRM_Utils_Array::value( 'import_table_name', $params ), diff --git a/CRM/Import/Parser.php b/CRM/Import/Parser.php index c3a0e8ea3b..3115239ed4 100644 --- a/CRM/Import/Parser.php +++ b/CRM/Import/Parser.php @@ -197,10 +197,39 @@ abstract class CRM_Import_Parser { * Abstract function definitions */ abstract function init(); + + /** + * @return mixed + */ abstract function fini(); + + /** + * @param $values + * + * @return mixed + */ abstract function mapField(&$values); + + /** + * @param $values + * + * @return mixed + */ abstract function preview(&$values); + + /** + * @param $values + * + * @return mixed + */ abstract function summary(&$values); + + /** + * @param $onDuplicate + * @param $values + * + * @return mixed + */ abstract function import($onDuplicate, &$values); /** @@ -255,6 +284,9 @@ abstract class CRM_Import_Parser { return $params; } + /** + * @return array + */ function getSelectValues() { $values = array(); foreach ($this->_fields as $name => $field) { @@ -263,6 +295,9 @@ abstract class CRM_Import_Parser { return $values; } + /** + * @return array + */ function getSelectTypes() { $values = array(); foreach ($this->_fields as $name => $field) { @@ -273,6 +308,9 @@ abstract class CRM_Import_Parser { return $values; } + /** + * @return array + */ function getHeaderPatterns() { $values = array(); foreach ($this->_fields as $name => $field) { @@ -283,6 +321,9 @@ abstract class CRM_Import_Parser { return $values; } + /** + * @return array + */ function getDataPatterns() { $values = array(); foreach ($this->_fields as $name => $field) { diff --git a/CRM/Logging/Differ.php b/CRM/Logging/Differ.php index ac68cc6876..2da6c4c6d7 100644 --- a/CRM/Logging/Differ.php +++ b/CRM/Logging/Differ.php @@ -38,6 +38,11 @@ class CRM_Logging_Differ { private $log_date; private $interval; + /** + * @param $log_conn_id + * @param $log_date + * @param string $interval + */ function __construct($log_conn_id, $log_date, $interval = '10 SECOND') { $dsn = defined('CIVICRM_LOGGING_DSN') ? DB::parseDSN(CIVICRM_LOGGING_DSN) : DB::parseDSN(CIVICRM_DSN); $this->db = $dsn['database']; @@ -46,6 +51,11 @@ class CRM_Logging_Differ { $this->interval = $interval; } + /** + * @param $tables + * + * @return array + */ function diffsInTables($tables) { $diffs = array(); foreach ($tables as $table) { @@ -57,6 +67,12 @@ class CRM_Logging_Differ { return $diffs; } + /** + * @param $table + * @param null $contactID + * + * @return array + */ function diffsInTable($table, $contactID = null) { $diffs = array(); @@ -134,6 +150,12 @@ WHERE lt.log_conn_id = %1 AND return $diffs; } + /** + * @param $table + * @param $id + * + * @return array + */ private function diffsInTableForId($table, $id) { $diffs = array(); @@ -217,6 +239,11 @@ WHERE lt.log_conn_id = %1 AND return $diffs; } + /** + * @param $table + * + * @return array + */ function titlesAndValuesForTable($table) { // static caches for subsequent calls with the same $table static $titles = array(); @@ -294,12 +321,23 @@ WHERE lt.log_conn_id = %1 AND return array($titles[$table], $values[$table]); } + /** + * @param $sql + * @param $params + * + * @return mixed + */ private function sqlToArray($sql, $params) { $dao = CRM_Core_DAO::executeQuery($sql, $params); $dao->fetch(); return $dao->toArray(); } + /** + * @param $table + * + * @return array + */ private function titlesAndValuesForCustomDataTable($table) { $titles = array(); $values = array(); diff --git a/CRM/Logging/ReportDetail.php b/CRM/Logging/ReportDetail.php index 8a2368756a..5a8e09b3af 100644 --- a/CRM/Logging/ReportDetail.php +++ b/CRM/Logging/ReportDetail.php @@ -49,6 +49,9 @@ class CRM_Logging_ReportDetail extends CRM_Report_Form { protected $detail; protected $summary; + /** + * + */ function __construct() { // don’t display the ‘Add these Contacts to Group’ button $this->_add2groupSupported = FALSE; @@ -64,7 +67,7 @@ class CRM_Logging_ReportDetail extends CRM_Report_Form { $this->altered_name = CRM_Utils_Request::retrieve('alteredName', 'String', CRM_Core_DAO::$_nullObject); $this->altered_by = CRM_Utils_Request::retrieve('alteredBy', 'String', CRM_Core_DAO::$_nullObject); $this->altered_by_id = CRM_Utils_Request::retrieve('alteredById', 'Integer', CRM_Core_DAO::$_nullObject); - + parent::__construct(); CRM_Utils_System::resetBreadCrumb(); @@ -109,8 +112,15 @@ class CRM_Logging_ReportDetail extends CRM_Report_Form { ); } + /** + * @param bool $applyLimit + */ function buildQuery($applyLimit = TRUE) {} + /** + * @param $sql + * @param $rows + */ function buildRows($sql, &$rows) { // safeguard for when there aren’t any log entries yet if (!$this->log_conn_id or !$this->log_date) { @@ -128,6 +138,11 @@ class CRM_Logging_ReportDetail extends CRM_Report_Form { } } + /** + * @param $table + * + * @return array + */ protected function diffsInTable($table) { $rows = array(); @@ -161,9 +176,9 @@ class CRM_Logging_ReportDetail extends CRM_Report_Form { } // special-case for multiple values. Also works for CRM-7251: preferred_communication_method - if ((substr($from, 0, 1) == CRM_Core_DAO::VALUE_SEPARATOR && - substr($from, -1, 1) == CRM_Core_DAO::VALUE_SEPARATOR) || - (substr($to, 0, 1) == CRM_Core_DAO::VALUE_SEPARATOR && + if ((substr($from, 0, 1) == CRM_Core_DAO::VALUE_SEPARATOR && + substr($from, -1, 1) == CRM_Core_DAO::VALUE_SEPARATOR) || + (substr($to, 0, 1) == CRM_Core_DAO::VALUE_SEPARATOR && substr($to, -1, 1) == CRM_Core_DAO::VALUE_SEPARATOR)) { $froms = $tos = array(); foreach (explode(CRM_Core_DAO::VALUE_SEPARATOR, trim($from, CRM_Core_DAO::VALUE_SEPARATOR)) as $val) { diff --git a/CRM/Logging/ReportSummary.php b/CRM/Logging/ReportSummary.php index 4cce97d00f..b8dd138b67 100644 --- a/CRM/Logging/ReportSummary.php +++ b/CRM/Logging/ReportSummary.php @@ -39,6 +39,9 @@ class CRM_Logging_ReportSummary extends CRM_Report_Form { protected $loggingDB; + /** + * + */ function __construct() { // don’t display the ‘Add these Contacts to Group’ button $this->_add2groupSupported = FALSE; @@ -338,6 +341,11 @@ ORDER BY log_civicrm_entity_log_date DESC {$this->_limit}"; $this->endPostProcess($rows); } + /** + * @param $entity + * + * @return string + */ function getLogType($entity) { if (!empty($this->_logTables[$entity]['log_type'])) { return $this->_logTables[$entity]['log_type']; @@ -346,6 +354,13 @@ ORDER BY log_civicrm_entity_log_date DESC {$this->_limit}"; return $logType; } + /** + * @param $id + * @param $entity + * @param $logDate + * + * @return mixed|null|string + */ function getEntityValue($id, $entity, $logDate) { if (!empty($this->_logTables[$entity]['bracket_info'])) { if (!empty($this->_logTables[$entity]['bracket_info']['entity_column'])) { @@ -391,6 +406,14 @@ WHERE log_date <= %1 AND id = %2 ORDER BY log_date DESC LIMIT 1"; return NULL; } + /** + * @param $id + * @param $connId + * @param $entity + * @param $oldAction + * + * @return null|string + */ function getEntityAction($id, $connId, $entity, $oldAction) { if (!empty($this->_logTables[$entity]['action_column'])) { $sql = "select {$this->_logTables[$entity]['action_column']} from `{$this->loggingDB}`.{$entity} where id = %1 AND log_conn_id = %2"; diff --git a/CRM/Logging/Reverter.php b/CRM/Logging/Reverter.php index ea4abe222d..409dabcbb4 100644 --- a/CRM/Logging/Reverter.php +++ b/CRM/Logging/Reverter.php @@ -37,6 +37,10 @@ class CRM_Logging_Reverter { private $log_conn_id; private $log_date; + /** + * @param $log_conn_id + * @param $log_date + */ function __construct($log_conn_id, $log_date) { $dsn = defined('CIVICRM_LOGGING_DSN') ? DB::parseDSN(CIVICRM_LOGGING_DSN) : DB::parseDSN(CIVICRM_DSN); $this->db = $dsn['database']; @@ -44,6 +48,9 @@ class CRM_Logging_Reverter { $this->log_date = $log_date; } + /** + * @param $tables + */ function revert($tables) { // FIXME: split off the table → DAO mapping to a GenCode-generated class $daos = array( diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php index b7debcb7e1..d733c84467 100644 --- a/CRM/Logging/Schema.php +++ b/CRM/Logging/Schema.php @@ -261,6 +261,11 @@ AND TABLE_NAME LIKE 'log_civicrm_%' return TRUE; } + /** + * @param $table + * + * @return array + */ private function _getCreateQuery($table) { $dao = CRM_Core_DAO::executeQuery("SHOW CREATE TABLE {$table}"); $dao->fetch(); @@ -268,6 +273,12 @@ AND TABLE_NAME LIKE 'log_civicrm_%' return $create; } + /** + * @param $col + * @param $createQuery + * + * @return array|mixed|string + */ private function _getColumnQuery($col, $createQuery) { $line = preg_grep("/^ `$col` /", $createQuery); $line = rtrim(array_pop($line), ','); @@ -276,6 +287,9 @@ AND TABLE_NAME LIKE 'log_civicrm_%' return $line; } + /** + * @param bool $rebuildTrigger + */ function fixSchemaDifferencesForAll($rebuildTrigger = FALSE) { $diffs = array(); foreach ($this->tables as $table) { @@ -302,6 +316,11 @@ AND TABLE_NAME LIKE 'log_civicrm_%' * so there's no need for a default timestamp and therefore we remove such default timestamps * also eliminate the NOT NULL constraint, since we always copy and schema can change down the road) */ + /** + * @param $query + * + * @return mixed + */ function fixTimeStampAndNotNullSQL($query) { $query = str_ireplace("TIMESTAMP NOT NULL", "TIMESTAMP NULL", $query); $query = str_ireplace("DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", '', $query); @@ -399,6 +418,12 @@ WHERE table_schema IN ('{$this->db}', '{$civiDB}')"; return $columnSpecs[$table]; } + /** + * @param $civiTable + * @param $logTable + * + * @return array + */ function columnsWithDiffSpecs($civiTable, $logTable) { $civiTableSpecs = $this->columnSpecsOf($civiTable); $logTableSpecs = $this->columnSpecsOf($logTable); @@ -534,6 +559,11 @@ COLS; return (bool) CRM_Core_DAO::singleValueQuery("SHOW TRIGGERS LIKE 'civicrm_contact'"); } + /** + * @param $info + * @param null $tableName + * @param bool $force + */ function triggerInfo(&$info, $tableName = NULL, $force = FALSE) { // check if we have logging enabled $config =& CRM_Core_Config::singleton(); diff --git a/CRM/Mailing/BAO/MailingJob.php b/CRM/Mailing/BAO/MailingJob.php index fbf1a15d87..4193a567c9 100644 --- a/CRM/Mailing/BAO/MailingJob.php +++ b/CRM/Mailing/BAO/MailingJob.php @@ -216,6 +216,9 @@ class CRM_Mailing_BAO_MailingJob extends CRM_Mailing_DAO_MailingJob { // post process to determine if the parent job // as well as the mailing is complete after the run + /** + * @param null $mode + */ public static function runJobs_post($mode = NULL) { $job = new CRM_Mailing_BAO_MailingJob(); @@ -284,6 +287,10 @@ class CRM_Mailing_BAO_MailingJob extends CRM_Mailing_DAO_MailingJob { // before we run jobs, we need to split the jobs + /** + * @param int $offset + * @param null $mode + */ public static function runJobs_pre($offset = 200, $mode = NULL) { $job = new CRM_Mailing_BAO_MailingJob(); @@ -372,6 +379,9 @@ class CRM_Mailing_BAO_MailingJob extends CRM_Mailing_DAO_MailingJob { // Split the parent job into n number of child job based on an offset // If null or 0 , we create only one child job + /** + * @param int $offset + */ public function split_job($offset = 200) { $recipient_count = CRM_Mailing_BAO_Recipients::mailingSize($this->mailing_id); @@ -411,6 +421,9 @@ VALUES (%1, %2, %3, %4, %5, %6, %7) } } + /** + * @param null $testParams + */ public function queue($testParams = NULL) { $mailing = new CRM_Mailing_BAO_Mailing(); $mailing->id = $this->mailing_id; @@ -593,6 +606,16 @@ VALUES (%1, %2, %3, %4, %5, %6, %7) return $isDelivered; } + /** + * @param $fields + * @param $mailing + * @param $mailer + * @param $job_date + * @param $attachments + * + * @return bool|null + * @throws Exception + */ public function deliverGroup(&$fields, &$mailing, &$mailer, &$job_date, &$attachments) { static $smtpConnectionErrors = 0; @@ -863,6 +886,16 @@ AND status IN ( 'Scheduled', 'Running', 'Paused' ) return ''; } + /** + * @param $deliveredParams + * @param $targetParams + * @param $mailing + * @param $job_date + * + * @return bool + * @throws CRM_Core_Exception + * @throws Exception + */ public function writeToDB( &$deliveredParams, &$targetParams, diff --git a/CRM/Mailing/BAO/Query.php b/CRM/Mailing/BAO/Query.php index e41adc503d..ab966d346b 100644 --- a/CRM/Mailing/BAO/Query.php +++ b/CRM/Mailing/BAO/Query.php @@ -35,6 +35,9 @@ class CRM_Mailing_BAO_Query { static $_mailingFields = NULL; + /** + * @return array|null + */ static function &getFields() { if (!self::$_mailingFields) { self::$_mailingFields = array(); @@ -122,6 +125,9 @@ class CRM_Mailing_BAO_Query { } } + /** + * @param $query + */ static function where(&$query) { $grouping = NULL; foreach (array_keys($query->_params) as $id) { @@ -138,6 +144,13 @@ class CRM_Mailing_BAO_Query { } } + /** + * @param $name + * @param $mode + * @param $side + * + * @return null|string + */ static function from($name, $mode, $side) { $from = NULL; @@ -179,6 +192,12 @@ class CRM_Mailing_BAO_Query { return $from; } + /** + * @param $mode + * @param bool $includeCustomFields + * + * @return array|null + */ static function defaultReturnProperties($mode, $includeCustomFields = TRUE ) { @@ -203,6 +222,10 @@ class CRM_Mailing_BAO_Query { return $properties; } + /** + * @param $values + * @param $query + */ static function whereClauseSingle(&$values, &$query) { list($name, $op, $value, $grouping, $wildcard) = $values; @@ -402,8 +425,15 @@ class CRM_Mailing_BAO_Query { $form->assign('validCiviMailing', TRUE); } + /** + * @param $row + * @param $id + */ static function searchAction(&$row, $id) {} + /** + * @param $tables + */ static function tableNames(&$tables) { } diff --git a/CRM/Mailing/BAO/Recipients.php b/CRM/Mailing/BAO/Recipients.php index a60cc2dce5..841b71852e 100644 --- a/CRM/Mailing/BAO/Recipients.php +++ b/CRM/Mailing/BAO/Recipients.php @@ -41,6 +41,11 @@ class CRM_Mailing_BAO_Recipients extends CRM_Mailing_DAO_Recipients { parent::__construct(); } + /** + * @param $mailingID + * + * @return null|string + */ static function mailingSize($mailingID) { $sql = " SELECT count(*) as count @@ -51,6 +56,13 @@ WHERE mailing_id = %1 return CRM_Core_DAO::singleValueQuery($sql, $params); } + /** + * @param $mailingID + * @param null $offset + * @param null $limit + * + * @return Object + */ static function mailingQuery($mailingID, $offset = NULL, $limit = NULL ) { diff --git a/CRM/Mailing/BAO/TrackableURL.php b/CRM/Mailing/BAO/TrackableURL.php index 0d0864aae0..3204edd6b7 100644 --- a/CRM/Mailing/BAO/TrackableURL.php +++ b/CRM/Mailing/BAO/TrackableURL.php @@ -102,6 +102,12 @@ class CRM_Mailing_BAO_TrackableURL extends CRM_Mailing_DAO_TrackableURL { return $returnUrl; } + /** + * @param $msg + * @param $mailing_id + * @param $queue_id + * @param bool $onlyHrefs + */ public static function scan_and_replace(&$msg, $mailing_id, $queue_id, $onlyHrefs = FALSE) { if (!$mailing_id) { return; diff --git a/CRM/Mailing/Event/BAO/Delivered.php b/CRM/Mailing/Event/BAO/Delivered.php index f011d25858..2bfac17eba 100644 --- a/CRM/Mailing/Event/BAO/Delivered.php +++ b/CRM/Mailing/Event/BAO/Delivered.php @@ -227,6 +227,10 @@ class CRM_Mailing_Event_BAO_Delivered extends CRM_Mailing_Event_DAO_Delivered { return $results; } + /** + * @param $eventQueueIDs + * @param null $time + */ static function bulkCreate($eventQueueIDs, $time = NULL) { if (!$time) { $time = date('YmdHis'); diff --git a/CRM/Mailing/Event/BAO/Queue.php b/CRM/Mailing/Event/BAO/Queue.php index 1eb89db6e1..e91a5507a5 100644 --- a/CRM/Mailing/Event/BAO/Queue.php +++ b/CRM/Mailing/Event/BAO/Queue.php @@ -269,6 +269,11 @@ class CRM_Mailing_Event_BAO_Queue extends CRM_Mailing_Event_DAO_Queue { return $mailing; } + /** + * @param $queueID + * + * @return array + */ public static function getContactInfo($queueID) { $query = " SELECT DISTINCT(civicrm_mailing_event_queue.contact_id) as contact_id, @@ -293,6 +298,10 @@ SELECT DISTINCT(civicrm_mailing_event_queue.contact_id) as contact_id, return array($displayName, $email); } + /** + * @param $params + * @param null $now + */ static function bulkCreate($params, $now = NULL) { if (!$now) { $now = time(); diff --git a/CRM/Mailing/Event/BAO/Unsubscribe.php b/CRM/Mailing/Event/BAO/Unsubscribe.php index 355de5d3a3..75724efbc2 100644 --- a/CRM/Mailing/Event/BAO/Unsubscribe.php +++ b/CRM/Mailing/Event/BAO/Unsubscribe.php @@ -566,6 +566,11 @@ WHERE email = %2 return $results; } + /** + * @param $queueID + * + * @return array + */ public static function getContactInfo($queueID) { $query = " SELECT DISTINCT(civicrm_mailing_event_queue.contact_id) as contact_id, diff --git a/CRM/Mailing/Form/Search.php b/CRM/Mailing/Form/Search.php index 0d1c651529..1495328523 100644 --- a/CRM/Mailing/Form/Search.php +++ b/CRM/Mailing/Form/Search.php @@ -75,6 +75,9 @@ class CRM_Mailing_Form_Search extends CRM_Core_Form { )); } + /** + * @return array + */ function setDefaultValues() { $defaults = $statusVals = array(); $parent = $this->controller->getParent(); @@ -106,7 +109,7 @@ class CRM_Mailing_Form_Search extends CRM_Core_Form { $parent = $this->controller->getParent(); if (!empty($params)) { - $fields = array('mailing_name', 'mailing_from', 'mailing_to', 'sort_name', + $fields = array('mailing_name', 'mailing_from', 'mailing_to', 'sort_name', 'campaign_id', 'mailing_status', 'sms', 'status_unscheduled', 'is_archived', 'hidden_find_mailings'); foreach ($fields as $field) { if (isset($params[$field]) && diff --git a/CRM/Mailing/Form/Subscribe.php b/CRM/Mailing/Form/Subscribe.php index 2386f04daa..ed32a7a98a 100644 --- a/CRM/Mailing/Form/Subscribe.php +++ b/CRM/Mailing/Form/Subscribe.php @@ -135,7 +135,7 @@ ORDER BY title"; $config = CRM_Core_Config::singleton(); $session = CRM_Core_Session::singleton(); $contactID = $session->get('userID'); - + if (empty($config->recaptchaPublicKey) || empty($config->recaptchaPrivateKey) || $contactID) { @@ -173,6 +173,11 @@ ORDER BY title"; ); } + /** + * @param $fields + * + * @return array|bool + */ static function formRule($fields) { foreach ($fields as $name => $dontCare) { if (substr($name, 0, CRM_Core_Form::CB_PREFIX_LEN) == CRM_Core_Form::CB_PREFIX) { diff --git a/CRM/Mailing/Form/Task.php b/CRM/Mailing/Form/Task.php index 1879eeef98..2b45794272 100644 --- a/CRM/Mailing/Form/Task.php +++ b/CRM/Mailing/Form/Task.php @@ -72,6 +72,10 @@ class CRM_Mailing_Form_Task extends CRM_Core_Form { self::preProcessCommon($this); } + /** + * @param $form + * @param bool $useTable + */ static function preProcessCommon(&$form, $useTable = FALSE) { $values = $form->controller->exportValues($form->get('searchFormName')); diff --git a/CRM/Mailing/Info.php b/CRM/Mailing/Info.php index e5e0c74455..92aeb3bb24 100644 --- a/CRM/Mailing/Info.php +++ b/CRM/Mailing/Info.php @@ -42,6 +42,9 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { // docs inherited from interface + /** + * @return array + */ public function getInfo() { return array( 'name' => 'CiviMail', @@ -52,6 +55,9 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { ); } + /** + * @return bool + */ static function workflowEnabled() { $config = CRM_Core_Config::singleton(); @@ -78,6 +84,11 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @param bool $getAllUnconditionally + * + * @return array + */ public function getPermissions($getAllUnconditionally = FALSE) { $permissions = array( 'access CiviMail', @@ -97,17 +108,26 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { // docs inherited from interface + /** + * @return null + */ public function getUserDashboardElement() { // no dashboard element for this component return NULL; } + /** + * @return null + */ public function getUserDashboardObject() { // no dashboard element for this component return NULL; } // docs inherited from interface + /** + * @return array + */ public function registerTab() { return array( 'title' => ts('Mailings'), @@ -118,6 +138,9 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @return array + */ public function registerAdvancedSearchPane() { return array('title' => ts('Mailings'), 'weight' => 20, @@ -125,11 +148,17 @@ class CRM_Mailing_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) {} } diff --git a/CRM/Mailing/Page/Browse.php b/CRM/Mailing/Page/Browse.php index d7c24ea650..26728c1562 100644 --- a/CRM/Mailing/Page/Browse.php +++ b/CRM/Mailing/Page/Browse.php @@ -311,6 +311,12 @@ class CRM_Mailing_Page_Browse extends CRM_Core_Page { $form->run(); } + /** + * @param $params + * @param bool $sortBy + * + * @return string + */ function whereClause(&$params, $sortBy = TRUE) { $values = array(); diff --git a/CRM/Mailing/Page/Common.php b/CRM/Mailing/Page/Common.php index 5fb5140d20..812117d7f6 100644 --- a/CRM/Mailing/Page/Common.php +++ b/CRM/Mailing/Page/Common.php @@ -35,6 +35,10 @@ class CRM_Mailing_Page_Common extends CRM_Core_Page { protected $_type = NULL; + /** + * @return string + * @throws Exception + */ function run() { $job_id = CRM_Utils_Request::retrieve('jid', 'Integer', CRM_Core_DAO::$_nullObject); $queue_id = CRM_Utils_Request::retrieve('qid', 'Integer', CRM_Core_DAO::$_nullObject); diff --git a/CRM/Mailing/Page/Component.php b/CRM/Mailing/Page/Component.php index 29b1ce633b..0299158dd6 100644 --- a/CRM/Mailing/Page/Component.php +++ b/CRM/Mailing/Page/Component.php @@ -114,6 +114,11 @@ class CRM_Mailing_Page_Component extends CRM_Core_Page_Basic { return CRM_Utils_System::currentPath(); } + /** + * @param null $args + * @param null $pageArgs + * @param null $sort + */ function run($args = NULL, $pageArgs = NULL, $sort = NULL) { return parent::run($args, $pageArgs, "component_type, is_default desc, name"); } diff --git a/CRM/Mailing/Page/Confirm.php b/CRM/Mailing/Page/Confirm.php index 6f5b3409e3..57842bf7f1 100644 --- a/CRM/Mailing/Page/Confirm.php +++ b/CRM/Mailing/Page/Confirm.php @@ -33,6 +33,10 @@ * */ class CRM_Mailing_Page_Confirm extends CRM_Core_Page { + /** + * @return string + * @throws Exception + */ function run() { $contact_id = CRM_Utils_Request::retrieve('cid', 'Integer', CRM_Core_DAO::$_nullObject); $subscribe_id = CRM_Utils_Request::retrieve('sid', 'Integer', CRM_Core_DAO::$_nullObject); diff --git a/CRM/Mailing/Page/Report.php b/CRM/Mailing/Page/Report.php index ae40c24e50..324a972816 100644 --- a/CRM/Mailing/Page/Report.php +++ b/CRM/Mailing/Page/Report.php @@ -49,14 +49,23 @@ class CRM_Mailing_Page_Report extends CRM_Core_Page_Basic { return 'CRM_Mailing_BAO_Mailing'; } + /** + * @return null + */ function &links() { return CRM_Core_DAO::$_nullObject; } + /** + * @return null + */ function editForm() { return NULL; } + /** + * @return string + */ function editName() { return 'CiviMail Report'; } @@ -72,10 +81,18 @@ class CRM_Mailing_Page_Report extends CRM_Core_Page_Basic { return 'civicrm/mailing/report'; } + /** + * @param null $mode + * + * @return string + */ function userContextParams($mode = NULL) { return 'reset=1&mid=' . $this->_mailing_id; } + /** + * @return string + */ function run() { $this->_mailing_id = CRM_Utils_Request::retrieve('mid', 'Positive', $this); diff --git a/CRM/Mailing/Page/Resubscribe.php b/CRM/Mailing/Page/Resubscribe.php index 9f569ba179..c97fda39d3 100644 --- a/CRM/Mailing/Page/Resubscribe.php +++ b/CRM/Mailing/Page/Resubscribe.php @@ -33,6 +33,9 @@ * */ class CRM_Mailing_Page_Resubscribe extends CRM_Mailing_Page_Common { + /** + * @return string + */ function run() { $this->_type = 'resubscribe'; return parent::run(); diff --git a/CRM/Mailing/Selector/Browse.php b/CRM/Mailing/Selector/Browse.php index c4422f4d79..bf9225cab0 100644 --- a/CRM/Mailing/Selector/Browse.php +++ b/CRM/Mailing/Selector/Browse.php @@ -430,10 +430,19 @@ LEFT JOIN civicrm_contact scheduledContact ON ( $mailing.scheduled_id = schedul return ts('CiviMail Mailings'); } + /** + * @param $parent + */ function setParent($parent) { $this->_parent = $parent; } + /** + * @param $params + * @param bool $sortBy + * + * @return int|string + */ function whereClause(&$params, $sortBy = TRUE) { $values = $clauses = array(); $isFormSubmitted = $this->_parent->get('hidden_find_mailings'); diff --git a/CRM/Mailing/Selector/Search.php b/CRM/Mailing/Selector/Search.php index 1f6cc48540..a3e9049640 100644 --- a/CRM/Mailing/Selector/Search.php +++ b/CRM/Mailing/Selector/Search.php @@ -393,10 +393,16 @@ class CRM_Mailing_Selector_Search extends CRM_Core_Selector_Base implements CRM_ 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/PCP/BAO/PCP.php b/CRM/PCP/BAO/PCP.php index 8a5fe29772..89bd0fae2d 100644 --- a/CRM/PCP/BAO/PCP.php +++ b/CRM/PCP/BAO/PCP.php @@ -42,6 +42,9 @@ class CRM_PCP_BAO_PCP extends CRM_PCP_DAO_PCP { */ static $_pcpLinks = NULL; + /** + * + */ function __construct() { parent::__construct(); } @@ -424,6 +427,11 @@ WHERE pcp.id = %1 AND cc.contribution_status_id =1 AND cc.is_test = 0"; /* * Add PCP form elements to a form */ + /** + * @param $pcpId + * @param $page + * @param null $elements + */ function buildPcp($pcpId, &$page, &$elements = NULL) { $prms = array('id' => $pcpId); @@ -472,6 +480,13 @@ WHERE pcp.id = %1 AND cc.contribution_status_id =1 AND cc.is_test = 0"; /* * Process a PCP contribution/ */ + /** + * @param $pcpId + * @param $component + * @param $entity + * + * @return array + */ public static function handlePcp($pcpId, $component, $entity) { self::getPcpEntityTable($component); diff --git a/CRM/PCP/Form/PCPAccount.php b/CRM/PCP/Form/PCPAccount.php index 1f952c0d4c..4408695533 100644 --- a/CRM/PCP/Form/PCPAccount.php +++ b/CRM/PCP/Form/PCPAccount.php @@ -116,6 +116,9 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form { } } + /** + * @return array + */ function setDefaultValues() { $this->_defaults = array(); if ($this->_contactID) { diff --git a/CRM/PCP/Page/PCP.php b/CRM/PCP/Page/PCP.php index e012375d5f..90441a9d61 100644 --- a/CRM/PCP/Page/PCP.php +++ b/CRM/PCP/Page/PCP.php @@ -386,6 +386,10 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic { } //@TODO this function changed, debug this at runtime + /** + * @param $whereClause + * @param $whereParams + */ function pagerAtoZ($whereClause, $whereParams) { $where = ''; if ($whereClause) { diff --git a/CRM/PCP/Page/PCPInfo.php b/CRM/PCP/Page/PCPInfo.php index 4bc4a08274..e342958fff 100644 --- a/CRM/PCP/Page/PCPInfo.php +++ b/CRM/PCP/Page/PCPInfo.php @@ -331,6 +331,9 @@ class CRM_PCP_Page_PCPInfo extends CRM_Core_Page { parent::run(); } + /** + * @return string + */ function getTemplateFileName() { if ($this->_id) { $templateFile = "CRM/PCP/Page/{$this->_id}/PCPInfo.tpl"; diff --git a/CRM/Queue/ErrorPolicy.php b/CRM/Queue/ErrorPolicy.php index f0d21fe9ec..e30fbe6d97 100644 --- a/CRM/Queue/ErrorPolicy.php +++ b/CRM/Queue/ErrorPolicy.php @@ -43,6 +43,10 @@ */ class CRM_Queue_ErrorPolicy { var $active; + + /** + * @param null $level + */ function __construct($level = NULL) { register_shutdown_function(array($this, 'onShutdown')); if ($level === NULL) { @@ -74,6 +78,11 @@ class CRM_Queue_ErrorPolicy { $this->active = FALSE; } + /** + * @param $callable + * + * @return mixed + */ function call($callable) { $this->activate(); try { diff --git a/CRM/Queue/Menu.php b/CRM/Queue/Menu.php index 8c72cb856e..0cfad91a38 100644 --- a/CRM/Queue/Menu.php +++ b/CRM/Queue/Menu.php @@ -43,6 +43,10 @@ require_once 'CRM/Core/I18n.php'; */ class CRM_Queue_Menu { + /** + * @param $path + * @param $menuPath + */ static function alter($path, &$menuPath) { switch ($path) { case 'civicrm/queue/runner': diff --git a/CRM/Queue/Runner.php b/CRM/Queue/Runner.php index f776f4fd1b..0f069b2681 100644 --- a/CRM/Queue/Runner.php +++ b/CRM/Queue/Runner.php @@ -112,6 +112,9 @@ class CRM_Queue_Runner { $this->qrid = $this->queue->getName(); } + /** + * @return array + */ function __sleep() { // exclude taskCtx return array('title', 'queue', 'errorMode', 'isMinimal', 'onEnd', 'onEndUrl', 'pathPrefix', 'qrid', 'buttons'); @@ -234,6 +237,9 @@ class CRM_Queue_Runner { } } + /** + * @param $item + */ protected function releaseErrorItem($item) { switch ($this->errorMode) { case self::ERROR_CONTINUE: @@ -303,6 +309,9 @@ class CRM_Queue_Runner { return $result; } + /** + * @return CRM_Queue_TaskContext + */ protected function getTaskContext() { if (!is_object($this->taskCtx)) { $this->taskCtx = new CRM_Queue_TaskContext(); diff --git a/CRM/Queue/Service.php b/CRM/Queue/Service.php index e5faef5596..2c3daa283e 100644 --- a/CRM/Queue/Service.php +++ b/CRM/Queue/Service.php @@ -72,6 +72,10 @@ class CRM_Queue_Service { * @var array(queueName => CRM_Queue_Queue) */ var $queues; + + /** + * + */ function __construct() { $this->queues = array(); } diff --git a/CRM/Utils/Cache/Memcached.php b/CRM/Utils/Cache/Memcached.php index 1ddcf416a7..b07eef40aa 100644 --- a/CRM/Utils/Cache/Memcached.php +++ b/CRM/Utils/Cache/Memcached.php @@ -161,6 +161,9 @@ class CRM_Utils_Cache_Memcached { return $key; } + /** + * @return mixed + */ function flush() { return $this->_cache->flush(); } -- 2.25.1