From a0ee39412f184b0b9406094847554851ca2869f2 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 24 May 2014 14:57:15 +1200 Subject: [PATCH] CRM/Core add missing comment blocks (autogenerated) --- CRM/Core/BAO/File.php | 9 +- CRM/Core/Block.php | 5 ++ CRM/Core/ClassLoader.php | 11 +++ CRM/Core/Component.php | 89 ++++++++++++++++++++ CRM/Core/Component/Info.php | 5 ++ CRM/Core/Controller.php | 42 +++++++++ CRM/Core/Controller/Simple.php | 6 ++ CRM/Core/DAO.php | 70 +++++++++++++++ CRM/Core/DAO/Factory.php | 6 ++ CRM/Core/Error.php | 40 +++++++++ CRM/Core/Exception.php | 10 +++ CRM/Core/Form.php | 84 ++++++++++++++++++ CRM/Core/I18n/NativeGettext.php | 12 +++ CRM/Core/I18n/PseudoConstant.php | 13 +++ CRM/Core/I18n/Schema.php | 15 ++++ CRM/Core/I18n/SchemaStructure_2_2_0.php | 9 ++ CRM/Core/I18n/SchemaStructure_3_0_alpha1.php | 9 ++ CRM/Core/I18n/SchemaStructure_3_0_beta1.php | 9 ++ CRM/Core/I18n/SchemaStructure_3_0_beta4.php | 9 ++ CRM/Core/I18n/SchemaStructure_3_1_alpha1.php | 9 ++ CRM/Core/I18n/SchemaStructure_3_1_beta2.php | 9 ++ CRM/Core/I18n/SchemaStructure_3_2_beta4.php | 9 ++ CRM/Core/I18n/SchemaStructure_3_3_beta1.php | 11 +++ CRM/Core/I18n/SchemaStructure_3_4_0.php | 9 ++ CRM/Core/I18n/SchemaStructure_3_4_beta2.php | 9 ++ CRM/Core/I18n/SchemaStructure_3_4_beta3.php | 9 ++ CRM/Core/I18n/SchemaStructure_4_1_0.php | 9 ++ CRM/Core/I18n/SchemaStructure_4_1_alpha1.php | 9 ++ CRM/Core/I18n/SchemaStructure_4_2_alpha1.php | 11 +++ CRM/Core/I18n/SchemaStructure_4_3_1.php | 11 +++ CRM/Core/I18n/SchemaStructure_4_5_alpha1.php | 11 +++ CRM/Core/Invoke.php | 9 ++ CRM/Core/JobManager.php | 43 ++++++++++ CRM/Core/Key.php | 8 ++ CRM/Core/Lock.php | 12 +++ CRM/Core/ManagedEntities.php | 11 +++ CRM/Core/Menu.php | 59 +++++++++++++ CRM/Core/Module.php | 4 + CRM/Core/OptionGroup.php | 57 +++++++++++++ CRM/Core/Page.php | 12 +++ CRM/Core/Page/Angular.php | 3 + CRM/Core/Page/Basic.php | 3 + CRM/Core/Payment.php | 12 +++ CRM/Core/Permission.php | 84 ++++++++++++++++++ CRM/Core/Permission/DrupalBase.php | 5 ++ CRM/Core/PseudoConstant.php | 11 +++ CRM/Core/QuickForm/Action/Upload.php | 6 ++ CRM/Core/Reference/Basic.php | 37 ++++++++ CRM/Core/Reference/Dynamic.php | 10 +++ CRM/Core/Reference/OptionValue.php | 24 +++++- CRM/Core/Region.php | 18 ++++ CRM/Core/Report/Excel.php | 7 ++ CRM/Core/Resources.php | 6 ++ CRM/Core/ScheduledJob.php | 9 ++ CRM/Core/Selector/Base.php | 9 ++ CRM/Core/Selector/Controller.php | 9 ++ CRM/Core/Session.php | 9 ++ CRM/Core/Smarty.php | 7 ++ CRM/Core/Smarty/Permissions.php | 5 ++ CRM/Core/Smarty/plugins/block.crmScope.php | 4 + CRM/Core/Smarty/resources/String.php | 17 ++++ CRM/Core/StateMachine.php | 12 +++ CRM/Core/TableHierarchy.php | 3 + CRM/Core/TemporaryErrorScope.php | 3 + CRM/Core/Transaction.php | 14 +++ 65 files changed, 1109 insertions(+), 2 deletions(-) diff --git a/CRM/Core/BAO/File.php b/CRM/Core/BAO/File.php index c1bd7a08f7..db765e5627 100644 --- a/CRM/Core/BAO/File.php +++ b/CRM/Core/BAO/File.php @@ -577,7 +577,14 @@ } } - static function deleteURLArgs($entityTable, $entityID, $fileID) { + /** + * @param $entityTable + * @param $entityID + * @param $fileID + * + * @return string + */ + static function deleteURLArgs($entityTable, $entityID, $fileID) { $params['entityTable'] = $entityTable; $params['entityID'] = $entityID; $params['fileID'] = $fileID; diff --git a/CRM/Core/Block.php b/CRM/Core/Block.php index 04c12f5040..b191735ea7 100644 --- a/CRM/Core/Block.php +++ b/CRM/Core/Block.php @@ -431,6 +431,11 @@ class CRM_Core_Block { self::setProperty(self::CREATE_NEW, 'templateValues', array('shortCuts' => $values)); } + /** + * @param $short + * + * @return array + */ private static function setShortcutValues($short) { $value = array(); if (isset($short['url'])) { diff --git a/CRM/Core/ClassLoader.php b/CRM/Core/ClassLoader.php index b2f1c0afd3..630a16b3ee 100644 --- a/CRM/Core/ClassLoader.php +++ b/CRM/Core/ClassLoader.php @@ -43,6 +43,11 @@ class CRM_Core_ClassLoader { */ private static $_singleton = NULL; + /** + * @param bool $force + * + * @return object + */ static function &singleton($force = FALSE) { if ($force || self::$_singleton === NULL) { self::$_singleton = new CRM_Core_ClassLoader(); @@ -55,6 +60,9 @@ class CRM_Core_ClassLoader { */ protected $_registered; + /** + * + */ protected function __construct() { $this->_registered = FALSE; } @@ -114,6 +122,9 @@ class CRM_Core_ClassLoader { require_once "$civicrm_base_path/packages/vendor/autoload.php"; } + /** + * @param $class + */ function loadClass($class) { if ( // Only load classes that clearly belong to CiviCRM. diff --git a/CRM/Core/Component.php b/CRM/Core/Component.php index f5e5ea6a77..c5c49a6a4f 100644 --- a/CRM/Core/Component.php +++ b/CRM/Core/Component.php @@ -46,6 +46,11 @@ class CRM_Core_Component { static $_contactSubTypes = NULL; + /** + * @param bool $force + * + * @return array|null + */ private static function &_info($force = FALSE) { if (self::$_info == NULL || $force) { self::$_info = array(); @@ -64,6 +69,12 @@ class CRM_Core_Component { return self::$_info; } + /** + * @param $name + * @param null $attribute + * + * @return mixed + */ static function get($name, $attribute = NULL) { $comp = CRM_Utils_Array::value($name, self::_info()); if ($attribute) { @@ -72,6 +83,12 @@ class CRM_Core_Component { return $comp; } + /** + * @param bool $force + * + * @return array + * @throws Exception + */ public static function &getComponents($force = FALSE) { static $_cache = NULL; @@ -95,6 +112,11 @@ class CRM_Core_Component { return $_cache; } + /** + * @param bool $force + * + * @return array|null + */ static public function &getEnabledComponents($force = FALSE) { return self::_info($force); } @@ -103,6 +125,11 @@ class CRM_Core_Component { self::getEnabledComponents(TRUE); } + /** + * @param bool $translated + * + * @return array + */ public static function &getNames($translated = FALSE) { $allComponents = self::getComponents(); @@ -118,6 +145,12 @@ class CRM_Core_Component { return $names; } + /** + * @param $args + * @param $type + * + * @return bool + */ static function invoke(&$args, $type) { $info = self::_info(); $config = CRM_Core_Config::singleton(); @@ -150,6 +183,9 @@ class CRM_Core_Component { return FALSE; } + /** + * @return array + */ static function xmlMenu() { // lets build the menu for all components @@ -165,6 +201,9 @@ class CRM_Core_Component { return $files; } + /** + * @return array + */ static function &menu() { $info = self::_info(); $items = array(); @@ -180,6 +219,10 @@ class CRM_Core_Component { return $items; } + /** + * @param $config + * @param bool $oldMode + */ static function addConfig(&$config, $oldMode = FALSE) { $info = self::_info(); @@ -190,12 +233,22 @@ class CRM_Core_Component { return; } + /** + * @param $componentName + * + * @return mixed + */ static function getComponentID($componentName) { $info = self::_info(); return $info[$componentName]->componentID; } + /** + * @param $componentID + * + * @return int|null|string + */ static function getComponentName($componentID) { $info = self::_info(); @@ -210,6 +263,9 @@ class CRM_Core_Component { return $componentName; } + /** + * @return array + */ static function &getQueryFields() { $info = self::_info(); $fields = array(); @@ -223,6 +279,10 @@ class CRM_Core_Component { return $fields; } + /** + * @param $query + * @param $fnName + */ static function alterQuery(&$query, $fnName) { $info = self::_info(); @@ -234,6 +294,13 @@ class CRM_Core_Component { } } + /** + * @param $fieldName + * @param $mode + * @param $side + * + * @return null + */ static function from($fieldName, $mode, $side) { $info = self::_info(); @@ -250,6 +317,12 @@ class CRM_Core_Component { return $from; } + /** + * @param $mode + * @param bool $includeCustomFields + * + * @return null + */ static function &defaultReturnProperties($mode, $includeCustomFields = TRUE ) { @@ -268,6 +341,9 @@ class CRM_Core_Component { return $properties; } + /** + * @param $form + */ static function &buildSearchForm(&$form) { $info = self::_info(); @@ -279,6 +355,10 @@ class CRM_Core_Component { } } + /** + * @param $row + * @param $id + */ static function searchAction(&$row, $id) { $info = self::_info(); @@ -290,6 +370,9 @@ class CRM_Core_Component { } } + /** + * @return array|null + */ static function &contactSubTypes() { if (self::$_contactSubTypes == NULL) { self::$_contactSubTypes = array(); @@ -298,6 +381,12 @@ class CRM_Core_Component { } + /** + * @param $subType + * @param $op + * + * @return null + */ static function &contactSubTypeProperties($subType, $op) { $properties = self::contactSubTypes(); if (array_key_exists($subType, $properties) && diff --git a/CRM/Core/Component/Info.php b/CRM/Core/Component/Info.php index cfdc1bb40f..c9433c5c34 100644 --- a/CRM/Core/Component/Info.php +++ b/CRM/Core/Component/Info.php @@ -107,6 +107,11 @@ abstract class CRM_Core_Component_Info { * @access public * */ + /** + * @param $name + * @param $namespace + * @param $componentID + */ public function __construct($name, $namespace, $componentID) { $this->name = $name; $this->namespace = $namespace; diff --git a/CRM/Core/Controller.php b/CRM/Core/Controller.php index c484164d35..e9c7b031be 100644 --- a/CRM/Core/Controller.php +++ b/CRM/Core/Controller.php @@ -289,6 +289,13 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { ); } + /** + * @param $name + * @param bool $addSequence + * @param bool $ignoreKey + * + * @return mixed|string + */ function key($name, $addSequence = FALSE, $ignoreKey = FALSE) { $config = CRM_Core_Config::singleton(); @@ -349,6 +356,9 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { return $this->_pages[$pageName]->handle($action); } + /** + * @return bool + */ function validate() { $this->_actionName = $this->getActionName(); list($pageName, $action) = $this->_actionName; @@ -584,6 +594,9 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { return $wizard; } + /** + * @param $wizard + */ function addWizardStyle(&$wizard) { $wizard['style'] = array( 'barClass' => '', @@ -692,6 +705,9 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { return $this->_skipRedirection; } + /** + * @param null $fileName + */ function setWord($fileName = NULL) { //Mark as a CSV file. header('Content-Type: application/vnd.ms-word'); @@ -703,6 +719,9 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { header("Content-Disposition: attachment; filename=Contacts_$fileName"); } + /** + * @param null $fileName + */ function setExcel($fileName = NULL) { //Mark as an excel file. header('Content-Type: application/vnd.ms-excel'); @@ -743,6 +762,9 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { return $this->_print; } + /** + * @return string + */ function getTemplateFile() { if ($this->_print) { if ($this->_print == CRM_Core_Smarty::PRINT_PAGE) { @@ -761,6 +783,10 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { } } + /** + * @param $uploadDir + * @param $uploadNames + */ public function addUploadAction($uploadDir, $uploadNames) { if (empty($uploadDir)) { $config = CRM_Core_Config::singleton(); @@ -786,18 +812,31 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { $this->addAction('upload', $action); } + /** + * @param $parent + */ public function setParent($parent) { $this->_parent = $parent; } + /** + * @return object + */ public function getParent() { return $this->_parent; } + /** + * @return string + */ public function getDestination() { return $this->_destination; } + /** + * @param null $url + * @param bool $setToReferer + */ public function setDestination($url = NULL, $setToReferer = FALSE) { if (empty($url)) { if ($setToReferer) { @@ -813,6 +852,9 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { $this->set('civicrmDestination', $this->_destination); } + /** + * @return mixed + */ public function cancelAction() { $actionName = $this->getActionName(); list($pageName, $action) = $actionName; diff --git a/CRM/Core/Controller/Simple.php b/CRM/Core/Controller/Simple.php index 5fb151bed8..7dafbf7f64 100644 --- a/CRM/Core/Controller/Simple.php +++ b/CRM/Core/Controller/Simple.php @@ -109,10 +109,16 @@ class CRM_Core_Controller_Simple extends CRM_Core_Controller { } } + /** + * @param $parent + */ public function setParent($parent) { $this->_parent = $parent; } + /** + * @return mixed + */ public function getTemplateFileName() { // there is only one form here, so should be quite easy $actionName = $this->getActionName(); diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index d5e23631b6..f6eaaec768 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -135,6 +135,11 @@ class CRM_Core_DAO extends DB_DataObject { $this->joinAdd(); } + /** + * @param $tableName + * + * @return string + */ static function getLocaleTableName($tableName) { global $dbLocale; if ($dbLocale) { @@ -283,6 +288,9 @@ class CRM_Core_DAO extends DB_DataObject { return $table; } + /** + * @return $this + */ function save() { if (!empty($this->id)) { $this->update(); @@ -297,6 +305,9 @@ class CRM_Core_DAO extends DB_DataObject { return $this; } + /** + * @param bool $created + */ function log($created = FALSE) { static $cid = NULL; @@ -471,6 +482,11 @@ class CRM_Core_DAO extends DB_DataObject { return NULL; } + /** + * @param $type + * + * @throws Exception + */ static function transaction($type) { CRM_Core_Error::fatal('This function is obsolete, please use CRM_Core_Transaction'); } @@ -574,6 +590,11 @@ LIKE %1 return $values; } + /** + * @param int $maxTablesToCheck + * + * @return bool + */ static function isDBMyISAM($maxTablesToCheck = 10) { // show error if any of the tables, use 'MyISAM' storage engine. $engines = self::getStorageValues(NULL, $maxTablesToCheck); @@ -731,6 +752,11 @@ LIKE %1 return $result; } + /** + * @param $version + * + * @return bool + */ function checkVersion($version) { $query = " SELECT version @@ -986,6 +1012,14 @@ FROM civicrm_domain return $ret; } + /** + * @param $query + * @param $params + * @param bool $abort + * + * @return string + * @throws Exception + */ static function composeQuery($query, &$params, $abort = TRUE) { $tr = array(); foreach ($params as $key => $item) { @@ -1030,6 +1064,9 @@ FROM civicrm_domain return strtr($query, $tr); } + /** + * @param null $ids + */ static function freeResult($ids = NULL) { global $_DB_DATAOBJECT; @@ -1239,6 +1276,11 @@ SELECT contact_id ); } + /** + * @param $string + * + * @return string + */ static function escapeString($string) { static $_dao = NULL; @@ -1270,6 +1312,11 @@ SELECT contact_id return '"' . implode('","', $escapes) . '"'; } + /** + * @param $string + * + * @return string + */ static function escapeWildCardString($string) { // CRM-9155 // ensure we escape the single characters % and _ which are mysql wild @@ -1506,6 +1553,13 @@ SELECT contact_id } } + /** + * @param string $prefix + * @param bool $addRandomString + * @param null $string + * + * @return string + */ static function createTempTableName($prefix = 'civicrm', $addRandomString = TRUE, $string = NULL) { $tableName = $prefix . "_temp"; @@ -1520,6 +1574,12 @@ SELECT contact_id return $tableName; } + /** + * @param bool $view + * @param bool $trigger + * + * @return bool + */ static function checkTriggerViewPermission($view = TRUE, $trigger = TRUE) { // test for create view and trigger permissions and if allowed, add the option to go multilingual // and logging @@ -1561,6 +1621,10 @@ SELECT contact_id return TRUE; } + /** + * @param null $message + * @param bool $printDAO + */ static function debugPrint($message = NULL, $printDAO = TRUE) { CRM_Utils_System::xMemory("{$message}: "); @@ -1790,6 +1854,9 @@ SELECT contact_id return $occurrences; } + /** + * @return array + */ function getReferenceCounts() { $links = self::getReferencesToTable(static::getTableName()); @@ -2073,6 +2140,9 @@ SELECT contact_id return substr($string, 0, $length - 8) . "_{$md5string}"; } + /** + * @param $params + */ function setApiFilter(&$params) {} } diff --git a/CRM/Core/DAO/Factory.php b/CRM/Core/DAO/Factory.php index 52fb080851..b389988335 100644 --- a/CRM/Core/DAO/Factory.php +++ b/CRM/Core/DAO/Factory.php @@ -22,6 +22,12 @@ class CRM_Core_DAO_Factory { static $_suffix = '.php'; + /** + * @param $className + * + * @return mixed + * @throws Exception + */ static function &create($className) { $type = CRM_Utils_Array::value($className, self::$_classes); if (!$type) { diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php index 99af198c10..05ec54b787 100644 --- a/CRM/Core/Error.php +++ b/CRM/Core/Error.php @@ -66,6 +66,9 @@ class CRM_Exception extends PEAR_Exception { } } +/** + * Class CRM_Core_Error + */ class CRM_Core_Error extends PEAR_ErrorStack { /** @@ -130,6 +133,12 @@ class CRM_Core_Error extends PEAR_ErrorStack { $this->setDefaultCallback(array($this, 'handlePES')); } + /** + * @param $error + * @param string $separator + * + * @return array|null|string + */ static public function getMessages(&$error, $separator = '
') { if (is_a($error, 'CRM_Core_Error')) { $errors = $error->getErrors(); @@ -244,6 +253,9 @@ class CRM_Core_Error extends PEAR_ErrorStack { // this function is used to trap and print errors // during system initialization time. Hence the error // message is quite ugly + /** + * @param $pearError + */ public static function simpleHandler($pearError) { // create the error array @@ -643,6 +655,10 @@ class CRM_Core_Error extends PEAR_ErrorStack { return Log::singleton('file', $fileName); } + /** + * @param string $msg + * @param bool $log + */ static function backtrace($msg = 'backTrace', $log = FALSE) { $backTrace = debug_backtrace(); $message = self::formatBacktrace($backTrace); @@ -793,6 +809,14 @@ class CRM_Core_Error extends PEAR_ErrorStack { return $msg; } + /** + * @param $message + * @param int $code + * @param string $level + * @param null $params + * + * @return object + */ static function createError($message, $code = 8000, $level = 'Fatal', $params = NULL) { $error = CRM_Core_Error::singleton(); $error->push($code, $level, array($params), $message); @@ -864,6 +888,13 @@ class CRM_Core_Error extends PEAR_ErrorStack { * This function is no longer used by v3 api. * @fixme Some core files call it but it should be re-thought & renamed or removed */ + /** + * @param $msg + * @param null $data + * + * @return array + * @throws Exception + */ public static function &createAPIError($msg, $data = NULL) { if (self::$modeException) { throw new Exception($msg, $data); @@ -879,6 +910,9 @@ class CRM_Core_Error extends PEAR_ErrorStack { return $values; } + /** + * @param $file + */ public static function movedSiteError($file) { $url = CRM_Utils_System::url('civicrm/admin/setting/updateConfigBackend', 'reset=1', @@ -899,6 +933,12 @@ class CRM_Core_Error extends PEAR_ErrorStack { CRM_Utils_System::civiExit($code); } + /** + * @param $error + * @param const $type + * + * @return bool + */ public static function isAPIError($error, $type = CRM_Core_Error::FATAL_ERROR) { if (is_array($error) && !empty($error['is_error'])) { $code = $error['error_message']['code']; diff --git a/CRM/Core/Exception.php b/CRM/Core/Exception.php index f6e8dfea67..ea319b5736 100644 --- a/CRM/Core/Exception.php +++ b/CRM/Core/Exception.php @@ -38,12 +38,22 @@ class CRM_Core_Exception extends PEAR_Exception { private $errorData = array(); + + /** + * @param $message + * @param int $error_code + * @param array $errorData + * @param null $previous + */ public function __construct($message, $error_code = 0, $errorData = array(), $previous = null) { parent::__construct(ts($message)); $this->errorData = $errorData + array('error_code' => $error_code); } // custom string representation of object + /** + * @return string + */ public function __toString() { return __CLASS__ . ": [{$this->errorData['error_code']}: {$this->message}\n"; } diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index f2970595c3..89c88a26dc 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -816,6 +816,16 @@ class CRM_Core_Form extends HTML_QuickForm_Page { return self::$_template->get_template_vars($name); } + /** + * @param $name + * @param $title + * @param $values + * @param array $attributes + * @param null $separator + * @param bool $required + * + * @return HTML_QuickForm_group + */ function &addRadio($name, $title, $values, $attributes = array(), $separator = NULL, $required = FALSE) { $options = array(); $attributes = $attributes ? $attributes : array(); @@ -835,6 +845,13 @@ class CRM_Core_Form extends HTML_QuickForm_Page { return $group; } + /** + * @param $id + * @param $title + * @param bool $allowClear + * @param null $required + * @param array $attributes + */ function addYesNo($id, $title, $allowClear = FALSE, $required = NULL, $attributes = array()) { $attributes += array('id_suffix' => $id); $choice = array(); @@ -850,6 +867,17 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } } + /** + * @param $id + * @param $title + * @param $values + * @param null $other + * @param null $attributes + * @param null $required + * @param null $javascriptMethod + * @param string $separator + * @param bool $flipValues + */ function addCheckBox($id, $title, $values, $other = NULL, $attributes = NULL, $required = NULL, $javascriptMethod = NULL, @@ -932,6 +960,15 @@ class CRM_Core_Form extends HTML_QuickForm_Page { $this->addButtons($buttons); } + /** + * @param $name + * @param string $from + * @param string $to + * @param string $label + * @param string $dateFormat + * @param bool $required + * @param bool $displayTime + */ function addDateRange($name, $from = '_from', $to = '_to', $label = 'From:', $dateFormat = 'searchDate', $required = FALSE, $displayTime = FALSE) { if ($displayTime) { $this->addDateTime($name . $from, $label, $required, array('formatType' => $dateFormat)); @@ -1026,6 +1063,12 @@ class CRM_Core_Form extends HTML_QuickForm_Page { )); } + /** + * @param $name + * @param $label + * @param $attributes + * @param bool $forceTextarea + */ function addWysiwyg($name, $label, $attributes, $forceTextarea = FALSE) { // 1. Get configuration option for editor (tinymce, ckeditor, pure textarea) // 2. Based on the option, initialise proper editor @@ -1064,6 +1107,12 @@ class CRM_Core_Form extends HTML_QuickForm_Page { $this->assign('includeWysiwygEditor', $includeWysiwygEditor); } + /** + * @param $id + * @param $title + * @param null $required + * @param null $extra + */ function addCountry($id, $title, $required = NULL, $extra = NULL) { $this->addElement('select', $id, $title, array( @@ -1074,6 +1123,14 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } } + /** + * @param $name + * @param $label + * @param $options + * @param $attributes + * @param null $required + * @param null $javascriptMethod + */ function addSelectOther($name, $label, $options, $attributes, $required = NULL, $javascriptMethod = NULL) { $this->addElement('select', $name . '_id', $label, $options, $javascriptMethod); @@ -1083,18 +1140,30 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } } + /** + * @return null + */ public function getRootTitle() { return NULL; } + /** + * @return string + */ public function getCompleteTitle() { return $this->getRootTitle() . $this->getTitle(); } + /** + * @return CRM_Core_Smarty + */ static function &getTemplate() { return self::$_template; } + /** + * @param $elementName + */ function addUploadElement($elementName) { $uploadNames = $this->get('uploadNames'); if (!$uploadNames) { @@ -1120,6 +1189,9 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } } + /** + * @return string + */ function buttonType() { $uploadNames = $this->get('uploadNames'); $buttonType = (is_array($uploadNames) && !empty($uploadNames)) ? 'upload' : 'next'; @@ -1127,10 +1199,19 @@ class CRM_Core_Form extends HTML_QuickForm_Page { return $buttonType; } + /** + * @param $name + * + * @return null + */ function getVar($name) { return isset($this->$name) ? $this->$name : NULL; } + /** + * @param $name + * @param $value + */ function setVar($name, $value) { $this->$name = $value; } @@ -1375,6 +1456,9 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } } + /** + * @param $elementName + */ function removeFileRequiredRules($elementName) { $this->_required = array_diff($this->_required, array($elementName)); if (isset($this->_rules[$elementName])) { diff --git a/CRM/Core/I18n/NativeGettext.php b/CRM/Core/I18n/NativeGettext.php index edc190304a..884731caee 100644 --- a/CRM/Core/I18n/NativeGettext.php +++ b/CRM/Core/I18n/NativeGettext.php @@ -34,6 +34,11 @@ * Convenience class for PHP-Gettext compatibility. */ class CRM_Core_I18n_NativeGettext { + /** + * @param $string + * + * @return string + */ function translate($string) { return gettext($string); } @@ -53,6 +58,13 @@ class CRM_Core_I18n_NativeGettext { } } + /** + * @param $text + * @param $plural + * @param $count + * + * @return string + */ function ngettext($text, $plural, $count) { return ngettext($text, $plural, $count); } diff --git a/CRM/Core/I18n/PseudoConstant.php b/CRM/Core/I18n/PseudoConstant.php index 7d7bc3086c..3c5ba2a194 100644 --- a/CRM/Core/I18n/PseudoConstant.php +++ b/CRM/Core/I18n/PseudoConstant.php @@ -34,11 +34,19 @@ */ class CRM_Core_I18n_PseudoConstant { + /** + * @param $short + * + * @return mixed + */ static function longForShort($short) { $longForShortMapping = self::longForShortMapping(); return $longForShortMapping[$short]; } + /** + * @return array + */ static function &longForShortMapping() { static $longForShortMapping = NULL; if ($longForShortMapping === NULL) { @@ -61,6 +69,11 @@ class CRM_Core_I18n_PseudoConstant { return $longForShortMapping; } + /** + * @param $long + * + * @return string + */ static function shortForLong($long) { return substr($long, 0, 2); } diff --git a/CRM/Core/I18n/Schema.php b/CRM/Core/I18n/Schema.php index 8617953a3d..685ca6d9bb 100644 --- a/CRM/Core/I18n/Schema.php +++ b/CRM/Core/I18n/Schema.php @@ -371,6 +371,12 @@ class CRM_Core_I18n_Schema { return $query; } + /** + * @param null $version + * @param bool $force + * + * @return array + */ static function schemaStructureTables($version = NULL, $force = FALSE) { static $_tables = NULL; if ($_tables === NULL || $force) { @@ -390,6 +396,11 @@ class CRM_Core_I18n_Schema { return $_tables; } + /** + * @param $version + * + * @return mixed + */ static function getLatestSchema($version) { // remove any .upgrade sub-str from version. Makes it easy to do version_compare & give right result $version = str_ireplace(".upgrade", "", $version); @@ -480,6 +491,10 @@ class CRM_Core_I18n_Schema { return "CREATE OR REPLACE VIEW {$table}_{$locale} AS SELECT " . implode(', ', $cols) . " FROM {$table}"; } + /** + * @param $info + * @param null $tableName + */ static function triggerInfo(&$info, $tableName = NULL) { // get the current supported locales $domain = new CRM_Core_DAO_Domain(); diff --git a/CRM/Core/I18n/SchemaStructure_2_2_0.php b/CRM/Core/I18n/SchemaStructure_2_2_0.php index 109d5dcdb6..ec4a0c7e8c 100644 --- a/CRM/Core/I18n/SchemaStructure_2_2_0.php +++ b/CRM/Core/I18n/SchemaStructure_2_2_0.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_2_2_0 { + /** + * @return mixed + */ static function &columns() { static $result = NULL; if (!$result) { @@ -41,6 +44,9 @@ class CRM_Core_I18n_SchemaStructure_2_2_0 { return $result; } + /** + * @return mixed + */ static function &indices() { static $result = NULL; if (!$result) { @@ -49,6 +55,9 @@ class CRM_Core_I18n_SchemaStructure_2_2_0 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_3_0_alpha1.php b/CRM/Core/I18n/SchemaStructure_3_0_alpha1.php index 6c1cdf6ca4..a3f1b9f4d0 100644 --- a/CRM/Core/I18n/SchemaStructure_3_0_alpha1.php +++ b/CRM/Core/I18n/SchemaStructure_3_0_alpha1.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_3_0_alpha1 { + /** + * @return array + */ static function &columns() { static $result = NULL; if (!$result) { @@ -161,6 +164,9 @@ class CRM_Core_I18n_SchemaStructure_3_0_alpha1 { return $result; } + /** + * @return array + */ static function &indices() { static $result = NULL; if (!$result) { @@ -231,6 +237,9 @@ class CRM_Core_I18n_SchemaStructure_3_0_alpha1 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_3_0_beta1.php b/CRM/Core/I18n/SchemaStructure_3_0_beta1.php index 8dff958539..ddde1d66df 100644 --- a/CRM/Core/I18n/SchemaStructure_3_0_beta1.php +++ b/CRM/Core/I18n/SchemaStructure_3_0_beta1.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_3_0_beta1 { + /** + * @return array + */ static function &columns() { static $result = NULL; if (!$result) { @@ -169,6 +172,9 @@ class CRM_Core_I18n_SchemaStructure_3_0_beta1 { return $result; } + /** + * @return array + */ static function &indices() { static $result = NULL; if (!$result) { @@ -247,6 +253,9 @@ class CRM_Core_I18n_SchemaStructure_3_0_beta1 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_3_0_beta4.php b/CRM/Core/I18n/SchemaStructure_3_0_beta4.php index 4c5188a20d..55ffa65c3c 100644 --- a/CRM/Core/I18n/SchemaStructure_3_0_beta4.php +++ b/CRM/Core/I18n/SchemaStructure_3_0_beta4.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_3_0_beta4 { + /** + * @return array + */ static function &columns() { static $result = NULL; if (!$result) { @@ -182,6 +185,9 @@ class CRM_Core_I18n_SchemaStructure_3_0_beta4 { return $result; } + /** + * @return array + */ static function &indices() { static $result = NULL; if (!$result) { @@ -260,6 +266,9 @@ class CRM_Core_I18n_SchemaStructure_3_0_beta4 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_3_1_alpha1.php b/CRM/Core/I18n/SchemaStructure_3_1_alpha1.php index 4e2a04d22b..b5117ceb12 100644 --- a/CRM/Core/I18n/SchemaStructure_3_1_alpha1.php +++ b/CRM/Core/I18n/SchemaStructure_3_1_alpha1.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_3_1_alpha1 { + /** + * @return array + */ static function &columns() { static $result = NULL; if (!$result) { @@ -186,6 +189,9 @@ class CRM_Core_I18n_SchemaStructure_3_1_alpha1 { return $result; } + /** + * @return array + */ static function &indices() { static $result = NULL; if (!$result) { @@ -264,6 +270,9 @@ class CRM_Core_I18n_SchemaStructure_3_1_alpha1 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_3_1_beta2.php b/CRM/Core/I18n/SchemaStructure_3_1_beta2.php index a97235b81f..9174175644 100644 --- a/CRM/Core/I18n/SchemaStructure_3_1_beta2.php +++ b/CRM/Core/I18n/SchemaStructure_3_1_beta2.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_3_1_beta2 { + /** + * @return array + */ static function &columns() { static $result = NULL; if (!$result) { @@ -189,6 +192,9 @@ class CRM_Core_I18n_SchemaStructure_3_1_beta2 { return $result; } + /** + * @return array + */ static function &indices() { static $result = NULL; if (!$result) { @@ -267,6 +273,9 @@ class CRM_Core_I18n_SchemaStructure_3_1_beta2 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_3_2_beta4.php b/CRM/Core/I18n/SchemaStructure_3_2_beta4.php index 2f958eb766..3171239ddf 100644 --- a/CRM/Core/I18n/SchemaStructure_3_2_beta4.php +++ b/CRM/Core/I18n/SchemaStructure_3_2_beta4.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_3_2_beta4 { + /** + * @return array + */ static function &columns() { static $result = NULL; if (!$result) { @@ -190,6 +193,9 @@ class CRM_Core_I18n_SchemaStructure_3_2_beta4 { return $result; } + /** + * @return array + */ static function &indices() { static $result = NULL; if (!$result) { @@ -268,6 +274,9 @@ class CRM_Core_I18n_SchemaStructure_3_2_beta4 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_3_3_beta1.php b/CRM/Core/I18n/SchemaStructure_3_3_beta1.php index 6d3d713b04..28e8894874 100644 --- a/CRM/Core/I18n/SchemaStructure_3_3_beta1.php +++ b/CRM/Core/I18n/SchemaStructure_3_3_beta1.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_3_3_beta1 { + /** + * @return array + */ static function &columns() { static $result = NULL; @@ -198,6 +201,10 @@ class CRM_Core_I18n_SchemaStructure_3_3_beta1 { } return $result; } + + /** + * @return array + */ static function &indices() { static $result = NULL; @@ -276,6 +283,10 @@ class CRM_Core_I18n_SchemaStructure_3_3_beta1 { } return $result; } + + /** + * @return array + */ static function &tables() { static $result = NULL; diff --git a/CRM/Core/I18n/SchemaStructure_3_4_0.php b/CRM/Core/I18n/SchemaStructure_3_4_0.php index e717c74d5a..ef9a99fb73 100644 --- a/CRM/Core/I18n/SchemaStructure_3_4_0.php +++ b/CRM/Core/I18n/SchemaStructure_3_4_0.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_3_4_0 { + /** + * @return array + */ static function &columns() { static $result = NULL; if (!$result) { @@ -165,6 +168,9 @@ class CRM_Core_I18n_SchemaStructure_3_4_0 { return $result; } + /** + * @return array + */ static function &indices() { static $result = NULL; if (!$result) { @@ -203,6 +209,9 @@ class CRM_Core_I18n_SchemaStructure_3_4_0 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_3_4_beta2.php b/CRM/Core/I18n/SchemaStructure_3_4_beta2.php index d88acb5a9d..9424b7f18a 100644 --- a/CRM/Core/I18n/SchemaStructure_3_4_beta2.php +++ b/CRM/Core/I18n/SchemaStructure_3_4_beta2.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_3_4_beta2 { + /** + * @return array + */ static function &columns() { static $result = NULL; if (!$result) { @@ -198,6 +201,9 @@ class CRM_Core_I18n_SchemaStructure_3_4_beta2 { return $result; } + /** + * @return array + */ static function &indices() { static $result = NULL; if (!$result) { @@ -276,6 +282,9 @@ class CRM_Core_I18n_SchemaStructure_3_4_beta2 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_3_4_beta3.php b/CRM/Core/I18n/SchemaStructure_3_4_beta3.php index bcb31f5317..28bba0ee38 100644 --- a/CRM/Core/I18n/SchemaStructure_3_4_beta3.php +++ b/CRM/Core/I18n/SchemaStructure_3_4_beta3.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_3_4_beta3 { + /** + * @return array + */ static function &columns() { static $result = NULL; if (!$result) { @@ -165,6 +168,9 @@ class CRM_Core_I18n_SchemaStructure_3_4_beta3 { return $result; } + /** + * @return array + */ static function &indices() { static $result = NULL; if (!$result) { @@ -203,6 +209,9 @@ class CRM_Core_I18n_SchemaStructure_3_4_beta3 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_4_1_0.php b/CRM/Core/I18n/SchemaStructure_4_1_0.php index d391d09808..eb4d3f3a85 100644 --- a/CRM/Core/I18n/SchemaStructure_4_1_0.php +++ b/CRM/Core/I18n/SchemaStructure_4_1_0.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_4_1_0 { + /** + * @return array + */ static function &columns() { static $result = NULL; if (!$result) { @@ -171,6 +174,9 @@ class CRM_Core_I18n_SchemaStructure_4_1_0 { return $result; } + /** + * @return array + */ static function &indices() { static $result = NULL; if (!$result) { @@ -209,6 +215,9 @@ class CRM_Core_I18n_SchemaStructure_4_1_0 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_4_1_alpha1.php b/CRM/Core/I18n/SchemaStructure_4_1_alpha1.php index 064539c1dc..9c1a54f549 100644 --- a/CRM/Core/I18n/SchemaStructure_4_1_alpha1.php +++ b/CRM/Core/I18n/SchemaStructure_4_1_alpha1.php @@ -33,6 +33,9 @@ * */ class CRM_Core_I18n_SchemaStructure_4_1_alpha1 { + /** + * @return array + */ static function &columns() { static $result = NULL; if (!$result) { @@ -168,6 +171,9 @@ class CRM_Core_I18n_SchemaStructure_4_1_alpha1 { return $result; } + /** + * @return array + */ static function &indices() { static $result = NULL; if (!$result) { @@ -206,6 +212,9 @@ class CRM_Core_I18n_SchemaStructure_4_1_alpha1 { return $result; } + /** + * @return array + */ static function &tables() { static $result = NULL; if (!$result) { diff --git a/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php b/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php index fb7d435d31..b15c339ee8 100644 --- a/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php +++ b/CRM/Core/I18n/SchemaStructure_4_2_alpha1.php @@ -33,6 +33,9 @@ */ class CRM_Core_I18n_SchemaStructure_4_2_alpha1 { + /** + * @return array + */ static function &columns() { static $result = null; @@ -178,6 +181,10 @@ class CRM_Core_I18n_SchemaStructure_4_2_alpha1 } return $result; } + + /** + * @return array + */ static function &indices() { static $result = null; @@ -216,6 +223,10 @@ class CRM_Core_I18n_SchemaStructure_4_2_alpha1 } return $result; } + + /** + * @return array + */ static function &tables() { static $result = null; diff --git a/CRM/Core/I18n/SchemaStructure_4_3_1.php b/CRM/Core/I18n/SchemaStructure_4_3_1.php index 8dcb438702..cbd03d8fbc 100644 --- a/CRM/Core/I18n/SchemaStructure_4_3_1.php +++ b/CRM/Core/I18n/SchemaStructure_4_3_1.php @@ -33,6 +33,9 @@ */ class CRM_Core_I18n_SchemaStructure_4_3_1 { + /** + * @return array + */ static function &columns() { static $result = null; @@ -183,6 +186,10 @@ class CRM_Core_I18n_SchemaStructure_4_3_1 } return $result; } + + /** + * @return array + */ static function &indices() { static $result = null; @@ -221,6 +228,10 @@ class CRM_Core_I18n_SchemaStructure_4_3_1 } return $result; } + + /** + * @return array + */ static function &tables() { static $result = null; diff --git a/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php b/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php index a11f045ab3..550ce0c018 100644 --- a/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php +++ b/CRM/Core/I18n/SchemaStructure_4_5_alpha1.php @@ -33,6 +33,9 @@ * DO NOT EDIT. Generated by CRM_Core_CodeGen */ class CRM_Core_I18n_SchemaStructure_4_5_alpha1 { + /** + * @return array + */ static function &columns() { static $result = null; if (!$result) { @@ -182,6 +185,10 @@ class CRM_Core_I18n_SchemaStructure_4_5_alpha1 { } return $result; } + + /** + * @return array + */ static function &indices() { static $result = null; @@ -220,6 +227,10 @@ class CRM_Core_I18n_SchemaStructure_4_5_alpha1 { } return $result; } + + /** + * @return array + */ static function &tables() { static $result = null; diff --git a/CRM/Core/Invoke.php b/CRM/Core/Invoke.php index 0a3e7a58ab..67d293a239 100644 --- a/CRM/Core/Invoke.php +++ b/CRM/Core/Invoke.php @@ -57,6 +57,9 @@ class CRM_Core_Invoke { } } + /** + * @param $args + */ protected static function _invoke($args) { if ($args[0] !== 'civicrm') { return; @@ -375,6 +378,12 @@ class CRM_Core_Invoke { $template->assign('newer_civicrm_version', $newerVersion); } + /** + * @param bool $triggerRebuild + * @param bool $sessionReset + * + * @throws Exception + */ static function rebuildMenuAndCaches($triggerRebuild = FALSE, $sessionReset = FALSE) { $config = CRM_Core_Config::singleton(); $config->clearModuleList(); diff --git a/CRM/Core/JobManager.php b/CRM/Core/JobManager.php index f8f0198a36..d41b66cf57 100644 --- a/CRM/Core/JobManager.php +++ b/CRM/Core/JobManager.php @@ -58,6 +58,9 @@ class CRM_Core_JobManager { * @access public * */ + /** + * + */ public function __construct() { $config = CRM_Core_Config::singleton(); $config->fatalErrorHandler = 'CRM_Core_JobManager_scheduledJobFatalErrorHandler'; @@ -71,6 +74,9 @@ class CRM_Core_JobManager { * @access private * */ + /** + * @param bool $auth + */ public function execute($auth = TRUE) { $this->logEntry('Starting scheduled jobs execution'); @@ -101,11 +107,18 @@ class CRM_Core_JobManager { */ public function __destruct() {} + /** + * @param $entity + * @param $action + */ public function executeJobByAction($entity, $action) { $job = $this->_getJob(NULL, $entity, $action); $this->executeJob($job); } + /** + * @param $id + */ public function executeJobById($id) { $job = $this->_getJob($id); $this->executeJob($job); @@ -147,6 +160,9 @@ class CRM_Core_JobManager { * @access private * */ + /** + * @return array + */ private function _getJobs() { $jobs = array(); $dao = new CRM_Core_DAO_Job(); @@ -169,6 +185,14 @@ class CRM_Core_JobManager { * @access private * */ + /** + * @param null $id + * @param null $entity + * @param null $action + * + * @return CRM_Core_ScheduledJob + * @throws Exception + */ private function _getJob($id = NULL, $entity = NULL, $action = NULL) { if (is_null($id) && is_null($action)) { CRM_Core_Error::fatal('You need to provide either id or name to use this method'); @@ -185,6 +209,12 @@ class CRM_Core_JobManager { return $job; } + /** + * @param $entity + * @param $job + * @param $params + * @param null $source + */ public function setSingleRunParams($entity, $job, $params, $source = NULL) { $this->_source = $source; $key = strtolower($entity . '_' . $job); @@ -198,6 +228,9 @@ class CRM_Core_JobManager { * @access public * */ + /** + * @param $message + */ public function logEntry($message) { $domainID = CRM_Core_Config::domainID(); $dao = new CRM_Core_DAO_JobLog(); @@ -231,6 +264,11 @@ class CRM_Core_JobManager { $dao->save(); } + /** + * @param $apiResult + * + * @return string + */ private function _apiResultToMessage($apiResult) { $status = $apiResult['is_error'] ? ts('Failure') : ts('Success'); $msg = CRM_Utils_Array::value('error_message', $apiResult, 'empty error_message!'); @@ -246,6 +284,11 @@ class CRM_Core_JobManager { } } +/** + * @param $message + * + * @throws Exception + */ function CRM_Core_JobManager_scheduledJobFatalErrorHandler($message) { throw new Exception("{$message['message']}: {$message['code']}"); } diff --git a/CRM/Core/Key.php b/CRM/Core/Key.php index fbe914552b..351743480e 100644 --- a/CRM/Core/Key.php +++ b/CRM/Core/Key.php @@ -56,6 +56,9 @@ class CRM_Core_Key { return self::$_key; } + /** + * @return mixed|null|string + */ static function sessionID() { if (!self::$_sessionID) { $session = CRM_Core_Session::singleton(); @@ -131,6 +134,11 @@ class CRM_Core_Key { return $key; } + /** + * @param $key + * + * @return bool + */ static function valid($key) { // a valid key is a 32 digit hex number // followed by an optional _ and a number between 1 and 10000 diff --git a/CRM/Core/Lock.php b/CRM/Core/Lock.php index 405cda99de..82d9ddb577 100644 --- a/CRM/Core/Lock.php +++ b/CRM/Core/Lock.php @@ -74,6 +74,9 @@ class CRM_Core_Lock { $this->release(); } + /** + * @return bool + */ function acquire() { if (!$this->_hasLock) { $query = "SELECT GET_LOCK( %1, %2 )"; @@ -88,6 +91,9 @@ class CRM_Core_Lock { return $this->_hasLock; } + /** + * @return null|string + */ function release() { if ($this->_hasLock) { $this->_hasLock = FALSE; @@ -98,12 +104,18 @@ class CRM_Core_Lock { } } + /** + * @return null|string + */ function isFree() { $query = "SELECT IS_FREE_LOCK( %1 )"; $params = array(1 => array($this->_name, 'String')); return CRM_Core_DAO::singleValueQuery($query, $params); } + /** + * @return bool + */ function isAcquired() { return $this->_hasLock; } diff --git a/CRM/Core/ManagedEntities.php b/CRM/Core/ManagedEntities.php index 75e0c26ec6..6d110fb950 100644 --- a/CRM/Core/ManagedEntities.php +++ b/CRM/Core/ManagedEntities.php @@ -257,6 +257,11 @@ class CRM_Core_ManagedEntities { return FALSE; } + /** + * @param $declarations + * + * @return mixed + */ protected static function cleanDeclarations($declarations) { foreach ($declarations as $name => &$declare) { if (!array_key_exists('name', $declare)) { @@ -266,6 +271,12 @@ class CRM_Core_ManagedEntities { return $declarations; } + /** + * @param $params + * @param $result + * + * @throws Exception + */ protected function onApiError($params, $result) { CRM_Core_Error::debug_var('ManagedEntities_failed', array( 'params' => $params, diff --git a/CRM/Core/Menu.php b/CRM/Core/Menu.php index b629e27e5e..79e9dd1ed8 100644 --- a/CRM/Core/Menu.php +++ b/CRM/Core/Menu.php @@ -68,6 +68,9 @@ class CRM_Core_Menu { static $_menuCache = NULL; CONST MENU_ITEM = 1; + /** + * @return array + */ static function &xmlItems() { if (!self::$_items) { $config = CRM_Core_Config::singleton(); @@ -95,6 +98,12 @@ class CRM_Core_Menu { return self::$_items; } + /** + * @param $name + * @param $menu + * + * @throws Exception + */ static function read($name, &$menu) { $config = CRM_Core_Config::singleton(); @@ -156,6 +165,11 @@ class CRM_Core_Menu { return self::xmlItems(); } + /** + * @param $values + * + * @return bool + */ static function isArrayTrue(&$values) { foreach ($values as $name => $value) { if (!$value) { @@ -165,6 +179,12 @@ class CRM_Core_Menu { return TRUE; } + /** + * @param $menu + * @param $path + * + * @throws Exception + */ static function fillMenuValues(&$menu, $path) { $fieldsToPropagate = array( 'access_callback', @@ -234,6 +254,9 @@ class CRM_Core_Menu { self::buildAdminLinks($menu); } + /** + * @param bool $truncate + */ static function store($truncate = TRUE) { // first clean up the db if ($truncate) { @@ -271,6 +294,9 @@ class CRM_Core_Menu { } } + /** + * @param $menu + */ static function buildAdminLinks(&$menu) { $values = array(); @@ -310,6 +336,12 @@ class CRM_Core_Menu { $menu['admin'] = array('breadcrumb' => $values); } + /** + * @param bool $all + * + * @return mixed + * @throws Exception + */ static function &getNavigation($all = FALSE) { CRM_Core_Error::fatal(); @@ -416,6 +448,9 @@ class CRM_Core_Menu { return $values; } + /** + * @return null + */ static function &getAdminLinks() { $links = self::get('admin'); @@ -479,12 +514,22 @@ class CRM_Core_Menu { return $crumbs; } + /** + * @param $menu + * @param $path + */ static function buildReturnUrl(&$menu, $path) { if (!isset($menu[$path]['return_url'])) { list($menu[$path]['return_url'], $menu[$path]['return_url_args']) = self::getReturnUrl($menu, $path); } } + /** + * @param $menu + * @param $path + * + * @return array + */ static function getReturnUrl(&$menu, $path) { if (!isset($menu[$path]['return_url'])) { $pathElements = explode('/', $path); @@ -509,6 +554,10 @@ class CRM_Core_Menu { } } + /** + * @param $menu + * @param $path + */ static function fillComponentIds(&$menu, $path) { static $cache = array(); @@ -542,6 +591,11 @@ class CRM_Core_Menu { } } + /** + * @param $path + * + * @return null + */ static function get($path) { // return null if menu rebuild $config = CRM_Core_Config::singleton(); @@ -644,6 +698,11 @@ UNION ( return $menuPath; } + /** + * @param $pathArgs + * + * @return mixed + */ static function getArrayForPathArgs($pathArgs) { if (!is_string($pathArgs)) { return; diff --git a/CRM/Core/Module.php b/CRM/Core/Module.php index 6991736999..58a848c29c 100644 --- a/CRM/Core/Module.php +++ b/CRM/Core/Module.php @@ -47,6 +47,10 @@ class CRM_Core_Module { */ public $is_active; + /** + * @param $name + * @param $is_active + */ public function __construct($name, $is_active) { $this->name = $name; $this->is_active = $is_active; diff --git a/CRM/Core/OptionGroup.php b/CRM/Core/OptionGroup.php index 6049e10b46..b9560ea7e7 100644 --- a/CRM/Core/OptionGroup.php +++ b/CRM/Core/OptionGroup.php @@ -46,6 +46,15 @@ class CRM_Core_OptionGroup { 'grant_type', ); + /** + * @param $dao + * @param bool $flip + * @param bool $grouping + * @param bool $localize + * @param string $valueColumnName + * + * @return array + */ static function &valuesCommon( $dao, $flip = FALSE, $grouping = FALSE, $localize = FALSE, $valueColumnName = 'label' @@ -172,6 +181,9 @@ WHERE v.option_group_id = g.id unset(self::$_cache[$cacheKey]); } + /** + * @return string + */ protected static function createCacheKey() { $cacheKey = "CRM_OG_" . serialize(func_get_args()); return $cacheKey; @@ -305,6 +317,13 @@ WHERE v.option_group_id = g.id } } + /** + * @param $groupName + * @param $value + * @param bool $onlyActiveValue + * + * @return null + */ static function getLabel($groupName, $value, $onlyActiveValue = TRUE) { if (empty($groupName) || empty($value) @@ -334,6 +353,15 @@ WHERE v.option_group_id = g.id return NULL; } + /** + * @param $groupName + * @param $label + * @param string $labelField + * @param string $labelType + * @param string $valueField + * + * @return null + */ static function getValue($groupName, $label, $labelField = 'label', @@ -458,6 +486,12 @@ WHERE v.option_group_id = g.id return $group->id; } + /** + * @param $groupName + * @param $values + * @param bool $flip + * @param string $field + */ static function getAssoc($groupName, &$values, $flip = FALSE, $field = 'name') { $query = " SELECT v.id as amount_id, v.value, v.label, v.name, v.description, v.weight @@ -498,6 +532,10 @@ ORDER BY v.weight } } + /** + * @param $groupName + * @param string $operator + */ static function deleteAssoc($groupName, $operator = "=") { $query = " DELETE g, v @@ -511,6 +549,12 @@ DELETE g, v $dao = CRM_Core_DAO::executeQuery($query, $params); } + /** + * @param $groupName + * @param $value + * + * @return null|string + */ static function optionLabel($groupName, $value) { $query = " SELECT v.label @@ -525,6 +569,15 @@ SELECT v.label return CRM_Core_DAO::singleValueQuery($query, $params); } + /** + * @param $groupName + * @param $fieldValue + * @param string $field + * @param string $fieldType + * @param bool $active + * + * @return array + */ static function getRowValues($groupName, $fieldValue, $field = 'name', $fieldType = 'String', $active = TRUE ) { @@ -566,6 +619,10 @@ WHERE v.option_group_id = g.id * which is part of the cache key * will do a couple of variations & aspire to someone cleaning it up later */ + /** + * @param $name + * @param array $params + */ static function flush($name, $params = array()){ $defaults = array( 'flip' => FALSE, diff --git a/CRM/Core/Page.php b/CRM/Core/Page.php index eda6b82bb0..291c7d6297 100644 --- a/CRM/Core/Page.php +++ b/CRM/Core/Page.php @@ -416,14 +416,26 @@ class CRM_Core_Page { return $this->_print; } + /** + * @return CRM_Core_Smarty + */ static function &getTemplate() { return self::$_template; } + /** + * @param $name + * + * @return null + */ function getVar($name) { return isset($this->$name) ? $this->$name : NULL; } + /** + * @param $name + * @param $value + */ function setVar($name, $value) { $this->$name = $value; } diff --git a/CRM/Core/Page/Angular.php b/CRM/Core/Page/Angular.php index 71a60b3380..e36d879a84 100644 --- a/CRM/Core/Page/Angular.php +++ b/CRM/Core/Page/Angular.php @@ -24,6 +24,9 @@ class CRM_Core_Page_Angular extends CRM_Core_Page { return parent::run(); } + /** + * @param CRM_Core_Resources $res + */ public function registerResources(CRM_Core_Resources $res) { $modules = self::getAngularModules(); diff --git a/CRM/Core/Page/Basic.php b/CRM/Core/Page/Basic.php index a43791731b..7ca6a073a8 100644 --- a/CRM/Core/Page/Basic.php +++ b/CRM/Core/Page/Basic.php @@ -185,6 +185,9 @@ abstract class CRM_Core_Page_Basic extends CRM_Core_Page { return parent::run(); } + /** + * @return string + */ function superRun() { return parent::run(); } diff --git a/CRM/Core/Payment.php b/CRM/Core/Payment.php index 2256fbae41..91d0919ab6 100644 --- a/CRM/Core/Payment.php +++ b/CRM/Core/Payment.php @@ -193,6 +193,11 @@ abstract class CRM_Core_Payment { */ abstract function checkConfig(); + /** + * @param $paymentProcessor + * + * @return bool + */ static function paypalRedirect(&$paymentProcessor) { if (!$paymentProcessor) { return FALSE; @@ -337,6 +342,13 @@ abstract class CRM_Core_Payment { return method_exists(CRM_Utils_System::getClassName($this), $method); } + /** + * @param null $entityID + * @param null $entity + * @param string $action + * + * @return string + */ function subscriptionURL($entityID = NULL, $entity = NULL, $action = 'cancel') { if ($action == 'cancel') { $url = 'civicrm/contribute/unsubscribe'; diff --git a/CRM/Core/Permission.php b/CRM/Core/Permission.php index d3f158ab9b..2ed0969948 100644 --- a/CRM/Core/Permission.php +++ b/CRM/Core/Permission.php @@ -201,6 +201,9 @@ class CRM_Core_Permission { return $config->userPermissionClass->group($groupType, $excludeHidden); } + /** + * @return bool + */ public static function customGroupAdmin() { $admin = FALSE; @@ -224,6 +227,12 @@ class CRM_Core_Permission { return FALSE; } + /** + * @param int $type + * @param bool $reset + * + * @return array + */ public static function customGroup($type = CRM_Core_Permission::VIEW, $reset = FALSE) { $customGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id', array('fresh' => $reset)); @@ -238,6 +247,13 @@ class CRM_Core_Permission { return CRM_ACL_API::group($type, NULL, 'civicrm_custom_group', $customGroups, $defaultGroups); } + /** + * @param int $type + * @param null $prefix + * @param bool $reset + * + * @return string + */ static function customGroupClause($type = CRM_Core_Permission::VIEW, $prefix = NULL, $reset = FALSE) { if (self::customGroupAdmin()) { return ' ( 1 ) '; @@ -252,6 +268,12 @@ class CRM_Core_Permission { } } + /** + * @param $gid + * @param int $type + * + * @return bool + */ public static function ufGroupValid($gid, $type = CRM_Core_Permission::VIEW) { if (empty($gid)) { return TRUE; @@ -261,6 +283,11 @@ class CRM_Core_Permission { return in_array($gid, $groups) ? TRUE : FALSE; } + /** + * @param int $type + * + * @return array + */ public static function ufGroup($type = CRM_Core_Permission::VIEW) { $ufGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id'); @@ -300,6 +327,13 @@ class CRM_Core_Permission { return CRM_ACL_API::group($type, NULL, 'civicrm_uf_group', $ufGroups); } + /** + * @param int $type + * @param null $prefix + * @param bool $returnUFGroupIds + * + * @return array|string + */ static function ufGroupClause($type = CRM_Core_Permission::VIEW, $prefix = NULL, $returnUFGroupIds = FALSE) { $groups = self::ufGroup($type); if ($returnUFGroupIds) { @@ -313,6 +347,13 @@ class CRM_Core_Permission { } } + /** + * @param int $type + * @param null $eventID + * @param string $context + * + * @return array|null + */ public static function event($type = CRM_Core_Permission::VIEW, $eventID = NULL, $context = '') { if(!empty($context)) { if(CRM_Core_Permission::check($context)) { @@ -343,6 +384,12 @@ class CRM_Core_Permission { return NULL; } + /** + * @param int $type + * @param null $prefix + * + * @return string + */ static function eventClause($type = CRM_Core_Permission::VIEW, $prefix = NULL) { $events = self::event($type); if (empty($events)) { @@ -353,6 +400,12 @@ class CRM_Core_Permission { } } + /** + * @param $module + * @param bool $checkPermission + * + * @return bool + */ static function access($module, $checkPermission = TRUE) { $config = CRM_Core_Config::singleton(); @@ -408,6 +461,12 @@ class CRM_Core_Permission { } } + /** + * @param $args + * @param string $op + * + * @return bool + */ static function checkMenu(&$args, $op = 'and') { if (!is_array($args)) { return $args; @@ -424,6 +483,12 @@ class CRM_Core_Permission { return ($op == 'or') ? FALSE : TRUE; } + /** + * @param $item + * + * @return bool|mixed + * @throws Exception + */ static function checkMenuItem(&$item) { if (!array_key_exists('access_callback', $item)) { CRM_Core_Error::backtrace(); @@ -473,6 +538,11 @@ class CRM_Core_Permission { } } + /** + * @param bool $all + * + * @return array + */ static function &basicPermissions($all = FALSE) { static $permissions = NULL; @@ -510,6 +580,9 @@ class CRM_Core_Permission { return $permissions; } + /** + * @return array + */ static function getAnonymousPermissionsWarnings() { static $permissions = array(); if (empty($permissions)) { @@ -527,10 +600,18 @@ class CRM_Core_Permission { return $permissions; } + /** + * @param $anonymous_perms + * + * @return array + */ static function validateForPermissionWarnings($anonymous_perms) { return array_intersect($anonymous_perms, self::getAnonymousPermissionsWarnings()); } + /** + * @return array + */ static function getCorePermissions() { $prefix = ts('CiviCRM') . ': '; $permissions = array( @@ -681,6 +762,9 @@ class CRM_Core_Permission { return $config->userRoleClass->roleEmails($roleName); } + /** + * @return bool + */ static function isMultisiteEnabled() { return CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME, 'is_enabled' diff --git a/CRM/Core/Permission/DrupalBase.php b/CRM/Core/Permission/DrupalBase.php index d65374b2c5..4991d13499 100644 --- a/CRM/Core/Permission/DrupalBase.php +++ b/CRM/Core/Permission/DrupalBase.php @@ -218,6 +218,11 @@ class CRM_Core_Permission_DrupalBase extends CRM_Core_Permission_Base { return NULL; } + /** + * @param $uids + * + * @return string + */ function getContactEmails($uids) { if (empty($uids)) { return ''; diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index 7d333fa87f..a93e07f59e 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -1549,6 +1549,12 @@ WHERE id = %1"; return self::$visibility[$column]; } + /** + * @param $countryID + * @param string $field + * + * @return array + */ public static function &stateProvinceForCountry($countryID, $field = 'name') { static $_cache = NULL; @@ -1598,6 +1604,11 @@ ORDER BY name"; return $result; } + /** + * @param $stateID + * + * @return array + */ public static function &countyForState($stateID) { if (is_array($stateID)) { $states = implode(", ", $stateID); diff --git a/CRM/Core/QuickForm/Action/Upload.php b/CRM/Core/QuickForm/Action/Upload.php index 15d90e4e39..ba5945858e 100644 --- a/CRM/Core/QuickForm/Action/Upload.php +++ b/CRM/Core/QuickForm/Action/Upload.php @@ -129,6 +129,12 @@ class CRM_Core_QuickForm_Action_Upload extends CRM_Core_QuickForm_Action { $page->controller->_actions['upload']->realPerform($page, $actionName); } + /** + * @param $page + * @param $actionName + * + * @return mixed + */ function realPerform(&$page, $actionName) { $pageName = $page->getAttribute('name'); $data = &$page->controller->container(); diff --git a/CRM/Core/Reference/Basic.php b/CRM/Core/Reference/Basic.php index f0c897e268..0b13ef5f5b 100644 --- a/CRM/Core/Reference/Basic.php +++ b/CRM/Core/Reference/Basic.php @@ -12,6 +12,13 @@ class CRM_Core_Reference_Basic implements CRM_Core_Reference_Interface { protected $targetTable; protected $targetKey; + /** + * @param $refTable + * @param $refKey + * @param null $targetTable + * @param string $targetKey + * @param null $refTypeColumn + */ function __construct($refTable, $refKey, $targetTable = NULL, $targetKey = 'id', $refTypeColumn = NULL) { $this->refTable = $refTable; $this->refKey = $refKey; @@ -20,30 +27,55 @@ class CRM_Core_Reference_Basic implements CRM_Core_Reference_Interface { $this->refTypeColumn = $refTypeColumn; } + /** + * @return mixed + */ function getReferenceTable() { return $this->refTable; } + /** + * @return mixed + */ function getReferenceKey() { return $this->refKey; } + /** + * @return null + */ function getTypeColumn() { return $this->refTypeColumn; } + /** + * @return null + */ function getTargetTable() { return $this->targetTable; } + /** + * @return string + */ function getTargetKey() { return $this->targetKey; } + /** + * @param string $tableName + * + * @return bool + */ public function matchesTargetTable($tableName) { return ($this->getTargetTable() === $tableName); } + /** + * @param CRM_Core_DAO $targetDao + * + * @return Object + */ public function findReferences($targetDao) { $targetColumn = $this->getTargetKey(); $params = array( @@ -60,6 +92,11 @@ EOS; return $result; } + /** + * @param CRM_Core_DAO $targetDao + * + * @return array + */ public function getReferenceCount($targetDao) { $targetColumn = $this->getTargetKey(); $params = array( diff --git a/CRM/Core/Reference/Dynamic.php b/CRM/Core/Reference/Dynamic.php index 85c5d00f33..c33477eb3d 100644 --- a/CRM/Core/Reference/Dynamic.php +++ b/CRM/Core/Reference/Dynamic.php @@ -7,6 +7,11 @@ */ class CRM_Core_Reference_Dynamic extends CRM_Core_Reference_Basic { + /** + * @param string $tableName + * + * @return bool + */ public function matchesTargetTable($tableName) { return TRUE; } @@ -41,6 +46,11 @@ EOS; return $result; } + /** + * @param CRM_Core_DAO $targetDao + * + * @return array + */ public function getReferenceCount($targetDao) { $targetColumn = $this->getTargetKey(); $params = array( diff --git a/CRM/Core/Reference/OptionValue.php b/CRM/Core/Reference/OptionValue.php index 6c983ba337..7229af33d7 100644 --- a/CRM/Core/Reference/OptionValue.php +++ b/CRM/Core/Reference/OptionValue.php @@ -14,11 +14,24 @@ class CRM_Core_Reference_OptionValue extends CRM_Core_Reference_Basic { */ protected $targetOptionGroupId; + /** + * @param $refTable + * @param $refKey + * @param null $targetTable + * @param string $targetKey + * @param null $optionGroupName + */ function __construct($refTable, $refKey, $targetTable = NULL, $targetKey = 'id', $optionGroupName) { parent::__construct($refTable, $refKey, $targetTable, $targetKey, NULL); $this->targetOptionGroupName = $optionGroupName; } + /** + * @param CRM_Core_DAO $targetDao + * + * @return null|Object + * @throws CRM_Core_Exception + */ public function findReferences($targetDao) { if (! ($targetDao instanceof CRM_Core_DAO_OptionValue)) { throw new CRM_Core_Exception("Mismatched reference: expected OptionValue but received " . get_class($targetDao)); @@ -30,6 +43,12 @@ class CRM_Core_Reference_OptionValue extends CRM_Core_Reference_Basic { } } + /** + * @param CRM_Core_DAO $targetDao + * + * @return array|null + * @throws CRM_Core_Exception + */ public function getReferenceCount($targetDao) { if (! ($targetDao instanceof CRM_Core_DAO_OptionValue)) { throw new CRM_Core_Exception("Mismatched reference: expected OptionValue but received " . get_class($targetDao)); @@ -41,10 +60,13 @@ class CRM_Core_Reference_OptionValue extends CRM_Core_Reference_Basic { } } + /** + * @return int|NULL + */ public function getTargetOptionGroupId() { if ($this->targetOptionGroupId === NULL) { $this->targetOptionGroupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $this->targetOptionGroupName, 'id', 'name'); } return $this->targetOptionGroupId; } -} \ No newline at end of file +} diff --git a/CRM/Core/Region.php b/CRM/Core/Region.php index 5cde68767e..63953d104b 100644 --- a/CRM/Core/Region.php +++ b/CRM/Core/Region.php @@ -41,6 +41,9 @@ class CRM_Core_Region { */ var $_isSorted; + /** + * @param $name + */ public function __construct($name) { // Templates injected into regions should normally be file names, but sometimes inline notation is handy. require_once 'CRM/Core/Smarty/resources/String.php'; @@ -122,11 +125,20 @@ class CRM_Core_Region { return $snippet; } + /** + * @param $name + * @param $snippet + */ public function update($name, $snippet) { $this->_snippets[$name] = array_merge($this->_snippets[$name], $snippet); $this->_isSorted = FALSE; } + /** + * @param $name + * + * @return mixed + */ public function &get($name) { return @$this->_snippets[$name]; } @@ -203,6 +215,12 @@ class CRM_Core_Region { return $html; } + /** + * @param $a + * @param $b + * + * @return int + */ static function _cmpSnippet($a, $b) { if ($a['weight'] < $b['weight']) return -1; if ($a['weight'] > $b['weight']) return 1; diff --git a/CRM/Core/Report/Excel.php b/CRM/Core/Report/Excel.php index 3aeefb50f8..13718cbe0c 100644 --- a/CRM/Core/Report/Excel.php +++ b/CRM/Core/Report/Excel.php @@ -151,6 +151,13 @@ class CRM_Core_Report_Excel { } } + /** + * @param $fileName + * @param $header + * @param $rows + * @param null $titleHeader + * @param bool $outputHeader + */ function writeHTMLFile($fileName, &$header, &$rows, $titleHeader = NULL, $outputHeader = TRUE) { if ($outputHeader) { CRM_Utils_System::download(CRM_Utils_String::munge($fileName), diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index 4661484d28..8d7f8adbd7 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -417,10 +417,16 @@ class CRM_Core_Resources { return $this->extMapper->keyToUrl($ext) . '/' . $file; } + /** + * @return string + */ public function getCacheCode() { return $this->cacheCode; } + /** + * @param $value + */ public function setCacheCode($value) { $this->cacheCode = $value; if ($this->cacheCodeKey) { diff --git a/CRM/Core/ScheduledJob.php b/CRM/Core/ScheduledJob.php index 149bd126e1..80f8ecc999 100644 --- a/CRM/Core/ScheduledJob.php +++ b/CRM/Core/ScheduledJob.php @@ -52,6 +52,9 @@ class CRM_Core_ScheduledJob { * */ + /** + * @param $params + */ public function __construct($params) { foreach ($params as $name => $param) { $this->$name = $param; @@ -81,6 +84,9 @@ class CRM_Core_ScheduledJob { } } + /** + * @param null $date + */ public function saveLastRun($date = NULL) { $dao = new CRM_Core_DAO_Job(); $dao->id = $this->id; @@ -88,6 +94,9 @@ class CRM_Core_ScheduledJob { $dao->save(); } + /** + * @return bool + */ public function needsRunning() { // run if it was never run if (empty($this->last_run)) { diff --git a/CRM/Core/Selector/Base.php b/CRM/Core/Selector/Base.php index 78a1caf4a4..212b0867e9 100644 --- a/CRM/Core/Selector/Base.php +++ b/CRM/Core/Selector/Base.php @@ -168,14 +168,23 @@ class CRM_Core_Selector_Base { return NULL; } + /** + * @return null + */ public function getSummary() { return NULL; } + /** + * @param $key + */ public function setKey($key) { $this->_key = $key; } + /** + * @return string + */ public function getKey() { return $this->_key; } diff --git a/CRM/Core/Selector/Controller.php b/CRM/Core/Selector/Controller.php index 2f00bb4c4d..0e1bbaa2ac 100644 --- a/CRM/Core/Selector/Controller.php +++ b/CRM/Core/Selector/Controller.php @@ -420,6 +420,9 @@ class CRM_Core_Selector_Controller { return $this->_object->getQill(); } + /** + * @return mixed + */ public function getSummary() { return $this->_object->getSummary(); } @@ -531,10 +534,16 @@ class CRM_Core_Selector_Controller { return $this->_print; } + /** + * @param $value + */ function setDynamicAction($value) { $this->_dynamicAction = $value; } + /** + * @return bool + */ function getDynamicAction() { return $this->_dynamicAction; } diff --git a/CRM/Core/Session.php b/CRM/Core/Session.php index a688685e19..24f53be63f 100644 --- a/CRM/Core/Session.php +++ b/CRM/Core/Session.php @@ -524,6 +524,9 @@ class CRM_Core_Session { } } + /** + * @param $names + */ static function registerAndRetrieveSessionObjects($names) { if (!is_array($names)) { $names = array($names); @@ -539,6 +542,9 @@ class CRM_Core_Session { CRM_Core_BAO_Cache::restoreSessionFromCache($names); } + /** + * @param bool $reset + */ static function storeSessionObjects($reset = TRUE) { if (empty(self::$_managedNames)) { return; @@ -563,6 +569,9 @@ class CRM_Core_Session { return $session->get('userID'); } + /** + * @return bool + */ function isEmpty() { // check if session is empty, if so we dont cache // stuff that we can get away with diff --git a/CRM/Core/Smarty.php b/CRM/Core/Smarty.php index 0da5594db8..1c7d6875db 100644 --- a/CRM/Core/Smarty.php +++ b/CRM/Core/Smarty.php @@ -204,6 +204,10 @@ class CRM_Core_Smarty extends Smarty { return $output; } + /** + * @param $name + * @param $value + */ function appendValue($name, $value) { $currentValue = $this->get_template_vars($name); if (!$currentValue) { @@ -230,6 +234,9 @@ class CRM_Core_Smarty extends Smarty { civicrm_smarty_register_string_resource(); } + /** + * @param $path + */ function addTemplateDir($path) { if ( is_array( $this->template_dir ) ) { array_unshift( $this->template_dir, $path ); diff --git a/CRM/Core/Smarty/Permissions.php b/CRM/Core/Smarty/Permissions.php index 53c83dde45..2c4f648f21 100644 --- a/CRM/Core/Smarty/Permissions.php +++ b/CRM/Core/Smarty/Permissions.php @@ -5,6 +5,11 @@ */ class CRM_Core_Smarty_Permissions { // non-static adapter for CRM_Core_Permission::check + /** + * @param $offset + * + * @return bool + */ function check($offset) { return CRM_Core_Permission::check($offset); } diff --git a/CRM/Core/Smarty/plugins/block.crmScope.php b/CRM/Core/Smarty/plugins/block.crmScope.php index ec45c53a5e..b37050b326 100644 --- a/CRM/Core/Smarty/plugins/block.crmScope.php +++ b/CRM/Core/Smarty/plugins/block.crmScope.php @@ -45,6 +45,10 @@ function smarty_block_crmScope($params, $content, &$smarty, &$repeat) { return $content; } +/** + * @param $smarty + * @param $frame + */ function _smarty_block_crmScope_applyFrame(&$smarty, $frame) { foreach ($frame as $key => $value) { $smarty->assign($key, $value); diff --git a/CRM/Core/Smarty/resources/String.php b/CRM/Core/Smarty/resources/String.php index 893066c357..a11f921521 100644 --- a/CRM/Core/Smarty/resources/String.php +++ b/CRM/Core/Smarty/resources/String.php @@ -37,15 +37,32 @@ function civicrm_smarty_resource_string_get_template($tpl_name, &$tpl_source, &$ return TRUE; } +/** + * @param $tpl_name + * @param $tpl_timestamp + * @param $smarty_obj + * + * @return bool + */ function civicrm_smarty_resource_string_get_timestamp($tpl_name, &$tpl_timestamp, &$smarty_obj) { $tpl_timestamp = time(); return TRUE; } +/** + * @param $tpl_name + * @param $smarty_obj + * + * @return bool + */ function civicrm_smarty_resource_string_get_secure($tpl_name, &$smarty_obj) { return TRUE; } +/** + * @param $tpl_name + * @param $smarty_obj + */ function civicrm_smarty_resource_string_get_trusted($tpl_name, &$smarty_obj) {} function civicrm_smarty_register_string_resource() { diff --git a/CRM/Core/StateMachine.php b/CRM/Core/StateMachine.php index 5c037548e9..0e4d57cc3d 100644 --- a/CRM/Core/StateMachine.php +++ b/CRM/Core/StateMachine.php @@ -357,18 +357,30 @@ class CRM_Core_StateMachine { return $this->_controller->getContent(); } + /** + * @return mixed + */ function getDestination() { return $this->_controller->getDestination(); } + /** + * @return mixed + */ function getSkipRedirection() { return $this->_controller->getSkipRedirection(); } + /** + * @return mixed + */ function fini() { return $this->_controller->fini(); } + /** + * @return mixed + */ function cancelAction() { return $this->_controller->cancelAction(); } diff --git a/CRM/Core/TableHierarchy.php b/CRM/Core/TableHierarchy.php index 4a66716de1..7e050e15e6 100644 --- a/CRM/Core/TableHierarchy.php +++ b/CRM/Core/TableHierarchy.php @@ -78,6 +78,9 @@ class CRM_Core_TableHierarchy { 'civicrm_mailing_event_trackable_url_open' => '42', ); + /** + * @return array + */ static function &info() { //get the campaign related tables. CRM_Campaign_BAO_Query::info(self::$info); diff --git a/CRM/Core/TemporaryErrorScope.php b/CRM/Core/TemporaryErrorScope.php index 311f047456..eaf744a1ac 100644 --- a/CRM/Core/TemporaryErrorScope.php +++ b/CRM/Core/TemporaryErrorScope.php @@ -53,6 +53,9 @@ class CRM_Core_TemporaryErrorScope { return new CRM_Core_TemporaryErrorScope($newFrame); } + /** + * @param $newFrame + */ public function __construct($newFrame) { self::$oldFrames[] = self::getActive(); self::setActive($newFrame); diff --git a/CRM/Core/Transaction.php b/CRM/Core/Transaction.php index 137baba9ef..63493f151e 100644 --- a/CRM/Core/Transaction.php +++ b/CRM/Core/Transaction.php @@ -84,6 +84,10 @@ class CRM_Core_Transaction { * of CRM_Core_Transaction */ private $_pseudoCommitted = FALSE; + + /** + * + */ function __construct() { if (!self::$_dao) { self::$_dao = new CRM_Core_DAO(); @@ -134,6 +138,9 @@ class CRM_Core_Transaction { } } + /** + * @param $flag + */ static public function rollbackIfFalse($flag) { if ($flag === FALSE) { self::$_doCommit = FALSE; @@ -167,6 +174,9 @@ class CRM_Core_Transaction { } } + /** + * @return bool + */ static public function willCommit() { return self::$_doCommit; } @@ -195,6 +205,10 @@ class CRM_Core_Transaction { ); } + /** + * @param $phase + * @param $callbacks + */ static protected function invokeCallbacks($phase, $callbacks) { if (is_array($callbacks[$phase])) { foreach ($callbacks[$phase] as $cb) { -- 2.25.1