From 28518c9016079f39d0d4f294efc6d50e8124e6f0 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 24 May 2014 14:45:36 +1200 Subject: [PATCH] more missing code comment blocks --- CRM/ACL/BAO/ACL.php | 47 +++++++++++++++++++++ CRM/ACL/BAO/Cache.php | 20 +++++++++ CRM/ACL/BAO/EntityRole.php | 12 ++++++ CRM/ACL/Form/ACL.php | 5 +++ CRM/ACL/Form/ACLBasic.php | 5 +++ CRM/Core/Base.php | 4 ++ CRM/Core/Config.php | 3 ++ CRM/Core/Controller.php | 3 ++ CRM/Core/DAO.php | 4 ++ CRM/Core/Error.php | 4 ++ CRM/Core/Form.php | 4 ++ CRM/Core/Menu.php | 4 ++ CRM/Core/Payment/Google.php | 4 ++ CRM/Core/Payment/GoogleIPN.php | 4 ++ CRM/Core/Payment/PayflowPro.php | 4 ++ CRM/Core/QuickForm/Action.php | 4 ++ CRM/Core/QuickForm/NestedAdvMultiSelect.php | 4 ++ CRM/Extension/Exception.php | 3 ++ CRM/Mailing/Event/BAO/Reply.php | 4 ++ CRM/Mailing/Event/BAO/Subscribe.php | 4 ++ CRM/Mailing/MailStore/Imap.php | 4 ++ CRM/Mailing/MailStore/Localdir.php | 4 ++ CRM/Mailing/MailStore/Maildir.php | 4 ++ CRM/Mailing/MailStore/Mbox.php | 4 ++ CRM/Mailing/MailStore/Pop3.php | 4 ++ CRM/Queue/Menu.php | 4 ++ 26 files changed, 170 insertions(+) diff --git a/CRM/ACL/BAO/ACL.php b/CRM/ACL/BAO/ACL.php index 29cc1e80cd..62a20c4241 100644 --- a/CRM/ACL/BAO/ACL.php +++ b/CRM/ACL/BAO/ACL.php @@ -43,6 +43,9 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL { static $_fieldKeys = NULL; + /** + * @return array|null + */ static function entityTable() { if (!self::$_entityTable) { self::$_entityTable = array( @@ -53,6 +56,9 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL { return self::$_entityTable; } + /** + * @return array|null + */ static function objectTable() { if (!self::$_objectTable) { self::$_objectTable = array( @@ -66,6 +72,9 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL { return self::$_objectTable; } + /** + * @return array|null + */ static function operation() { if (!self::$_operation) { self::$_operation = array( @@ -647,6 +656,11 @@ SELECT $acl.* return $result; } + /** + * @param $params + * + * @return CRM_ACL_DAO_ACL + */ static function create(&$params) { $dao = new CRM_ACL_DAO_ACL(); $dao->copyValues($params); @@ -654,6 +668,10 @@ SELECT $acl.* return $dao; } + /** + * @param $params + * @param $defaults + */ static function retrieve(&$params, &$defaults) { CRM_Core_DAO::commonRetrieve('CRM_ACL_DAO_ACL', $params, $defaults); } @@ -674,6 +692,12 @@ SELECT $acl.* return CRM_Core_DAO::setFieldValue('CRM_ACL_DAO_ACL', $id, 'is_active', $is_active); } + /** + * @param $str + * @param $contactID + * + * @return bool + */ static function check($str, $contactID) { $acls = CRM_ACL_BAO_Cache::build($contactID); @@ -700,6 +724,14 @@ SELECT count( a.id ) return ($count) ? TRUE : FALSE; } + /** + * @param $type + * @param $tables + * @param $whereTables + * @param null $contactID + * + * @return null|string + */ public static function whereClause($type, &$tables, &$whereTables, $contactID = NULL) { $acls = CRM_ACL_BAO_Cache::build($contactID); //CRM_Core_Error::debug( "a: $contactID", $acls ); @@ -817,6 +849,15 @@ SELECT g.* return $whereClause; } + /** + * @param $type + * @param null $contactID + * @param string $tableName + * @param null $allGroups + * @param null $includedGroups + * + * @return array + */ public static function group($type, $contactID = NULL, $tableName = 'civicrm_saved_search', @@ -879,6 +920,12 @@ ORDER BY a.object_id return $ids; } + /** + * @param $type + * @param $operation + * + * @return bool + */ static function matchType($type, $operation) { $typeCheck = FALSE; switch ($operation) { diff --git a/CRM/ACL/BAO/Cache.php b/CRM/ACL/BAO/Cache.php index 9feb99907c..e34265969b 100644 --- a/CRM/ACL/BAO/Cache.php +++ b/CRM/ACL/BAO/Cache.php @@ -40,6 +40,11 @@ class CRM_ACL_BAO_Cache extends CRM_ACL_DAO_Cache { static $_cache = NULL; + /** + * @param $id + * + * @return mixed + */ static function &build($id) { if (!self::$_cache) { self::$_cache = array(); @@ -61,6 +66,11 @@ class CRM_ACL_BAO_Cache extends CRM_ACL_DAO_Cache { return self::$_cache[$id]; } + /** + * @param $id + * + * @return array + */ static function retrieve($id) { $query = " SELECT acl_id @@ -82,6 +92,10 @@ SELECT acl_id return $cache; } + /** + * @param $id + * @param $cache + */ static function store($id, &$cache) { foreach ($cache as $aclID => $data) { $dao = new CRM_ACL_DAO_Cache(); @@ -96,6 +110,9 @@ SELECT acl_id } } + /** + * @param $id + */ static function deleteEntry($id) { if (self::$_cache && array_key_exists($id, self::$_cache) @@ -111,6 +128,9 @@ WHERE contact_id = %1 CRM_Core_DAO::executeQuery($query, $params); } + /** + * @param $id + */ static function updateEntry($id) { // rebuilds civicrm_acl_cache self::deleteEntry($id); diff --git a/CRM/ACL/BAO/EntityRole.php b/CRM/ACL/BAO/EntityRole.php index 45b5349e59..98f6ccc25d 100644 --- a/CRM/ACL/BAO/EntityRole.php +++ b/CRM/ACL/BAO/EntityRole.php @@ -39,6 +39,9 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole { static $_entityTable = NULL; + /** + * @return array|null + */ static function entityTable() { if (!self::$_entityTable) { self::$_entityTable = array( @@ -49,6 +52,11 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole { return self::$_entityTable; } + /** + * @param $params + * + * @return CRM_ACL_DAO_EntityRole + */ static function create(&$params) { $dao = new CRM_ACL_DAO_EntityRole(); $dao->copyValues($params); @@ -56,6 +64,10 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole { return $dao; } + /** + * @param $params + * @param $defaults + */ static function retrieve(&$params, &$defaults) { CRM_Core_DAO::commonRetrieve('CRM_ACL_DAO_EntityRole', $params, $defaults); } diff --git a/CRM/ACL/Form/ACL.php b/CRM/ACL/Form/ACL.php index 8ea9078e5c..2741d755e1 100644 --- a/CRM/ACL/Form/ACL.php +++ b/CRM/ACL/Form/ACL.php @@ -186,6 +186,11 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form { $this->addFormRule(array('CRM_ACL_Form_ACL', 'formRule')); } + /** + * @param $params + * + * @return bool + */ static function formRule($params) { $showHide = new CRM_Core_ShowHideBlocks(); diff --git a/CRM/ACL/Form/ACLBasic.php b/CRM/ACL/Form/ACLBasic.php index 0cda38e374..5da5e3f7ff 100644 --- a/CRM/ACL/Form/ACLBasic.php +++ b/CRM/ACL/Form/ACLBasic.php @@ -110,6 +110,11 @@ SELECT object_table $this->addFormRule(array('CRM_ACL_Form_ACLBasic', 'formRule')); } + /** + * @param $params + * + * @return array|bool + */ static function formRule($params) { if ($params['entity_id'] == -1) { $errors = array('entity_id' => ts('Role is a required field')); diff --git a/CRM/Core/Base.php b/CRM/Core/Base.php index 80f1fc5acc..ba103f8527 100644 --- a/CRM/Core/Base.php +++ b/CRM/Core/Base.php @@ -37,6 +37,10 @@ */ require_once 'CRM/Core/I18n.php'; + +/** + * Class CRM_Core_Base + */ class CRM_Core_Base { /** diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index 6e6157f46a..45553e34fd 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -41,6 +41,9 @@ require_once 'Mail.php'; require_once 'api/api.php'; +/** + * Class CRM_Core_Config + */ class CRM_Core_Config extends CRM_Core_Config_Variables { /// /// BASE SYSTEM PROPERTIES (CIVICRM.SETTINGS.PHP) diff --git a/CRM/Core/Controller.php b/CRM/Core/Controller.php index 0d0d739db4..c484164d35 100644 --- a/CRM/Core/Controller.php +++ b/CRM/Core/Controller.php @@ -46,6 +46,9 @@ require_once 'HTML/QuickForm/Controller.php'; require_once 'HTML/QuickForm/Action/Direct.php'; +/** + * Class CRM_Core_Controller + */ class CRM_Core_Controller extends HTML_QuickForm_Controller { /** diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index cee08c1b88..d5e23631b6 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -38,6 +38,10 @@ require_once 'PEAR.php'; require_once 'DB/DataObject.php'; require_once 'CRM/Core/I18n.php'; + +/** + * Class CRM_Core_DAO + */ class CRM_Core_DAO extends DB_DataObject { /** diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php index 0862c03d2d..99af198c10 100644 --- a/CRM/Core/Error.php +++ b/CRM/Core/Error.php @@ -41,6 +41,10 @@ require_once 'PEAR/Exception.php'; require_once 'CRM/Core/Exception.php'; require_once 'Log.php'; + +/** + * Class CRM_Exception + */ class CRM_Exception extends PEAR_Exception { // Redefine the exception so message isn't optional /** diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 55a36e4ade..f2970595c3 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -37,6 +37,10 @@ */ require_once 'HTML/QuickForm/Page.php'; + +/** + * Class CRM_Core_Form + */ class CRM_Core_Form extends HTML_QuickForm_Page { /** diff --git a/CRM/Core/Menu.php b/CRM/Core/Menu.php index ad7ac3cc2a..b629e27e5e 100644 --- a/CRM/Core/Menu.php +++ b/CRM/Core/Menu.php @@ -35,6 +35,10 @@ */ require_once 'CRM/Core/I18n.php'; + +/** + * Class CRM_Core_Menu + */ class CRM_Core_Menu { /** diff --git a/CRM/Core/Payment/Google.php b/CRM/Core/Payment/Google.php index ccf6796812..ca2d49e708 100644 --- a/CRM/Core/Payment/Google.php +++ b/CRM/Core/Payment/Google.php @@ -37,6 +37,10 @@ require_once 'Google/library/googlecart.php'; require_once 'Google/library/googleitem.php'; require_once 'Google/library/googlesubscription.php'; require_once 'Google/library/googlerequest.php'; + +/** + * Class CRM_Core_Payment_Google + */ class CRM_Core_Payment_Google extends CRM_Core_Payment { /** diff --git a/CRM/Core/Payment/GoogleIPN.php b/CRM/Core/Payment/GoogleIPN.php index 4a8e762cd9..8045763362 100644 --- a/CRM/Core/Payment/GoogleIPN.php +++ b/CRM/Core/Payment/GoogleIPN.php @@ -35,6 +35,10 @@ define('GOOGLE_DEBUG_PP', 0); + +/** + * Class CRM_Core_Payment_GoogleIPN + */ class CRM_Core_Payment_GoogleIPN extends CRM_Core_Payment_BaseIPN { /** diff --git a/CRM/Core/Payment/PayflowPro.php b/CRM/Core/Payment/PayflowPro.php index 43b0993ff1..0b3957f021 100644 --- a/CRM/Core/Payment/PayflowPro.php +++ b/CRM/Core/Payment/PayflowPro.php @@ -8,6 +8,10 @@ | Written & Contributed by Eileen McNaughton - 2009 | +---------------------------------------------------------------------------+ */ + +/** + * Class CRM_Core_Payment_PayflowPro + */ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment { // (not used, implicit in the API, might need to convert?) CONST diff --git a/CRM/Core/QuickForm/Action.php b/CRM/Core/QuickForm/Action.php index 23c06f73be..5ba26e4416 100644 --- a/CRM/Core/QuickForm/Action.php +++ b/CRM/Core/QuickForm/Action.php @@ -35,6 +35,10 @@ * */ require_once 'HTML/QuickForm/Action.php'; + +/** + * Class CRM_Core_QuickForm_Action + */ class CRM_Core_QuickForm_Action extends HTML_QuickForm_Action { /** diff --git a/CRM/Core/QuickForm/NestedAdvMultiSelect.php b/CRM/Core/QuickForm/NestedAdvMultiSelect.php index f148e4ab07..e403a48e69 100644 --- a/CRM/Core/QuickForm/NestedAdvMultiSelect.php +++ b/CRM/Core/QuickForm/NestedAdvMultiSelect.php @@ -35,6 +35,10 @@ */ require_once 'HTML/QuickForm/advmultiselect.php'; + +/** + * Class CRM_Core_QuickForm_NestedAdvMultiSelect + */ class CRM_Core_QuickForm_NestedAdvMultiSelect extends HTML_QuickForm_advmultiselect { /** * Loads options from different types of data sources diff --git a/CRM/Extension/Exception.php b/CRM/Extension/Exception.php index 9bfd6eaba7..c3966ba481 100644 --- a/CRM/Extension/Exception.php +++ b/CRM/Extension/Exception.php @@ -25,5 +25,8 @@ +--------------------------------------------------------------------+ */ +/** + * Class CRM_Extension_Exception + */ class CRM_Extension_Exception extends CRM_Core_Exception { } diff --git a/CRM/Mailing/Event/BAO/Reply.php b/CRM/Mailing/Event/BAO/Reply.php index f80573b1d8..cac6deb61a 100644 --- a/CRM/Mailing/Event/BAO/Reply.php +++ b/CRM/Mailing/Event/BAO/Reply.php @@ -37,6 +37,10 @@ require_once 'Mail/mime.php'; require_once 'ezc/Base/src/ezc_bootstrap.php'; require_once 'ezc/autoload/mail_autoload.php'; + +/** + * Class CRM_Mailing_Event_BAO_Reply + */ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply { /** diff --git a/CRM/Mailing/Event/BAO/Subscribe.php b/CRM/Mailing/Event/BAO/Subscribe.php index add0cdc0d1..1f71d0a858 100644 --- a/CRM/Mailing/Event/BAO/Subscribe.php +++ b/CRM/Mailing/Event/BAO/Subscribe.php @@ -35,6 +35,10 @@ require_once 'Mail/mime.php'; + +/** + * Class CRM_Mailing_Event_BAO_Subscribe + */ class CRM_Mailing_Event_BAO_Subscribe extends CRM_Mailing_Event_DAO_Subscribe { /** diff --git a/CRM/Mailing/MailStore/Imap.php b/CRM/Mailing/MailStore/Imap.php index c45afc6d99..6ae64b626a 100644 --- a/CRM/Mailing/MailStore/Imap.php +++ b/CRM/Mailing/MailStore/Imap.php @@ -35,6 +35,10 @@ require_once 'ezc/Base/src/ezc_bootstrap.php'; require_once 'ezc/autoload/mail_autoload.php'; + +/** + * Class CRM_Mailing_MailStore_Imap + */ class CRM_Mailing_MailStore_Imap extends CRM_Mailing_MailStore { /** diff --git a/CRM/Mailing/MailStore/Localdir.php b/CRM/Mailing/MailStore/Localdir.php index fc9ad0619b..8e88ce476f 100644 --- a/CRM/Mailing/MailStore/Localdir.php +++ b/CRM/Mailing/MailStore/Localdir.php @@ -35,6 +35,10 @@ require_once 'ezc/Base/src/ezc_bootstrap.php'; require_once 'ezc/autoload/mail_autoload.php'; + +/** + * Class CRM_Mailing_MailStore_Localdir + */ class CRM_Mailing_MailStore_Localdir extends CRM_Mailing_MailStore { /** diff --git a/CRM/Mailing/MailStore/Maildir.php b/CRM/Mailing/MailStore/Maildir.php index 6af2f38a4b..c273cd8fdb 100644 --- a/CRM/Mailing/MailStore/Maildir.php +++ b/CRM/Mailing/MailStore/Maildir.php @@ -35,6 +35,10 @@ require_once 'ezc/Base/src/ezc_bootstrap.php'; require_once 'ezc/autoload/mail_autoload.php'; + +/** + * Class CRM_Mailing_MailStore_Maildir + */ class CRM_Mailing_MailStore_Maildir extends CRM_Mailing_MailStore { /** diff --git a/CRM/Mailing/MailStore/Mbox.php b/CRM/Mailing/MailStore/Mbox.php index 640a4565d7..3ad2e2cf8f 100644 --- a/CRM/Mailing/MailStore/Mbox.php +++ b/CRM/Mailing/MailStore/Mbox.php @@ -35,6 +35,10 @@ require_once 'ezc/Base/src/ezc_bootstrap.php'; require_once 'ezc/autoload/mail_autoload.php'; + +/** + * Class CRM_Mailing_MailStore_Mbox + */ class CRM_Mailing_MailStore_Mbox extends CRM_Mailing_MailStore { /** diff --git a/CRM/Mailing/MailStore/Pop3.php b/CRM/Mailing/MailStore/Pop3.php index 6927b982bd..003588536e 100644 --- a/CRM/Mailing/MailStore/Pop3.php +++ b/CRM/Mailing/MailStore/Pop3.php @@ -35,6 +35,10 @@ require_once 'ezc/Base/src/ezc_bootstrap.php'; require_once 'ezc/autoload/mail_autoload.php'; + +/** + * Class CRM_Mailing_MailStore_Pop3 + */ class CRM_Mailing_MailStore_Pop3 extends CRM_Mailing_MailStore { /** diff --git a/CRM/Queue/Menu.php b/CRM/Queue/Menu.php index bbc22119ac..8c72cb856e 100644 --- a/CRM/Queue/Menu.php +++ b/CRM/Queue/Menu.php @@ -37,6 +37,10 @@ */ require_once 'CRM/Core/I18n.php'; + +/** + * Class CRM_Queue_Menu + */ class CRM_Queue_Menu { static function alter($path, &$menuPath) { -- 2.25.1