From ea3ddccf2929c9778e4443ecd039c02a0a957dd8 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Fri, 23 Oct 2015 16:39:15 +1300 Subject: [PATCH] comment fixes --- CRM/Admin/Form/ScheduleReminders.php | 5 ++-- CRM/Campaign/BAO/Survey.php | 7 ++++++ CRM/Contact/BAO/GroupContact.php | 7 +++--- CRM/Contact/Form/Contact.php | 5 ++-- CRM/Contact/Form/Search/Basic.php | 9 +++++-- CRM/Contact/Form/Search/Builder.php | 8 +++++-- CRM/Contact/Import/Field.php | 8 ++++++- CRM/Contact/Page/AJAX.php | 4 +++- CRM/Contribute/BAO/ContributionRecur.php | 4 +++- CRM/Core/BAO/EntityTag.php | 11 +++++++++ CRM/Core/BAO/Navigation.php | 2 ++ CRM/Core/BAO/Phone.php | 4 ++++ CRM/Core/BAO/Setting.php | 9 ++++--- CRM/Core/BAO/UFField.php | 4 ++++ CRM/Core/CodeGen/Specification.php | 4 ++++ CRM/Core/Component.php | 4 ++++ CRM/Core/Component/Info.php | 2 ++ CRM/Core/Config.php | 6 +++++ CRM/Core/DAO.php | 4 ++++ CRM/Core/Error.php | 12 ++++++---- CRM/Core/IDS.php | 24 ++++++++++++------- CRM/Core/Menu.php | 2 ++ CRM/Core/Payment/FirstData.php | 5 ++++ CRM/Core/Payment/GoogleIPN.php | 4 ++++ CRM/Core/Payment/PaymentExpressIPN.php | 7 ++++-- CRM/Core/Payment/Realex.php | 8 ++++++- CRM/Core/Payment/eWAY.php | 9 ++++--- CRM/Custom/Form/ChangeFieldType.php | 6 +++++ CRM/Dedupe/BAO/RuleGroup.php | 4 ++++ CRM/Event/BAO/Event.php | 4 ++++ CRM/Event/Badge.php | 4 +++- CRM/Grant/Form/Task.php | 2 +- CRM/Logging/Schema.php | 15 ++++++++++++ CRM/Member/Selector/Search.php | 2 +- CRM/Pledge/BAO/Query.php | 4 ++++ CRM/Price/BAO/LineItem.php | 3 ++- CRM/Profile/Selector/Listings.php | 13 ++++++---- CRM/Report/Utils/Report.php | 5 ++++ CRM/Upgrade/Incremental/php/FourTwo.php | 14 ++++++++++- CRM/Upgrade/Snapshot/V4p2/Price/DAO/Field.php | 2 ++ .../Snapshot/V4p2/Price/DAO/FieldValue.php | 4 +++- .../Snapshot/V4p2/Price/DAO/LineItem.php | 6 ++++- CRM/Upgrade/Snapshot/V4p2/Price/DAO/Set.php | 4 +++- .../Snapshot/V4p2/Price/DAO/SetEntity.php | 4 +++- CRM/Utils/Check.php | 3 +++ CRM/Utils/DeprecatedUtils.php | 6 ++++- CRM/Utils/File.php | 11 ++++++--- CRM/Utils/Mail/Incoming.php | 10 +++++++- CRM/Utils/Rule.php | 12 +++++++--- CRM/Utils/System/Drupal.php | 5 ++++ CRM/Utils/System/Drupal6.php | 5 ++++ CRM/Utils/System/DrupalBase.php | 2 ++ CRM/Utils/System/Joomla.php | 6 +++++ CRM/Utils/System/WordPress.php | 6 +++++ api/v3/UFJoin.php | 5 +++- .../ActionSchedule/AbstractMappingTest.php | 6 +++++ .../phpunit/CiviTest/CiviSeleniumTestCase.php | 3 ++- tests/phpunit/CiviTest/CiviUnitTestCase.php | 2 ++ tests/phpunit/WebTest/Event/AddEventTest.php | 4 +++- .../Member/OnlineMembershipCreateTest.php | 8 +++++-- 60 files changed, 306 insertions(+), 62 deletions(-) diff --git a/CRM/Admin/Form/ScheduleReminders.php b/CRM/Admin/Form/ScheduleReminders.php index 144cbe803c..61fca0e171 100644 --- a/CRM/Admin/Form/ScheduleReminders.php +++ b/CRM/Admin/Form/ScheduleReminders.php @@ -294,10 +294,11 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form { * * @param array $fields * The input form values. + * @param array $files * @param CRM_Admin_Form_ScheduleReminders $self * - * @return bool|array - * true if no errors, else array of errors + * @return array|bool + * True if no errors, else array of errors */ public static function formRule($fields, $files, $self) { $errors = array(); diff --git a/CRM/Campaign/BAO/Survey.php b/CRM/Campaign/BAO/Survey.php index 0ec174d5df..f68a4d9eb1 100644 --- a/CRM/Campaign/BAO/Survey.php +++ b/CRM/Campaign/BAO/Survey.php @@ -301,6 +301,9 @@ SELECT survey.id as id, /** * Get Survey activity types. + * + * @param string $returnColumn + * @param bool $includePetitionActivityType */ public static function getSurveyActivityType($returnColumn = 'label', $includePetitionActivityType = FALSE) { static $activityTypes; @@ -914,6 +917,10 @@ INNER JOIN civicrm_contact contact_a ON ( activityTarget.contact_id = contact_a /** * Decides the contact type for given survey. + * + * @param int $surveyId + * + * @return null|string */ public static function getSurveyContactType($surveyId) { $contactType = NULL; diff --git a/CRM/Contact/BAO/GroupContact.php b/CRM/Contact/BAO/GroupContact.php index 7306a4c0d0..2e52d1316e 100644 --- a/CRM/Contact/BAO/GroupContact.php +++ b/CRM/Contact/BAO/GroupContact.php @@ -320,9 +320,10 @@ class CRM_Contact_BAO_GroupContact extends CRM_Contact_DAO_GroupContact { * * @param bool $excludeHidden * - * @return array (reference)|int $values - * the relevant data object values for the contact or - * the total count when $count is TRUE + * @param int $groupId + * + * @return array|int $values + * the relevant data object values for the contact or the total count when $count is TRUE */ public static function &getContactGroup( $contactId, diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index 31f06684ca..4d30d0c019 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -464,8 +464,9 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { } /** - * Do the set default related to location type id, - * primary location, default country + * Do the set default related to location type id, primary location, default country. + * + * @param array $defaults */ public function blockSetDefaults(&$defaults) { $locationTypeKeys = array_filter(array_keys(CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id')), 'is_int'); diff --git a/CRM/Contact/Form/Search/Basic.php b/CRM/Contact/Form/Search/Basic.php index 5dea92c50d..d8d27abf83 100644 --- a/CRM/Contact/Form/Search/Basic.php +++ b/CRM/Contact/Form/Search/Basic.php @@ -194,8 +194,13 @@ class CRM_Contact_Form_Search_Basic extends CRM_Contact_Form_Search { } /** - * Add a form rule for this form. If Go is pressed then we must select some checkboxes - * and an action + * Add a form rule for this form. + * + * If Go is pressed then we must select some checkboxes and an action. + * + * @param array $fields + * + * @return array|bool */ public static function formRule($fields) { // check actionName and if next, then do not repeat a search, since we are going to the next page diff --git a/CRM/Contact/Form/Search/Builder.php b/CRM/Contact/Form/Search/Builder.php index b42fad974b..dfb2767d18 100644 --- a/CRM/Contact/Form/Search/Builder.php +++ b/CRM/Contact/Form/Search/Builder.php @@ -465,10 +465,14 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search { } /** - * CRM-10338 - * tags and groups use array keys for selection list. + * CRM-10338 tags and groups use array keys for selection list. + * * if using IS NULL/NOT NULL, an array with no array key is created * convert that to simple NULL so processing can proceed + * + * @param string $val + * + * @return null */ public static function checkArrayKeyEmpty($val) { if (is_array($val)) { diff --git a/CRM/Contact/Import/Field.php b/CRM/Contact/Import/Field.php index 1edcdb65b9..fd4f6329fa 100644 --- a/CRM/Contact/Import/Field.php +++ b/CRM/Contact/Import/Field.php @@ -164,14 +164,20 @@ class CRM_Contact_Import_Field { } /** - * The value is in string format. convert the value to the type of this field + * The value is in string format. + * + * Convert the value to the type of this field * and set the field value with the appropriate type + * + * @param mixed $value */ public function setValue($value) { $this->_value = $value; } /** + * Validate something we didn't document. + * * @return bool */ public function validate() { diff --git a/CRM/Contact/Page/AJAX.php b/CRM/Contact/Page/AJAX.php index 9621dbc329..ddab661e09 100644 --- a/CRM/Contact/Page/AJAX.php +++ b/CRM/Contact/Page/AJAX.php @@ -880,6 +880,8 @@ LIMIT {$offset}, {$rowCount} /** * Swap contacts in a dupe pair i.e main with duplicate contact. + * + * @param int $prevNextId */ public static function flipDupePairs($prevNextId = NULL) { if (!$prevNextId) { @@ -887,7 +889,7 @@ LIMIT {$offset}, {$rowCount} } $query = " UPDATE civicrm_prevnext_cache cpc - INNER JOIN civicrm_prevnext_cache old on cpc.id = old.id + INNER JOIN civicrm_prevnext_cache old on cpc.id = old.id SET cpc.entity_id1 = cpc.entity_id2, cpc.entity_id2 = old.entity_id1 "; if (is_array($prevNextId) && !CRM_Utils_Array::crmIsEmptyArray($prevNextId)) { $prevNextId = implode(', ', $prevNextId); diff --git a/CRM/Contribute/BAO/ContributionRecur.php b/CRM/Contribute/BAO/ContributionRecur.php index d4b938336c..ce853c5472 100644 --- a/CRM/Contribute/BAO/ContributionRecur.php +++ b/CRM/Contribute/BAO/ContributionRecur.php @@ -457,11 +457,13 @@ INNER JOIN civicrm_contribution con ON ( con.id = mp.contribution_id ) /** * CRM-16285 - Function to handle validation errors on form, for recurring contribution field. + * * @param array $fields * The input form values. * @param array $files * The uploaded files if any. - * @param $self + * @param CRM_Core_Form $self + * @param array $errors */ public static function validateRecurContribution($fields, $files, $self, &$errors) { if (!empty($fields['is_recur'])) { diff --git a/CRM/Core/BAO/EntityTag.php b/CRM/Core/BAO/EntityTag.php index f66afd0fdf..6cebea4c5c 100644 --- a/CRM/Core/BAO/EntityTag.php +++ b/CRM/Core/BAO/EntityTag.php @@ -312,6 +312,12 @@ class CRM_Core_BAO_EntityTag extends CRM_Core_DAO_EntityTag { /** * Get child contact tags given parentId. + * + * @param int $parentId + * @param int $entityId + * @param string $entityTable + * + * @return array */ public static function getChildEntityTags($parentId, $entityId, $entityTable = 'civicrm_contact') { $entityTags = array(); @@ -334,6 +340,11 @@ class CRM_Core_BAO_EntityTag extends CRM_Core_DAO_EntityTag { /** * Merge two tags: tag B into tag A. + * + * @param int $tagAId + * @param int $tagBId + * + * @return array */ public function mergeTags($tagAId, $tagBId) { $queryParams = array( diff --git a/CRM/Core/BAO/Navigation.php b/CRM/Core/BAO/Navigation.php index c2047bf107..ab9ec65a49 100644 --- a/CRM/Core/BAO/Navigation.php +++ b/CRM/Core/BAO/Navigation.php @@ -486,6 +486,8 @@ ORDER BY parent_id, weight"; * @param array $nodes * Each key is a numeral; each value is a node in * the menu tree (with keys "child" and "attributes"). + * @param int $maxNavID + * @param int $parentID */ private static function _fixNavigationMenu(&$nodes, &$maxNavID, $parentID) { $origKeys = array_keys($nodes); diff --git a/CRM/Core/BAO/Phone.php b/CRM/Core/BAO/Phone.php index 796129085f..00c6cdacaf 100644 --- a/CRM/Core/BAO/Phone.php +++ b/CRM/Core/BAO/Phone.php @@ -260,6 +260,10 @@ ORDER BY ph.is_primary DESC, phone_id ASC "; /** * Call common delete function. + * + * @param int $id + * + * @return bool */ public static function del($id) { // Ensure mysql phone function exists diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index 9fe4525860..0794209bb8 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -305,10 +305,13 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { } /** - * Validate & convert settings input - translate True False to 0 or 1 + * Validate & convert settings input - translate True False to 0 or 1. * - * @value mixed value of the setting to be set - * @fieldSpec array Metadata for given field (drawn from the xml) + * @param mixed $value value of the setting to be set + * @param array $fieldSpec Metadata for given field (drawn from the xml) + * + * @return bool + * @throws \api_Exception */ public static function validateBoolSetting(&$value, $fieldSpec) { if (!CRM_Utils_Rule::boolean($value)) { diff --git a/CRM/Core/BAO/UFField.php b/CRM/Core/BAO/UFField.php index d8190c4d17..c348c37b03 100644 --- a/CRM/Core/BAO/UFField.php +++ b/CRM/Core/BAO/UFField.php @@ -378,6 +378,10 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1"; /** * Find out whether given profile group using Activity * Profile fields with contact fields + * + * @param int $ufGroupId + * + * @return bool */ public static function checkContactActivityProfileType($ufGroupId) { $ufGroup = new CRM_Core_DAO_UFGroup(); diff --git a/CRM/Core/CodeGen/Specification.php b/CRM/Core/CodeGen/Specification.php index 1d6b98b2e5..86c211afcf 100644 --- a/CRM/Core/CodeGen/Specification.php +++ b/CRM/Core/CodeGen/Specification.php @@ -660,6 +660,10 @@ class CRM_Core_CodeGen_Specification { /** * Sets the size property of a textfield. + * + * @param string $fieldXML + * + * @return null|string */ protected function getSize($fieldXML) { // Extract from tag if supplied diff --git a/CRM/Core/Component.php b/CRM/Core/Component.php index b7cdb3fb94..5e5ce0c6d9 100644 --- a/CRM/Core/Component.php +++ b/CRM/Core/Component.php @@ -436,6 +436,10 @@ class CRM_Core_Component { /** * Get components info from info file. + * + * @param string $crmFolderDir + * + * @return array */ public static function getComponentsFromFile($crmFolderDir) { $components = array(); diff --git a/CRM/Core/Component/Info.php b/CRM/Core/Component/Info.php index f2b600c720..05a0689eb2 100644 --- a/CRM/Core/Component/Info.php +++ b/CRM/Core/Component/Info.php @@ -266,6 +266,8 @@ abstract class CRM_Core_Component_Info { /** * Builds advanced search form's component specific pane. + * + * @param CRM_Core_Form $form */ public function buildAdvancedSearchPaneForm(&$form) { $bao = $this->getBAOQueryObject(); diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index 460e011c08..ace4979140 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -239,6 +239,8 @@ class CRM_Core_Config extends CRM_Core_Config_MagicMerge { /** * Do general cleanup of caches, temp directories and temp tables * CRM-8739 + * + * @param bool $sessionReset */ public function cleanupCaches($sessionReset = TRUE) { // cleanup templates_c directory @@ -425,6 +427,10 @@ class CRM_Core_Config extends CRM_Core_Config_MagicMerge { /** * @deprecated + * + * @param string $defaultCurrency + * + * @return string */ public function defaultCurrencySymbol($defaultCurrency = NULL) { return CRM_Core_BAO_Country::defaultCurrencySymbol($defaultCurrency); diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index baa3033c9d..335a3fd50c 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -431,6 +431,10 @@ class CRM_Core_DAO extends DB_DataObject { } /** + * Save DAO object. + * + * @param bool $hook + * * @return $this */ public function save($hook = TRUE) { diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php index 82b0c8d7fb..6bf012854e 100644 --- a/CRM/Core/Error.php +++ b/CRM/Core/Error.php @@ -291,6 +291,10 @@ class CRM_Core_Error extends PEAR_ErrorStack { * Also, if we do not return any value the PEAR_ErrorStack::push() then does the * action of PEAR_ERRORSTACK_PUSHANDLOG which displays the errors on the screen, * since the logger set for this error stack is 'display' - see CRM_Core_Config::getLog(); + * + * @param mixed $pearError + * + * @return int */ public static function handlePES($pearError) { return PEAR_ERRORSTACK_PUSH; @@ -563,16 +567,16 @@ class CRM_Core_Error extends PEAR_ErrorStack { /** * Display the error message on terminal. * - * @param $message + * @param string $message * @param bool $out * Should we log or return the output. * * @param string $comp * Message to be output. - * @return string - * format of the backtrace - * + * @param string $priority * + * @return string + * Format of the backtrace */ public static function debug_log_message($message, $out = FALSE, $comp = '', $priority = NULL) { $config = CRM_Core_Config::singleton(); diff --git a/CRM/Core/IDS.php b/CRM/Core/IDS.php index 5204255f0d..85180ef6be 100644 --- a/CRM/Core/IDS.php +++ b/CRM/Core/IDS.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_IDS { @@ -49,6 +47,8 @@ class CRM_Core_IDS { private $init = NULL; /** + * Check function. + * * This function includes the IDS vendor parts and runs the * detection routines on the request array. * @@ -64,7 +64,7 @@ class CRM_Core_IDS { return NULL; } - #add request url and user agent + // Add request url and user agent. $_REQUEST['IDS_request_uri'] = $_SERVER['REQUEST_URI']; if (isset($_SERVER['HTTP_USER_AGENT'])) { $_REQUEST['IDS_user_agent'] = $_SERVER['HTTP_USER_AGENT']; @@ -171,8 +171,7 @@ class CRM_Core_IDS { } /** - * This function rects on the values in - * the incoming results array. + * This function reacts on the values in the incoming results array. * * Depending on the impact value certain actions are * performed. @@ -204,8 +203,7 @@ class CRM_Core_IDS { } /** - * This function writes an entry about the intrusion - * to the intrusion database + * This function writes an entry about the intrusion to the database. * * @param array $result * @param int $reaction @@ -238,14 +236,22 @@ class CRM_Core_IDS { } /** - * //todo + * Warn about IDS. + * + * @param array $result + * + * @return array */ private function warn($result) { return $result; } /** - * //todo + * Kick (whatever that means!). + * + * @param array $result + * + * @throws \Exception */ private function kick($result) { $session = CRM_Core_Session::singleton(); diff --git a/CRM/Core/Menu.php b/CRM/Core/Menu.php index ff45aeebb3..e45e737cfe 100644 --- a/CRM/Core/Menu.php +++ b/CRM/Core/Menu.php @@ -248,6 +248,8 @@ class CRM_Core_Menu { * 2. Compute local tasks value if any * 3. Propagate access argument, access callback, page callback to the menu item * 4. Build the global navigation block + * + * @param array $menu */ public static function build(&$menu) { foreach ($menu as $path => $menuItems) { diff --git a/CRM/Core/Payment/FirstData.php b/CRM/Core/Payment/FirstData.php index b4fea7aa53..daaaf465a4 100644 --- a/CRM/Core/Payment/FirstData.php +++ b/CRM/Core/Payment/FirstData.php @@ -313,6 +313,11 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment { /** * Produces error message and returns from class. + * + * @param int $errorCode + * @param string $errorMessage + * + * @return object */ public function &errorExit($errorCode = NULL, $errorMessage = NULL) { $e = CRM_Core_Error::singleton(); diff --git a/CRM/Core/Payment/GoogleIPN.php b/CRM/Core/Payment/GoogleIPN.php index ec61179aee..2e107a62df 100644 --- a/CRM/Core/Payment/GoogleIPN.php +++ b/CRM/Core/Payment/GoogleIPN.php @@ -692,6 +692,10 @@ WHERE contribution_recur_id = {$ids['contributionRecur']} /** * Converts the comma separated name-value pairs in * to an array of name-value pairs. + * + * @param string $str + * + * @return array */ public static function stringToArray($str) { $vars = $labels = array(); diff --git a/CRM/Core/Payment/PaymentExpressIPN.php b/CRM/Core/Payment/PaymentExpressIPN.php index fcac1ca7d5..079f81b1aa 100644 --- a/CRM/Core/Payment/PaymentExpressIPN.php +++ b/CRM/Core/Payment/PaymentExpressIPN.php @@ -432,8 +432,11 @@ class CRM_Core_Payment_PaymentExpressIPN extends CRM_Core_Payment_BaseIPN { } /** - * Converts the comma separated name-value pairs in - * to an array of values. + * Converts the comma separated name-value pairs in to an array of values. + * + * @param string $str + * + * @return array */ public static function stringToArray($str) { $vars = $labels = array(); diff --git a/CRM/Core/Payment/Realex.php b/CRM/Core/Payment/Realex.php index 6f148380bb..077db4b72b 100644 --- a/CRM/Core/Payment/Realex.php +++ b/CRM/Core/Payment/Realex.php @@ -296,7 +296,13 @@ class CRM_Core_Payment_Realex extends CRM_Core_Payment { } /** - * Format the params from the form ready for sending to Realex. Also perform some validation + * Format the params from the form ready for sending to Realex. + * + * Also perform some validation + * + * @param array $params + * + * @return bool */ public function setRealexFields(&$params) { if ((int) $params['amount'] <= 0) { diff --git a/CRM/Core/Payment/eWAY.php b/CRM/Core/Payment/eWAY.php index 37582a5b5c..12bbb7bc01 100644 --- a/CRM/Core/Payment/eWAY.php +++ b/CRM/Core/Payment/eWAY.php @@ -427,9 +427,12 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment { } /** - * ************************************************ - * Produces error message and returns from class - * ************************************************* + * Produces error message and returns from class. + * + * @param int $errorCode + * @param string $errorMessage + * + * @return object */ public function &errorExit($errorCode = NULL, $errorMessage = NULL) { $e = CRM_Core_Error::singleton(); diff --git a/CRM/Custom/Form/ChangeFieldType.php b/CRM/Custom/Form/ChangeFieldType.php index ea4a8398f2..92ffa09343 100644 --- a/CRM/Custom/Form/ChangeFieldType.php +++ b/CRM/Custom/Form/ChangeFieldType.php @@ -267,6 +267,9 @@ class CRM_Custom_Form_ChangeFieldType extends CRM_Core_Form { /** * Take a single-value column (eg: a Radio or Select etc ) and convert * value to the multi listed value (eg:"^Foo^") + * + * @param string $table + * @param string $column */ public function firstValueToFlatten($table, $column) { $selectSql = "SELECT id, $column FROM $table WHERE $column IS NOT NULL"; @@ -288,6 +291,9 @@ class CRM_Custom_Form_ChangeFieldType extends CRM_Core_Form { /** * Take a multi-value column (e.g. a Multi-Select or CheckBox column), and convert * all values (of the form "^^" or "^Foo^" or "^Foo^Bar^") to the first listed value ("Foo") + * + * @param string $table + * @param string $column */ public function flattenToFirstValue($table, $column) { $selectSql = "SELECT id, $column FROM $table WHERE $column IS NOT NULL"; diff --git a/CRM/Dedupe/BAO/RuleGroup.php b/CRM/Dedupe/BAO/RuleGroup.php index ec82cfb767..1616392f6d 100644 --- a/CRM/Dedupe/BAO/RuleGroup.php +++ b/CRM/Dedupe/BAO/RuleGroup.php @@ -344,6 +344,10 @@ class CRM_Dedupe_BAO_RuleGroup extends CRM_Dedupe_DAO_RuleGroup { * default is to always check permissioning but public pages for example might not want * permission to be checked for anonymous users. Refer CRM-6211. We might be beaking * Multi-Site dedupe for public pages. + * + * @param bool $checkPermission + * + * @return string */ public function thresholdQuery($checkPermission = TRUE) { $this->_aclFrom = ''; diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 15a2869043..cd8a27bb0b 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1032,6 +1032,10 @@ WHERE civicrm_event.is_active = 1 * This is sometimes called in a loop (during event search). * * We cache the values to prevent repeated calls to the db. + * + * @param int $id + * + * @return */ public static function isMonetary($id) { static $isMonetary = array(); diff --git a/CRM/Event/Badge.php b/CRM/Event/Badge.php index b5bb98351e..e0ab8d5f14 100644 --- a/CRM/Event/Badge.php +++ b/CRM/Event/Badge.php @@ -170,7 +170,9 @@ class CRM_Event_Badge { } /** - * This is supposed to be overrided. + * This is supposed to be overridden. + * + * @param array $participant */ public function generateLabel($participant) { $txt = "{$this->event['title']} diff --git a/CRM/Grant/Form/Task.php b/CRM/Grant/Form/Task.php index cc77b99cde..6b805ab25d 100644 --- a/CRM/Grant/Form/Task.php +++ b/CRM/Grant/Form/Task.php @@ -153,7 +153,7 @@ class CRM_Grant_Form_Task extends CRM_Core_Form { * @param string $nextType * @param string $backType * - * @return void + * @param bool $submitOnce */ public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) { $this->addButtons(array( diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php index b36635eef5..0725ae270b 100644 --- a/CRM/Logging/Schema.php +++ b/CRM/Logging/Schema.php @@ -159,6 +159,10 @@ AND TABLE_NAME LIKE 'log_civicrm_%' /** * Return custom data tables for specified entity / extends. + * + * @param string $extends + * + * @return array */ public function entityCustomDataLogTables($extends) { $customGroupTables = array(); @@ -409,6 +413,11 @@ AND TABLE_NAME LIKE 'log_civicrm_%' /** * Get an array of column names of the given table. + * + * @param string$table + * @param bool $force + * + * @return array */ private function columnsOf($table, $force = FALSE) { static $columnsOf = array(); @@ -432,6 +441,10 @@ AND TABLE_NAME LIKE 'log_civicrm_%' /** * Get an array of columns and their details like DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT for the given table. + * + * @param string $table + * + * @return array */ private function columnSpecsOf($table) { static $columnSpecs = array(), $civiDB = NULL; @@ -534,6 +547,8 @@ WHERE table_schema IN ('{$this->db}', '{$civiDB}')"; /** * Create a log table with schema mirroring the given table’s structure and seeding it with the given table’s contents. + * + * @param string $table */ private function createLogTableFor($table) { $dao = CRM_Core_DAO::executeQuery("SHOW CREATE TABLE $table", CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE); diff --git a/CRM/Member/Selector/Search.php b/CRM/Member/Selector/Search.php index 18713e1528..9bb9f496bb 100644 --- a/CRM/Member/Selector/Search.php +++ b/CRM/Member/Selector/Search.php @@ -290,7 +290,7 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C /** * Returns total number of rows for the query. * - * @param + * @param int $action. * * @return int * Total number of rows diff --git a/CRM/Pledge/BAO/Query.php b/CRM/Pledge/BAO/Query.php index d9af00c1a4..5d96048138 100644 --- a/CRM/Pledge/BAO/Query.php +++ b/CRM/Pledge/BAO/Query.php @@ -458,6 +458,10 @@ class CRM_Pledge_BAO_Query { /** * This includes any extra fields that might need for export etc. + * + * @param string $mode + * + * @return array|null */ public static function extraReturnProperties($mode) { $properties = NULL; diff --git a/CRM/Price/BAO/LineItem.php b/CRM/Price/BAO/LineItem.php index 98fea33b52..0e8dccce32 100644 --- a/CRM/Price/BAO/LineItem.php +++ b/CRM/Price/BAO/LineItem.php @@ -475,6 +475,7 @@ AND li.entity_id = {$entityId} /** * Build line items array. + * * @param array $params * Form values. * @@ -484,7 +485,7 @@ AND li.entity_id = {$entityId} * @param string $entityTable * Entity Table. * - * @return void + * @param bool $isRelatedID */ public static function getLineItemArray(&$params, $entityId = NULL, $entityTable = 'contribution', $isRelatedID = FALSE) { diff --git a/CRM/Profile/Selector/Listings.php b/CRM/Profile/Selector/Listings.php index 6d222c3a2c..565ee4b958 100644 --- a/CRM/Profile/Selector/Listings.php +++ b/CRM/Profile/Selector/Listings.php @@ -438,6 +438,8 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR * @param string $output * What should the result set include (web/email/csv). * + * @param string $extraWhereClause + * * @return int * the total number of rows for this action */ @@ -743,8 +745,11 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR } /** - * set the _multiRecordTableName to display the result set. - * according to multi record custom field values + * Set the _multiRecordTableName to display the result set. + * + * (according to multi record custom field values). + * + * @param array $fields */ public function setMultiRecordTableName($fields) { $customGroupId = $multiRecordTableName = NULL; @@ -772,7 +777,7 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR $this->_multiRecordTableName = $multiRecordTableName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $customGroupId, 'table_name'); if ($multiRecordTableName) { - return NULL; + return; } } @@ -784,7 +789,7 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR } if (!isset($customGroupId) || !$customGroupId) { - return NULL; + return; } //if the field is in selector and not a searchable field diff --git a/CRM/Report/Utils/Report.php b/CRM/Report/Utils/Report.php index 4999acc911..2337edb959 100644 --- a/CRM/Report/Utils/Report.php +++ b/CRM/Report/Utils/Report.php @@ -235,6 +235,11 @@ WHERE inst.report_id = %1"; /** * Utility function for export2csv and CRM_Report_Form::endPostProcess * - make CSV file content and return as string. + * + * @param CRM_Core_Form $form + * @param array $rows + * + * @return string */ public static function makeCsv(&$form, &$rows) { $config = CRM_Core_Config::singleton(); diff --git a/CRM/Upgrade/Incremental/php/FourTwo.php b/CRM/Upgrade/Incremental/php/FourTwo.php index 53769370e5..8811da71c0 100644 --- a/CRM/Upgrade/Incremental/php/FourTwo.php +++ b/CRM/Upgrade/Incremental/php/FourTwo.php @@ -377,6 +377,11 @@ HAVING COUNT(cpse.price_set_id) > 1 AND MIN(cpse1.id) <> cpse.id "; * (Queue Task Callback) * * Upgrade code to create priceset for contribution pages and events + * + * @param \CRM_Queue_TaskContext $ctx + * @param string $rev + * + * @return bool */ public static function task_4_2_alpha1_createPriceSets(CRM_Queue_TaskContext $ctx, $rev) { $upgrade = new CRM_Upgrade_Form(); @@ -428,8 +433,11 @@ WHERE cpse.price_set_id IS NULL"; } /** + * Create price sets. * - * create price sets + * @param string $daoName + * @param string $addTo + * @param array $options */ public static function createPriceSet($daoName, $addTo, $options = array()) { $query = "SELECT title FROM {$addTo[0]} where id =%1"; @@ -781,6 +789,10 @@ AND cli.entity_id IS NULL AND cp.fee_amount IS NOT NULL"; * (Queue Task Callback) * * Create an event registration profile with a single email field CRM-9587 + * + * @param \CRM_Queue_TaskContext $ctx + * + * @return bool */ public static function task_4_2_alpha1_eventProfile(CRM_Queue_TaskContext $ctx) { $upgrade = new CRM_Upgrade_Form(); diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Field.php b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Field.php index cc8167006a..51c1ae45f9 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Field.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Field.php @@ -340,6 +340,8 @@ class CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field extends CRM_Core_DAO { /** * returns the list of fields that can be imported. * + * @param bool $prefix + * * @return array */ static function &import($prefix = FALSE) { diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/FieldValue.php b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/FieldValue.php index df11370340..90807e0a97 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/FieldValue.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/FieldValue.php @@ -306,7 +306,9 @@ class CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue extends CRM_Core_DAO { } /** - * returns the list of fields that can be exported. + * Returns the list of fields that can be exported. + * + * @param bool $prefix * * @return array */ diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/LineItem.php b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/LineItem.php index 221e1fda28..a6767500da 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/LineItem.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/LineItem.php @@ -259,6 +259,8 @@ class CRM_Upgrade_Snapshot_V4p2_Price_DAO_LineItem extends CRM_Core_DAO { /** * returns the list of fields that can be imported. * + * @param bool $prefix + * * @return array */ static function &import($prefix = FALSE) { @@ -280,7 +282,9 @@ class CRM_Upgrade_Snapshot_V4p2_Price_DAO_LineItem extends CRM_Core_DAO { } /** - * returns the list of fields that can be exported. + * Returns the list of fields that can be exported. + * + * @param bool $prefix * * @return array */ diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Set.php b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Set.php index 3a169ccae5..786feb9319 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Set.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/Set.php @@ -281,7 +281,9 @@ class CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set extends CRM_Core_DAO { } /** - * returns the list of fields that can be imported. + * Returns the list of fields that can be imported. + * + * @param bool $prefix * * @return array */ diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/SetEntity.php b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/SetEntity.php index e4b6eaee98..7cf6624dcd 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/DAO/SetEntity.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/DAO/SetEntity.php @@ -182,7 +182,9 @@ class CRM_Upgrade_Snapshot_V4p2_Price_DAO_SetEntity extends CRM_Core_DAO { } /** - * returns the list of fields that can be imported. + * Returns the list of fields that can be imported. + * + * @param bool $prefix * * @return array */ diff --git a/CRM/Utils/Check.php b/CRM/Utils/Check.php index b72f71ca65..f1b5cd281b 100644 --- a/CRM/Utils/Check.php +++ b/CRM/Utils/Check.php @@ -232,8 +232,11 @@ class CRM_Utils_Check { /** * Evaluate if a system check should be hushed/snoozed. * + * @param string $message + * * @return bool * TRUE means hush/snooze, FALSE means display. + * @throws \CiviCRM_API3_Exception */ public static function checkHushSnooze($message) { $statusPreferenceParams = array( diff --git a/CRM/Utils/DeprecatedUtils.php b/CRM/Utils/DeprecatedUtils.php index c1da326b60..2f01ac8e7e 100644 --- a/CRM/Utils/DeprecatedUtils.php +++ b/CRM/Utils/DeprecatedUtils.php @@ -605,7 +605,11 @@ function _civicrm_api3_deprecated_formatted_param($params, &$values, $create = F } /** - * check duplicate contacts based on de-deupe parameters + * Check duplicate contacts based on de-dupe parameters. + * + * @param array $params + * + * @return array */ function _civicrm_api3_deprecated_check_contact_dedupe($params) { static $cIndieFields = NULL; diff --git a/CRM/Utils/File.php b/CRM/Utils/File.php index 5404a8f6ad..f869d7604e 100644 --- a/CRM/Utils/File.php +++ b/CRM/Utils/File.php @@ -271,7 +271,7 @@ class CRM_Utils_File { */ public static function addTrailingSlash($path, $slash = NULL) { if (!$slash) { - // FIXME: Defaulting to backslash on windows systems can produce + // FIXME: Defaulting to backslash on windows systems can produce // unexpected results, esp for URL strings which should always use forward-slashes. // I think this fn should default to forward-slash instead. $slash = DIRECTORY_SEPARATOR; @@ -381,8 +381,11 @@ class CRM_Utils_File { } /** - * Remove the 32 bit md5 we add to the fileName - * also remove the unknown tag if we added it + * Remove the 32 bit md5 we add to the fileName also remove the unknown tag if we added it. + * + * @param $name + * + * @return mixed */ public static function cleanFileName($name) { // replace the last 33 character before the '.' with null @@ -520,6 +523,8 @@ HTACCESS; /** * Determine if a path is absolute. * + * @param string $path + * * @return bool * TRUE if absolute. FALSE if relative. */ diff --git a/CRM/Utils/Mail/Incoming.php b/CRM/Utils/Mail/Incoming.php index 5b3ddb8219..5550706803 100644 --- a/CRM/Utils/Mail/Incoming.php +++ b/CRM/Utils/Mail/Incoming.php @@ -407,7 +407,15 @@ class CRM_Utils_Mail_Incoming { /** * Retrieve a contact ID and if not present. - * create one with this email + * + * Create one with this email + * + * @param string $email + * @param string $name + * @param bool $create + * @param string $mail + * + * @return int|null */ public static function getContactID($email, $name = NULL, $create = TRUE, &$mail) { $dao = CRM_Contact_BAO_Contact::matchContactOnEmail($email, 'Individual'); diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php index 12bcb6280f..ff361257a1 100644 --- a/CRM/Utils/Rule.php +++ b/CRM/Utils/Rule.php @@ -569,8 +569,10 @@ class CRM_Utils_Rule { * See how file rules are written in HTML/QuickForm/file.php * Checks to make sure the uploaded file is ascii * + * @param string $elementValue + * * @return bool - * true if file has been uploaded, false otherwise + * True if file has been uploaded, false otherwise */ public static function asciiFile($elementValue) { if ((isset($elementValue['error']) && $elementValue['error'] == 0) || @@ -584,8 +586,10 @@ class CRM_Utils_Rule { /** * Checks to make sure the uploaded file is in UTF-8, recodes if it's not * + * @param array $elementValue + * * @return bool - * whether file has been uploaded properly and is now in UTF-8 + * Whether file has been uploaded properly and is now in UTF-8. */ public static function utf8File($elementValue) { $success = FALSE; @@ -612,8 +616,10 @@ class CRM_Utils_Rule { * See how file rules are written in HTML/QuickForm/file.php * Checks to make sure the uploaded file is html * + * @param array $elementValue + * * @return bool - * true if file has been uploaded, false otherwise + * True if file has been uploaded, false otherwise */ public static function htmlFile($elementValue) { if ((isset($elementValue['error']) && $elementValue['error'] == 0) || diff --git a/CRM/Utils/System/Drupal.php b/CRM/Utils/System/Drupal.php index f98b0a2ebe..497a625219 100644 --- a/CRM/Utils/System/Drupal.php +++ b/CRM/Utils/System/Drupal.php @@ -559,6 +559,11 @@ AND u.status = 1 } /** + * Get CMS root path. + * + * @param string $scriptFilename + * + * @return null|string */ public function cmsRootPath($scriptFilename = NULL) { $cmsRoot = $valid = NULL; diff --git a/CRM/Utils/System/Drupal6.php b/CRM/Utils/System/Drupal6.php index 60da7ae2c4..c11b66b2b4 100644 --- a/CRM/Utils/System/Drupal6.php +++ b/CRM/Utils/System/Drupal6.php @@ -509,6 +509,11 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { } /** + * Get CMS root path. + * + * @param string $scriptFilename + * + * @return null|string */ public function cmsRootPath($scriptFilename = NULL) { $cmsRoot = $valid = NULL; diff --git a/CRM/Utils/System/DrupalBase.php b/CRM/Utils/System/DrupalBase.php index ed9ea9099a..fce73f6113 100644 --- a/CRM/Utils/System/DrupalBase.php +++ b/CRM/Utils/System/DrupalBase.php @@ -278,6 +278,8 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base { /** * Append Drupal js to coreResourcesList. + * + * @param array $list */ public function appendCoreResources(&$list) { $list[] = 'js/crm.drupal.js'; diff --git a/CRM/Utils/System/Joomla.php b/CRM/Utils/System/Joomla.php index 8e6917e23b..46b4b54bf1 100644 --- a/CRM/Utils/System/Joomla.php +++ b/CRM/Utils/System/Joomla.php @@ -424,12 +424,18 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { /** * FIXME: Do something + * + * @param string $message */ public function setMessage($message) { } /** * FIXME: Do something + * + * @param \obj $user + * + * @return bool */ public function loadUser($user) { return TRUE; diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index 3ca0033d12..dea048da3b 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -301,12 +301,18 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { /** * FIXME: Do something + * + * @param string $message */ public function setMessage($message) { } /** * FIXME: Do something + * + * @param \obj $user + * + * @return bool */ public function loadUser($user) { return TRUE; diff --git a/api/v3/UFJoin.php b/api/v3/UFJoin.php index db5b3d10f9..4f5922531f 100644 --- a/api/v3/UFJoin.php +++ b/api/v3/UFJoin.php @@ -75,10 +75,13 @@ function civicrm_api3_uf_join_get($params) { } /** - * Delete a CiviCRM UF_Join + * Delete a CiviCRM UF_Join. * * @param array $params * Array of name/value pairs. + * + * @return array + * API result array. */ function civicrm_api3_uf_join_delete($params) { return _civicrm_api3_basic_delete('CRM_Core_BAO_UFJoin', $params); diff --git a/tests/phpunit/Civi/ActionSchedule/AbstractMappingTest.php b/tests/phpunit/Civi/ActionSchedule/AbstractMappingTest.php index 2f7774cba9..5835e95758 100644 --- a/tests/phpunit/Civi/ActionSchedule/AbstractMappingTest.php +++ b/tests/phpunit/Civi/ActionSchedule/AbstractMappingTest.php @@ -188,6 +188,12 @@ abstract class AbstractMappingTest extends \CiviUnitTestCase { * Execute the default schedule, without any special recipient selections. * * @dataProvider createTestCases + * + * @param string $targetDate + * @param string $setupFuncs + * @param array $expectMessages + * + * @throws \Exception */ public function testDefault($targetDate, $setupFuncs, $expectMessages) { $this->targetDate = $targetDate; diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index eb27b5909a..33b2bfa2a7 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -2290,8 +2290,9 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { /** * Type and select first occurrence of autocomplete. + * * @param $fieldName - * @param $label + * @param string $labels * @param bool $multiple * @param bool $xpath */ diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index dd95ae263e..3fde130f28 100755 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -3028,6 +3028,8 @@ AND ( TABLE_NAME LIKE 'civicrm_value_%' ) * $this->createLoggedInUser(); * $this->_permissionedDisabledGroup = $this->groupCreate(array('title' => 'pick-me-disabled', 'is_active' => 0, 'name' => 'pick-me-disabled')); * $this->_permissionedGroup = $this->groupCreate(array('title' => 'pick-me-active', 'is_active' => 1, 'name' => 'pick-me-active')); + * + * @param bool $isProfile */ public function setupACL($isProfile = FALSE) { global $_REQUEST; diff --git a/tests/phpunit/WebTest/Event/AddEventTest.php b/tests/phpunit/WebTest/Event/AddEventTest.php index bf330f09d7..be9845a633 100644 --- a/tests/phpunit/WebTest/Event/AddEventTest.php +++ b/tests/phpunit/WebTest/Event/AddEventTest.php @@ -965,7 +965,9 @@ WHERE ceft.entity_id = %1 AND ceft.entity_table = 'civicrm_contribution'"; } /** - * @param $status + * Test enabling participant statuses. + * + * @param int $statusId */ public function _testEnableParticipantStatuses($statusId) { // enable participant status diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php index d715a75b81..8d57aa9775 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php @@ -200,13 +200,17 @@ class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase { } /** + * Test online membership signup. + * * @param int $pageId * @param int $memTypeId * @param string $firstName * @param string $lastName - * @param $payLater - * @param $hash + * @param bool $payLater + * @param string $hash * @param bool $otherAmount + * @param bool $amountSection + * @param bool $freeMembership */ public function _testOnlineMembershipSignup($pageId, $memTypeId, $firstName, $lastName, $payLater, $hash, $otherAmount = FALSE, $amountSection = TRUE, $freeMembership = FALSE) { //Open Live Contribution Page -- 2.25.1