From bb3a214a55d806c29932c862738ff2d6b6878bbe Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 19 May 2014 21:30:23 +1200 Subject: [PATCH] add missing comment blocks --- CRM/Member/BAO/Membership.php | 15 +++ CRM/Member/BAO/MembershipLog.php | 3 + CRM/Member/BAO/MembershipType.php | 6 ++ CRM/Member/BAO/Query.php | 33 +++++++ CRM/Member/Form.php | 5 +- CRM/Member/Form/MembershipStatus.php | 1 - CRM/Member/Form/MembershipType.php | 6 ++ CRM/Member/Form/Task.php | 4 + CRM/Member/Import/Field.php | 10 ++ CRM/Member/Import/Form/Summary.php | 2 +- CRM/Member/Import/Parser.php | 19 ++++ CRM/Member/Info.php | 83 ++++++++++++++++ CRM/Member/Page/Tab.php | 4 + CRM/Member/Selector/Search.php | 6 ++ CRM/Utils/System/Base.php | 6 ++ CRM/Utils/System/Drupal.php | 20 ++++ CRM/Utils/System/Drupal6.php | 7 ++ CRM/Utils/System/DrupalBase.php | 3 + CRM/Utils/System/Joomla.php | 14 +++ CRM/Utils/System/UnitTests.php | 139 +++++++++++++++++++++++++++ CRM/Utils/System/WordPress.php | 45 +++++++++ CRM/Widget/Widget.php | 4 + 22 files changed, 432 insertions(+), 3 deletions(-) diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index c790d4b8fc..0bc32d70cf 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -46,6 +46,15 @@ class CRM_Member_BAO_Membership extends CRM_Member_DAO_Membership { static $_signupActType = NULL; + /** + * class constructor + * + * @access public + * @return \CRM_Member_DAO_Membership + */ + /** + * + */ function __construct() { parent::__construct(); } @@ -2222,6 +2231,12 @@ WHERE civicrm_membership.contact_id = civicrm_contact.id return $membesrshipPayment; } + /** + * @param $form + * @param null $membershipTypeID + * + * @return array + */ static function &buildMembershipTypeValues(&$form, $membershipTypeID = NULL) { $whereClause = " WHERE domain_id = ". CRM_Core_Config::domainID(); diff --git a/CRM/Member/BAO/MembershipLog.php b/CRM/Member/BAO/MembershipLog.php index a7347f9f22..1502c065c1 100644 --- a/CRM/Member/BAO/MembershipLog.php +++ b/CRM/Member/BAO/MembershipLog.php @@ -71,6 +71,9 @@ class CRM_Member_BAO_MembershipLog extends CRM_Member_DAO_MembershipLog { return $membershipLog->delete(); } + /** + * @param $contactID + */ static function resetModifiedID($contactID) { $query = " UPDATE civicrm_membership_log diff --git a/CRM/Member/BAO/MembershipType.php b/CRM/Member/BAO/MembershipType.php index 6c2b5159c6..f68cc0f071 100644 --- a/CRM/Member/BAO/MembershipType.php +++ b/CRM/Member/BAO/MembershipType.php @@ -654,6 +654,12 @@ class CRM_Member_BAO_MembershipType extends CRM_Member_DAO_MembershipType { } + /** + * @param $params + * @param $ids + * @param $previousID + * @param $membershipTypeId + */ public static function createMembershipPriceField($params, $ids, $previousID, $membershipTypeId) { $priceSetId = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', 'default_membership_type_amount', 'id', 'name'); diff --git a/CRM/Member/BAO/Query.php b/CRM/Member/BAO/Query.php index 87b50c5de1..8d7a22605a 100644 --- a/CRM/Member/BAO/Query.php +++ b/CRM/Member/BAO/Query.php @@ -34,6 +34,9 @@ */ class CRM_Member_BAO_Query { + /** + * @return array + */ static function &getFields() { $fields = CRM_Member_BAO_Membership::exportableFields(); return $fields; @@ -128,6 +131,9 @@ class CRM_Member_BAO_Query { } } + /** + * @param $query + */ static function where(&$query) { $grouping = NULL; foreach (array_keys($query->_params) as $id) { @@ -144,6 +150,10 @@ class CRM_Member_BAO_Query { } } + /** + * @param $values + * @param $query + */ static function whereClauseSingle(&$values, &$query) { list($name, $op, $value, $grouping, $wildcard) = $values; switch ($name) { @@ -339,6 +349,13 @@ class CRM_Member_BAO_Query { } } + /** + * @param $name + * @param $mode + * @param $side + * + * @return null|string + */ static function from($name, $mode, $side) { $from = NULL; switch ($name) { @@ -372,6 +389,12 @@ class CRM_Member_BAO_Query { return $from; } + /** + * @param $mode + * @param bool $includeCustomFields + * + * @return array|null + */ static function defaultReturnProperties($mode, $includeCustomFields = TRUE ) { @@ -411,6 +434,9 @@ class CRM_Member_BAO_Query { return $properties; } + /** + * @param $form + */ static function buildSearchForm(&$form) { foreach (CRM_Member_PseudoConstant::membershipType() as $id => $Name) { $form->_membershipType = &$form->addElement('checkbox', "member_membership_type_id[$id]", NULL, $Name); @@ -458,8 +484,15 @@ class CRM_Member_BAO_Query { $form->setDefaults(array('member_test' => 0)); } + /** + * @param $row + * @param $id + */ static function searchAction(&$row, $id) {} + /** + * @param $tables + */ static function tableNames(&$tables) { //add membership table if (!empty($tables['civicrm_membership_log']) || !empty($tables['civicrm_membership_status']) || CRM_Utils_Array::value('civicrm_membership_type', $tables)) { diff --git a/CRM/Member/Form.php b/CRM/Member/Form.php index 630f06fde7..749bb46ebc 100644 --- a/CRM/Member/Form.php +++ b/CRM/Member/Form.php @@ -64,7 +64,7 @@ class CRM_Member_Form extends CRM_Core_Form { * * @access public * - * @return void + * @return array defaults */ function setDefaultValues() { $defaults = array(); @@ -171,6 +171,9 @@ class CRM_Member_Form extends CRM_Core_Form { * - contact_id * - soft_credit_contact_id */ + /** + * @param $formValues + */ function storeContactFields($formValues){ // in a 'standalone form' (contact id not in the url) the contact will be in the form values if (!empty($formValues['contact_id'])) { diff --git a/CRM/Member/Form/MembershipStatus.php b/CRM/Member/Form/MembershipStatus.php index 6fd613a8ab..c91c2660e5 100644 --- a/CRM/Member/Form/MembershipStatus.php +++ b/CRM/Member/Form/MembershipStatus.php @@ -48,7 +48,6 @@ class CRM_Member_Form_MembershipStatus extends CRM_Member_Form { * @return void */ public function setDefaultValues() { - $defaults = array(); $defaults = parent::setDefaultValues(); //finding default weight to be put diff --git a/CRM/Member/Form/MembershipType.php b/CRM/Member/Form/MembershipType.php index dd40d1a107..ed58b41f24 100644 --- a/CRM/Member/Form/MembershipType.php +++ b/CRM/Member/Form/MembershipType.php @@ -412,6 +412,12 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form { } } + /** + * @param $previousID + * @param $priceSetId + * @param $membershipTypeId + * @param $optionsIds + */ public static function checkPreviousPriceField($previousID, $priceSetId, $membershipTypeId, &$optionsIds) { if ($previousID) { $editedFieldParams = array( diff --git a/CRM/Member/Form/Task.php b/CRM/Member/Form/Task.php index 238ac0d27a..b447dc8cf6 100644 --- a/CRM/Member/Form/Task.php +++ b/CRM/Member/Form/Task.php @@ -86,6 +86,10 @@ class CRM_Member_Form_Task extends CRM_Core_Form { self::preProcessCommon($this); } + /** + * @param $form + * @param bool $useTable + */ static function preProcessCommon(&$form, $useTable = FALSE) { $form->_memberIds = array(); diff --git a/CRM/Member/Import/Field.php b/CRM/Member/Import/Field.php index a8ccd7f3da..adfad40ac0 100644 --- a/CRM/Member/Import/Field.php +++ b/CRM/Member/Import/Field.php @@ -85,6 +85,13 @@ class CRM_Member_Import_Field { */ public $_value; + /** + * @param $name + * @param $title + * @param int $type + * @param string $headerPattern + * @param string $dataPattern + */ function __construct($name, $title, $type = CRM_Utils_Type::T_INT, $headerPattern = '//', $dataPattern = '//') { $this->_name = $name; $this->_title = $title; @@ -107,6 +114,9 @@ class CRM_Member_Import_Field { $this->_value = $value; } + /** + * @return bool + */ function validate() { if (CRM_Utils_System::isNull($this->_value)) { diff --git a/CRM/Member/Import/Form/Summary.php b/CRM/Member/Import/Form/Summary.php index aef04d18f7..6575b6c3f1 100644 --- a/CRM/Member/Import/Form/Summary.php +++ b/CRM/Member/Import/Form/Summary.php @@ -47,7 +47,7 @@ class CRM_Member_Import_Form_Summary extends CRM_Import_Form_Summary { public function preProcess() { // set the error message path to display - $errorFile = $this->assign('errorFile', $this->get('errorFile')); + $this->assign('errorFile', $this->get('errorFile')); $totalRowCount = $this->get('totalRowCount'); $relatedCount = $this->get('relatedCount'); diff --git a/CRM/Member/Import/Parser.php b/CRM/Member/Import/Parser.php index d0a31a0073..9c862f42ce 100644 --- a/CRM/Member/Import/Parser.php +++ b/CRM/Member/Import/Parser.php @@ -65,6 +65,18 @@ abstract class CRM_Member_Import_Parser extends CRM_Import_Parser { */ protected $_haveColumnHeader; + /** + * @param $fileName + * @param string $seperator + * @param $mapper + * @param bool $skipColumnHeader + * @param int $mode + * @param int $contactType + * @param int $onDuplicate + * + * @return mixed + * @throws Exception + */ function run($fileName, $seperator = ',', &$mapper, @@ -307,6 +319,13 @@ abstract class CRM_Member_Import_Parser extends CRM_Import_Parser { return $params; } + /** + * @param $name + * @param $title + * @param int $type + * @param string $headerPattern + * @param string $dataPattern + */ function addField($name, $title, $type = CRM_Utils_Type::T_INT, $headerPattern = '//', $dataPattern = '//') { if (empty($name)) { $this->_fields['doNotImport'] = new CRM_Member_Import_Field($name, $title, $type, $headerPattern, $dataPattern); diff --git a/CRM/Member/Info.php b/CRM/Member/Info.php index c1136435d0..2aba1062d5 100644 --- a/CRM/Member/Info.php +++ b/CRM/Member/Info.php @@ -41,6 +41,18 @@ class CRM_Member_Info extends CRM_Core_Component_Info { protected $keyword = 'member'; // docs inherited from interface + /** + * Provides base information about the component. + * Needs to be implemented in component's information + * class. + * + * @return array collection of required component settings + * @access public + * + */ + /** + * @return array + */ public function getInfo() { return array( 'name' => 'CiviMember', @@ -53,6 +65,24 @@ class CRM_Member_Info extends CRM_Core_Component_Info { // docs inherited from interface + /** + * Provides permissions that are used by component. + * Needs to be implemented in component's information + * class. + * + * NOTE: if using conditionally permission return, + * implementation of $getAllUnconditionally is required. + * + * @param bool $getAllUnconditionally + * + * @return array|null collection of permissions, null if none + * @access public + */ + /** + * @param bool $getAllUnconditionally + * + * @return array|null + */ public function getPermissions($getAllUnconditionally = FALSE) { return array( 'access CiviMember', @@ -62,6 +92,18 @@ class CRM_Member_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * Provides information about user dashboard element + * offered by this component. + * + * @return array|null collection of required dashboard settings, + * null if no element offered + * @access public + * + */ + /** + * @return array|null + */ public function getUserDashboardElement() { return array('name' => ts('Memberships'), 'title' => ts('Your Membership(s)'), @@ -74,6 +116,18 @@ class CRM_Member_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * Provides information about user dashboard element + * offered by this component. + * + * @return array|null collection of required dashboard settings, + * null if no element offered + * @access public + * + */ + /** + * @return array|null + */ public function registerTab() { return array('title' => ts('Memberships'), 'url' => 'membership', @@ -82,6 +136,18 @@ class CRM_Member_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * Provides information about advanced search pane + * offered by this component. + * + * @return array|null collection of required pane settings, + * null if no element offered + * @access public + * + */ + /** + * @return array|null + */ public function registerAdvancedSearchPane() { return array('title' => ts('Memberships'), 'weight' => 30, @@ -89,11 +155,28 @@ class CRM_Member_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * Provides potential activity types that this + * component might want to register in activity history. + * Needs to be implemented in component's information + * class. + * + * @return array|null collection of activity types + * @access public + * + */ + /** + * @return array|null + */ public function getActivityTypes() { return NULL; } // add shortcut to Create New + /** + * @param $shortCuts + * @param $newCredit + */ public function creatNewShortcut(&$shortCuts, $newCredit) { if (CRM_Core_Permission::check('access CiviMember') && CRM_Core_Permission::check('edit memberships') diff --git a/CRM/Member/Page/Tab.php b/CRM/Member/Page/Tab.php index d4eb65e215..72e7d2b293 100644 --- a/CRM/Member/Page/Tab.php +++ b/CRM/Member/Page/Tab.php @@ -368,6 +368,10 @@ class CRM_Member_Page_Tab extends CRM_Core_Page { return parent::run(); } + /** + * @param $form + * @param null $contactId + */ public static function setContext(&$form, $contactId = NULL) { $context = CRM_Utils_Request::retrieve('context', 'String', $form, FALSE, 'search' ); diff --git a/CRM/Member/Selector/Search.php b/CRM/Member/Selector/Search.php index 0af982a889..813a6fe5e0 100644 --- a/CRM/Member/Selector/Search.php +++ b/CRM/Member/Selector/Search.php @@ -525,10 +525,16 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C 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/Utils/System/Base.php b/CRM/Utils/System/Base.php index 1571c417aa..aae668cd8c 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -69,10 +69,16 @@ abstract class CRM_Utils_System_Base { } } + /** + * @return string + */ function getDefaultBlockLocation() { return 'left'; } + /** + * @return string + */ function getVersion() { return 'Unknown'; } diff --git a/CRM/Utils/System/Drupal.php b/CRM/Utils/System/Drupal.php index 1f776507db..900a8bd2e5 100644 --- a/CRM/Utils/System/Drupal.php +++ b/CRM/Utils/System/Drupal.php @@ -104,6 +104,10 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { * @param integer $ufID User ID in CMS * @param string $ufName User name */ + /** + * @param $ufID + * @param $ufName + */ function updateCMSName($ufID, $ufName) { // CRM-5555 if (function_exists('user_load')) { @@ -182,6 +186,11 @@ class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase { * @return string $destination destination value for URL * */ + /** + * @param $form + * + * @return null|string + */ function getLoginDestination(&$form) { $args = NULL; @@ -532,6 +541,11 @@ AND u.status = 1 /* * Load user into session */ + /** + * @param $username + * + * @return bool + */ function loadUser($username) { global $user; @@ -589,6 +603,9 @@ AND u.status = 1 drupal_set_message($message); } + /** + * @return mixed + */ function logout() { module_load_include('inc', 'user', 'user.pages'); return user_logout(); @@ -640,6 +657,9 @@ AND u.status = 1 return CRM_Core_I18n_PseudoConstant::longForShort(substr($language->language, 0, 2)); } + /** + * @return string + */ function getVersion() { return defined('VERSION') ? VERSION : 'Unknown'; } diff --git a/CRM/Utils/System/Drupal6.php b/CRM/Utils/System/Drupal6.php index d4345567e3..765be3a6d8 100644 --- a/CRM/Utils/System/Drupal6.php +++ b/CRM/Utils/System/Drupal6.php @@ -124,6 +124,10 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { * @param integer $ufID User ID in CMS * @param string $ufName User name */ + /** + * @param $ufID + * @param $ufName + */ function updateCMSName($ufID, $ufName) { // CRM-5555 if (function_exists('user_load')) { @@ -605,6 +609,9 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { return CRM_Core_I18n_PseudoConstant::longForShort(substr($language->language, 0, 2)); } + /** + * @return string + */ function getVersion() { return defined('VERSION') ? VERSION : 'Unknown'; } diff --git a/CRM/Utils/System/DrupalBase.php b/CRM/Utils/System/DrupalBase.php index 9673b5547c..b0cff3e7c6 100644 --- a/CRM/Utils/System/DrupalBase.php +++ b/CRM/Utils/System/DrupalBase.php @@ -37,6 +37,9 @@ * Drupal specific stuff goes here */ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { + /** + * + */ function __construct() { $this->is_drupal = TRUE; $this->supports_form_extensions = TRUE; diff --git a/CRM/Utils/System/Joomla.php b/CRM/Utils/System/Joomla.php index 3edb52801d..c92dbe4093 100644 --- a/CRM/Utils/System/Joomla.php +++ b/CRM/Utils/System/Joomla.php @@ -37,6 +37,9 @@ * Joomla specific stuff goes here */ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { + /** + * + */ function __construct() { $this->is_drupal = FALSE; } @@ -575,6 +578,11 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { return; } + /** + * @param $user + * + * @return bool + */ function loadUser($user) { return TRUE; } @@ -602,6 +610,9 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { return NULL; } + /** + * @return string + */ function getVersion() { if (class_exists('JVersion')) { $version = new JVersion; @@ -756,6 +767,9 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { return $loginURL; } + /** + * @param $form + */ public function getLoginDestination(&$form) { return; } diff --git a/CRM/Utils/System/UnitTests.php b/CRM/Utils/System/UnitTests.php index 4d3bc2b1f2..93c62a2ec6 100644 --- a/CRM/Utils/System/UnitTests.php +++ b/CRM/Utils/System/UnitTests.php @@ -37,20 +37,73 @@ * Helper authentication class for unit tests */ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { + /** + * + */ function __construct() { $this->is_drupal = FALSE; $this->supports_form_extensions = False; } + /** + * sets the title of the page + * + * @param string $title + * @param null $pageTitle + * + * @paqram string $pageTitle + * + * @return void + * @access public + */ + /** + * @param string $title + * @param null $pageTitle + */ function setTitle($title, $pageTitle = NULL) { return; } + /** + * Authenticate the user against the drupal db + * + * @param string $name the user name + * @param string $password the password for the above user name + * @param boolean $loadCMSBootstrap load cms bootstrap? + * @param NULL|string $realPath filename of script + * + * @return mixed false if no auth + * array( + * contactID, ufID, unique string ) if success + * @access public + */ + /** + * @param string $name + * @param string $password + * @param bool $loadCMSBootstrap + * @param null|string $realPath + * + * @return mixed + */ static function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) { $retVal = array(1, 1, 12345); return $retVal; } + /** + * Append an additional breadcrumb tag to the existing breadcrumb + * + * @param $breadCrumbs + * + * @internal param string $title + * @internal param string $url + * + * @return void + * @access public + */ + /** + * @param $breadCrumbs + */ function appendBreadCrumb($breadCrumbs) { return; } @@ -59,6 +112,17 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { return; } + /** + * Append a string to the head of the html file + * + * @param string $header the new string to be appended + * + * @return void + * @access public + */ + /** + * @param string $head + */ function addHTMLHead($head) { return; } @@ -68,10 +132,51 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { $base_url = str_replace('http://', 'https://', $base_url); } + /** + * figure out the post url for the form + * + * @param mix $action the default action if one is pre-specified + * + * @return string the url to post the form + * @access public + */ + /** + * @param mix $action + * + * @return string + */ function postURL($action) { return; } + /** + * Generate an internal CiviCRM URL (copied from DRUPAL/includes/common.inc#url) + * + * @param $path string The path being linked to, such as "civicrm/add" + * @param $query string A query string to append to the link. + * @param $absolute boolean Whether to force the output to be an absolute link (beginning with http:). + * Useful for links that will be displayed outside the site, such as in an + * RSS feed. + * @param $fragment string A fragment identifier (named anchor) to append to the link. + * @param $htmlize boolean whether to convert to html eqivalant + * @param $frontend boolean a gross joomla hack + * @param $forceBackend boolean a gross joomla hack + * + * @return string an HTML string containing a link to the given path. + * @access public + * + */ + /** + * @param null|string $path + * @param null|string $query + * @param bool $absolute + * @param null|string $fragment + * @param bool $htmlize + * @param bool $frontend + * @param bool $forceBackend + * + * @return string + */ function url($path = NULL, $query = NULL, $absolute = FALSE, $fragment = NULL, $htmlize = TRUE, $frontend = FALSE, $forceBackend = FALSE @@ -129,6 +234,9 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { } } + /** + * @param $user + */ function getUserID($user) { //FIXME: look here a bit closer when testing UFMatch @@ -137,10 +245,25 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { CRM_Core_BAO_UFMatch::synchronize($user, TRUE, 'Standalone', 'Individual'); } + /** + * @param $user + * + * @return bool + */ function getAllowedToLogin($user) { return TRUE; } + /** + * Set a message in the UF to display to a user + * + * @param string $message the message to set + * + * @access public + */ + /** + * @param string $message + */ function setMessage($message) { return; } @@ -154,10 +277,26 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { header("Location:index.php"); } + /** + * Get the locale set in the hosting CMS + * + * @return string with the locale or null for none + */ + /** + * @return string + */ function getUFLocale() { return NULL; } + /** + * Get a list of all installed modules, including enabled and disabled ones + * + * @return array CRM_Core_Module + */ + /** + * @return array + */ function getModules() { return array(); } diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index 0573a3786b..d02ce668b1 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -37,6 +37,9 @@ * WordPress specific stuff goes here */ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { + /** + * + */ function __construct() { $this->is_drupal = FALSE; } @@ -326,6 +329,13 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { return $base . '?' . implode($separator, $queryParts) . $fragment; } + /** + * @param $absolute + * @param $frontend + * @param $forceBackend + * + * @return mixed|null|string + */ private function getBaseUrl($absolute, $frontend, $forceBackend) { $config = CRM_Core_Config::singleton(); @@ -399,6 +409,11 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { function setMessage($message) { } + /** + * @param $user + * + * @return bool + */ function loadUser( $user ) { return true; } @@ -463,6 +478,11 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { return true; } + /** + * @param $dir + * + * @return bool + */ function validInstallDir($dir) { $includePath = "$dir/wp-includes"; if ( @@ -474,6 +494,14 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { return FALSE; } + /** + * Determine the location of the CMS root. + * + * @return string|NULL local file system path to CMS root, or NULL if it cannot be determined + */ + /** + * @return NULL|string + */ function cmsRootPath() { $cmsRoot = $valid = NULL; if (defined('CIVICRM_CMSDIR')) { @@ -505,6 +533,12 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { return ($valid) ? $cmsRoot : NULL; } + /** + * @param $params + * @param $mail + * + * @return mixed + */ function createUser(&$params, $mail) { $user_data = array( 'ID' => '', @@ -557,6 +591,11 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { } } + /** + * @param $params + * @param $errors + * @param string $emailName + */ function checkUserNameEmailExists(&$params, &$errors, $emailName = 'email') { $config = CRM_Core_Config::singleton(); @@ -600,6 +639,9 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { return $isloggedIn; } + /** + * @return mixed + */ function getLoggedInUserObject() { if (function_exists('is_user_logged_in') && is_user_logged_in()) { @@ -662,6 +704,9 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { return $loginURL; } + /** + * @param $form + */ public function getLoginDestination(&$form) { return; } diff --git a/CRM/Widget/Widget.php b/CRM/Widget/Widget.php index 694e433b25..364c6a0956 100644 --- a/CRM/Widget/Widget.php +++ b/CRM/Widget/Widget.php @@ -5,6 +5,10 @@ * * Modified and improved upon by CiviCRM LLC (c) 2007 */ + +/** + * Class CRM_Widget_Widget + */ class CRM_Widget_Widget { static $_methodTable; -- 2.25.1