From 8eedd10ab20e65fa8e17f2ea00d3c82c7f8d5aff Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Thu, 3 Sep 2015 20:33:47 +1200 Subject: [PATCH] comment fixes --- CRM/Core/BAO/Mapping.php | 4 -- CRM/Core/BAO/MessageTemplate.php | 9 +--- CRM/Core/BAO/Note.php | 11 +---- CRM/Core/BAO/OptionValue.php | 9 ++-- CRM/Core/BAO/PaperSize.php | 6 +-- CRM/Core/BAO/PdfFormat.php | 10 +--- CRM/Core/BAO/Phone.php | 6 +-- CRM/Core/BAO/PreferencesDate.php | 7 --- CRM/Core/BAO/RecurringEntity.php | 49 ++++++++------------ CRM/Core/BAO/Setting.php | 5 -- CRM/Core/BAO/UFField.php | 16 +------ CRM/Core/BAO/UFGroup.php | 18 +------- CRM/Core/BAO/UFMatch.php | 14 +----- CRM/Core/BAO/Website.php | 10 ++-- CRM/Core/Block.php | 24 ++-------- CRM/Core/Config.php | 5 +- CRM/Core/Controller.php | 44 ++++-------------- CRM/Core/DAO.php | 22 ++------- CRM/Core/Error.php | 12 +---- CRM/Core/Form.php | 58 +++++------------------- CRM/Core/Form/Date.php | 19 ++++---- CRM/Core/Form/RecurringEntity.php | 8 +--- CRM/Core/Form/ShortCode.php | 15 ++---- CRM/Core/Form/Tag.php | 9 +--- CRM/Core/I18n.php | 6 --- CRM/Core/JobManager.php | 7 --- CRM/Core/Joomla.php | 11 +++-- CRM/Core/OptionGroup.php | 5 -- CRM/Core/OptionValue.php | 4 -- CRM/Core/Page.php | 27 ++--------- CRM/Core/Page/RecurringEntityPreview.php | 4 -- CRM/Core/Payment/Form.php | 2 - CRM/Core/Payment/Google.php | 31 +++---------- CRM/Core/Payment/PaymentExpress.php | 2 - CRM/Core/Payment/PaymentExpressIPN.php | 3 +- CRM/Core/PseudoConstant.php | 8 ++-- CRM/Core/QuickForm/Action/Reload.php | 4 +- CRM/Core/Session.php | 58 ++++++++---------------- CRM/Core/ShowHideBlocks.php | 15 +----- CRM/Core/State.php | 14 +----- CRM/Core/StateMachine.php | 20 ++------ CRM/Cxn/BAO/Cxn.php | 2 - 42 files changed, 133 insertions(+), 480 deletions(-) diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index 36d0912313..3b8b9afb51 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { @@ -255,8 +253,6 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { * @param int $blockCount * (no of blocks shown). * @param NULL $exportMode - * - * @return void */ public static function buildMappingForm(&$form, $mappingType = 'Export', $mappingId = NULL, $columnNo, $blockCount = 3, $exportMode = NULL) { if ($mappingType == 'Export') { diff --git a/CRM/Core/BAO/MessageTemplate.php b/CRM/Core/BAO/MessageTemplate.php index 316e6a49fb..fe00feb451 100644 --- a/CRM/Core/BAO/MessageTemplate.php +++ b/CRM/Core/BAO/MessageTemplate.php @@ -29,14 +29,12 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ require_once 'Mail/mime.php'; /** - * Class CRM_Core_BAO_MessageTemplate + * Class CRM_Core_BAO_MessageTemplate. */ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate { @@ -100,7 +98,6 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate { * Delete the Message Templates. * * @param int $messageTemplatesID - * @return void */ public static function del($messageTemplatesID) { // make sure messageTemplatesID is an integer @@ -270,11 +267,9 @@ class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate { } /** - * Revert a message template to its default subject+text+HTML state + * Revert a message template to its default subject+text+HTML state. * * @param int $id id of the template - * - * @return void */ public static function revert($id) { $diverted = new CRM_Core_BAO_MessageTemplate(); diff --git a/CRM/Core/BAO/Note.php b/CRM/Core/BAO/Note.php index 717b4fbc5d..ef7dff898c 100644 --- a/CRM/Core/BAO/Note.php +++ b/CRM/Core/BAO/Note.php @@ -29,12 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * BAO object for crm_note table + * BAO object for crm_note table. */ class CRM_Core_BAO_Note extends CRM_Core_DAO_Note { @@ -45,7 +43,7 @@ class CRM_Core_BAO_Note extends CRM_Core_DAO_Note { const MAX_NOTES = 3; /** - * Given a note id, retrieve the note text + * Given a note id, retrieve the note text. * * @param int $id * Id of the note to retrieve. @@ -336,9 +334,6 @@ class CRM_Core_BAO_Note extends CRM_Core_DAO_Note { * * @param int $id * ID of the contact for which note needs to be deleted. - * - * @return void - * */ public static function deleteContact($id) { // need to delete for both entity_id @@ -552,8 +547,6 @@ ORDER BY modified_date desc"; * * @param int $contactID * Contact id whose notes to be deleted. - * - * @return void */ public static function cleanContactNotes($contactID) { $params = array(1 => array($contactID, 'Integer')); diff --git a/CRM/Core/BAO/OptionValue.php b/CRM/Core/BAO/OptionValue.php index 3f1f1f604a..04b0e38237 100644 --- a/CRM/Core/BAO/OptionValue.php +++ b/CRM/Core/BAO/OptionValue.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_BAO_OptionValue extends CRM_Core_DAO_OptionValue { @@ -42,8 +40,9 @@ class CRM_Core_BAO_OptionValue extends CRM_Core_DAO_OptionValue { } /** - * Create option value - note that the create function calls 'add' but - * has more business logic + * Create option value. + * + * Note that the create function calls 'add' but has more business logic. * * @param array $params * Input parameters. @@ -423,8 +422,6 @@ class CRM_Core_BAO_OptionValue extends CRM_Core_DAO_OptionValue { * @param int $opGroupId * @param array $opWeights * Options value , weight pair. - * - * @return void */ public static function updateOptionWeights($opGroupId, $opWeights) { if (!is_array($opWeights) || empty($opWeights)) { diff --git a/CRM/Core/BAO/PaperSize.php b/CRM/Core/BAO/PaperSize.php index a9e8148275..439ef42cd0 100644 --- a/CRM/Core/BAO/PaperSize.php +++ b/CRM/Core/BAO/PaperSize.php @@ -30,12 +30,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * This class contains functions for managing Paper Sizes + * This class contains functions for managing Paper Sizes. */ class CRM_Core_BAO_PaperSize extends CRM_Core_DAO_OptionValue { @@ -268,8 +266,6 @@ class CRM_Core_BAO_PaperSize extends CRM_Core_DAO_OptionValue { * @param array (reference) $values associative array of name/value pairs * @param int $id * Id of the database record (null = new record). - * - * @return void */ public function savePaperSize(&$values, $id) { // get the Option Group ID for Paper Sizes (create one if it doesn't exist) diff --git a/CRM/Core/BAO/PdfFormat.php b/CRM/Core/BAO/PdfFormat.php index 94dfc47fdb..ccdbe4a9f0 100644 --- a/CRM/Core/BAO/PdfFormat.php +++ b/CRM/Core/BAO/PdfFormat.php @@ -30,12 +30,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * This class contains functions for managing PDF Page Formats + * This class contains functions for managing PDF Page Formats. */ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue { @@ -144,8 +142,6 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue { * @param array (reference) $list List of PDF Page Formats * @param string $returnURL * URL of page calling this function. - * - * @return void */ public static function addOrder(&$list, $returnURL) { $filter = "option_group_id = " . self::_getGid(); @@ -324,11 +320,9 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue { /** * Save the PDF Page Format in the DB. * - * @param array (reference) $values associative array of name/value pairs + * @param array $values associative array of name/value pairs * @param int $id * Id of the database record (null = new record). - * - * @return void */ public function savePdfFormat(&$values, $id = NULL) { // get the Option Group ID for PDF Page Formats (create one if it doesn't exist) diff --git a/CRM/Core/BAO/Phone.php b/CRM/Core/BAO/Phone.php index 4414faeb4a..796129085f 100644 --- a/CRM/Core/BAO/Phone.php +++ b/CRM/Core/BAO/Phone.php @@ -29,12 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * Class contains functions for phone + * Class contains functions for phone. */ class CRM_Core_BAO_Phone extends CRM_Core_DAO_Phone { @@ -234,8 +232,6 @@ ORDER BY ph.is_primary DESC, phone_id ASC "; * * @param $optionId * Value of option to be deleted. - * - * @return void */ public static function setOptionToNull($optionId) { if (!$optionId) { diff --git a/CRM/Core/BAO/PreferencesDate.php b/CRM/Core/BAO/PreferencesDate.php index 86c544b8e2..607206d760 100644 --- a/CRM/Core/BAO/PreferencesDate.php +++ b/CRM/Core/BAO/PreferencesDate.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_BAO_PreferencesDate extends CRM_Core_DAO_PreferencesDate { @@ -74,10 +72,6 @@ class CRM_Core_BAO_PreferencesDate extends CRM_Core_DAO_PreferencesDate { * Id of the database record. * @param bool $is_active * Value we want to set the is_active field. - * - * @return void - * DAO object on success, null otherwise - * */ public static function setIsActive($id, $is_active) { CRM_Core_Error::fatal(); @@ -87,7 +81,6 @@ class CRM_Core_BAO_PreferencesDate extends CRM_Core_DAO_PreferencesDate { * Delete preference dates. * * @param int $id - * */ public static function del($id) { CRM_Core_Error::fatal(); diff --git a/CRM/Core/BAO/RecurringEntity.php b/CRM/Core/BAO/RecurringEntity.php index fcee1ccc4e..0b43da189c 100644 --- a/CRM/Core/BAO/RecurringEntity.php +++ b/CRM/Core/BAO/RecurringEntity.php @@ -29,14 +29,12 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ require_once 'packages/When/When.php'; /** - * Class CRM_Core_BAO_RecurringEntity + * Class CRM_Core_BAO_RecurringEntity. */ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity { @@ -203,10 +201,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity { * This function updates the mode column in the civicrm_recurring_entity table. * * @param int $mode - * Mode of the entity to cascade changes across parent/child relations eg 1 - only this entity, 2 - this and the following entities, 3 - All the entity . - * - * - * @return void + * Mode of the entity to cascade changes across parent/child relations eg 1 - only this entity, 2 - this and the following entities, 3 - All the entity. */ public function mode($mode) { if ($this->entity_id && $this->entity_table) { @@ -601,14 +596,12 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity { } /** - * This function acts as a listener to dao->update whenever there is an update, - * and propagates any changes to all related entities present in recurring entity table + * This function acts as a listener to dao->update whenever there is an update. * - * @param object $event - * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just updated . + * It propagates any changes to all related entities present in recurring entity table * - * - * @return void + * @param object $event + * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just updated. */ static public function triggerUpdate($event) { // if DB version is earlier than 4.6 skip any processing @@ -623,20 +616,20 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity { static $processedEntities = array(); $obj =& $event->object; if (empty($obj->id) || empty($obj->__table)) { - return FALSE; + return; } $key = "{$obj->__table}_{$obj->id}"; if (array_key_exists($key, $processedEntities)) { // already processed - return NULL; + return; } // get related entities $repeatingEntities = self::getEntitiesFor($obj->id, $obj->__table, FALSE, NULL); if (empty($repeatingEntities)) { // return if its not a recurring entity parent - return NULL; + return; } // mark being processed $processedEntities[$key] = 1; @@ -677,15 +670,12 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity { * and creates entries for linked entities in recurring entity table * * @param object $event - * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just inserted . - * - * - * @return void + * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just inserted. */ static public function triggerInsert($event) { $obj =& $event->object; if (!array_key_exists($obj->__table, self::$_linkedEntitiesInfo)) { - return FALSE; + return; } // if DB version is earlier than 4.6 skip any processing @@ -699,18 +689,18 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity { static $processedEntities = array(); if (empty($obj->id) || empty($obj->__table)) { - return FALSE; + return; } $key = "{$obj->__table}_{$obj->id}"; if (array_key_exists($key, $processedEntities)) { // already being processed. Exit recursive calls. - return NULL; + return; } if (self::getStatus() == self::RUNNING) { // if recursion->generate() is doing some work, lets not intercept - return NULL; + return; } // mark being processed @@ -743,7 +733,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity { foreach ($pRepeatingEntities as $key => $val) { if (array_key_exists($key, $processedEntities)) { // this graph is already being processed - return NULL; + return; } $processedEntities[$key] = 1; } @@ -787,10 +777,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity { * This function acts as a listener to dao->delete, and deletes an entry from recurring_entity table * * @param object $event - * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just deleted . - * - * - * @return void + * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just deleted. */ static public function triggerDelete($event) { $obj =& $event->object; @@ -806,13 +793,13 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity { static $processedEntities = array(); if (empty($obj->id) || empty($obj->__table) || !$event->result) { - return FALSE; + return; } $key = "{$obj->__table}_{$obj->id}"; if (array_key_exists($key, $processedEntities)) { // already processed - return NULL; + return; } // mark being processed diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index f055001380..4ef45dd27b 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -39,7 +37,6 @@ * * The group column is used for grouping together all settings that logically belong to the same set. * Thus all settings in the same group are retrieved with one DB call and then cached for future needs. - * */ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { @@ -366,8 +363,6 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { * An optional ID to assign the creator to. If not set, retrieved from session. * * @param int $domainID - * - * @return void */ public static function setItem( $value, diff --git a/CRM/Core/BAO/UFField.php b/CRM/Core/BAO/UFField.php index a0bb9c5cb4..11fc22453b 100644 --- a/CRM/Core/BAO/UFField.php +++ b/CRM/Core/BAO/UFField.php @@ -29,13 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * This class contains function for UFField - * + * This class contains function for UFField. */ class CRM_Core_BAO_UFField extends CRM_Core_DAO_UFField { @@ -271,8 +268,6 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1"; * Custom field id. * @param bool $is_active * Set the is_active field. - * - * @return void */ public static function setUFField($customFieldId, $is_active) { //find the profile id given custom field @@ -294,8 +289,6 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1"; * From which we need to copy. * @param bool $new_id * In which to copy. - * - * @return void */ public static function copy($old_id, $new_id) { $ufField = new CRM_Core_DAO_UFField(); @@ -314,9 +307,6 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1"; * * @param int $customFieldId * ID of the custom field to be deleted. - * - * @return void - * */ public static function delUFField($customFieldId) { //find the profile id given custom field id @@ -337,8 +327,6 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1"; * Custom group id. * @param bool $is_active * Value we want to set the is_active field. - * - * @return void */ public static function setUFFieldStatus($customGroupId, $is_active) { //find the profile id given custom group id @@ -752,8 +740,6 @@ SELECT id * Reset In selector and is searchable values for given $profileID. * * @param int $profileID - * - * @return void */ public function resetInSelectorANDSearchable($profileID) { if (!$profileID) { diff --git a/CRM/Core/BAO/UFGroup.php b/CRM/Core/BAO/UFGroup.php index 5240a93d2a..d49553763b 100644 --- a/CRM/Core/BAO/UFGroup.php +++ b/CRM/Core/BAO/UFGroup.php @@ -29,12 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * + * UF group BAO class. */ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup { const PUBLIC_VISIBILITY = 1, @@ -952,8 +950,6 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup { * @param bool $absolute * Return urls in absolute form (useful when sending an email). * @param null $additionalWhereClause - * - * @return void */ public static function getValues( $cid, &$fields, &$values, @@ -1494,8 +1490,6 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup { * (reference) an assoc array of name/value pairs. * @param int $ufGroupId * Ufgroup id. - * - * @return void */ public static function createUFJoin(&$params, $ufGroupId) { $groupTypes = CRM_Utils_Array::value('uf_group_type', $params); @@ -1627,8 +1621,6 @@ AND ( entity_id IS NULL OR entity_id <= 0 ) * * @param array $params * (reference) an assoc array of name/value pairs. - * - * @return void */ public static function delUFJoin(&$params) { $ufJoin = new CRM_Core_DAO_UFJoin(); @@ -2705,7 +2697,7 @@ AND ( entity_id IS NULL OR entity_id <= 0 ) * @param int $id * The profile id to copy. * - * @return void + * @return \CRM_Core_DAO */ public static function copy($id) { $fieldsFix = array('prefix' => array('title' => ts('Copy of '))); @@ -2764,8 +2756,6 @@ AND ( entity_id IS NULL OR entity_id <= 0 ) * Contact id. * @param array $values * Associative array of name/value pair. - * - * @return void */ public static function commonSendMail($contactID, &$values) { if (!$contactID || !$values) { @@ -2859,8 +2849,6 @@ AND ( entity_id IS NULL OR entity_id <= 0 ) * Group id. * @param array $values * @param CRM_Core_Smarty $template - * - * @return void */ public function profileDisplay($gid, $values, $template) { $groupTitle = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $gid, 'title'); @@ -3204,8 +3192,6 @@ AND ( entity_id IS NULL OR entity_id <= 0 ) * An array of default values. * * @param bool $isStandalone - * - * @return void */ public static function setComponentDefaults(&$fields, $componentId, $component, &$defaults, $isStandalone = FALSE) { if (!$componentId || diff --git a/CRM/Core/BAO/UFMatch.php b/CRM/Core/BAO/UFMatch.php index 3b918ab086..e6891dccfc 100644 --- a/CRM/Core/BAO/UFMatch.php +++ b/CRM/Core/BAO/UFMatch.php @@ -29,12 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * The basic class that interfaces with the external user framework + * The basic class that interfaces with the external user framework. */ class CRM_Core_BAO_UFMatch extends CRM_Core_DAO_UFMatch { @@ -74,8 +72,6 @@ class CRM_Core_BAO_UFMatch extends CRM_Core_DAO_UFMatch { * * @param $ctype * @param bool $isLogin - * - * @return void */ public static function synchronize(&$user, $update, $uf, $ctype, $isLogin = FALSE) { $userSystem = CRM_Core_Config::singleton()->userSystem; @@ -362,8 +358,6 @@ AND domain_id = %4 * * @param int $contactId * Id of the contact to update. - * - * @return void */ public static function updateUFName($contactId) { if (!$contactId) { @@ -415,10 +409,8 @@ AND domain_id = %4 * * @param int $contactId * Contact ID of the user. - * @param $emailAddress + * @param string $emailAddress * Email to be modified for the user. - * - * @return void */ public static function updateContactEmail($contactId, $emailAddress) { $strtolower = function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower'; @@ -471,8 +463,6 @@ AND domain_id = %4 * * @param int $ufID * Id of the user to delete. - * - * @return void */ public static function deleteUser($ufID) { $ufmatch = new CRM_Core_DAO_UFMatch(); diff --git a/CRM/Core/BAO/Website.php b/CRM/Core/BAO/Website.php index 0ea8c53012..f0a510830d 100644 --- a/CRM/Core/BAO/Website.php +++ b/CRM/Core/BAO/Website.php @@ -29,12 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * This class contain function for Website handling + * This class contain function for Website handling. */ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website { @@ -66,9 +64,9 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website { * @param int $contactID * Contact id. * - * @param $skipDelete + * @param bool $skipDelete * - * @return void + * @return bool */ public static function create(&$params, $contactID, $skipDelete) { if (empty($params)) { @@ -115,7 +113,7 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website { * @param array $ids * Website ids. * - * @return void + * @return bool */ public static function del($ids) { $query = 'DELETE FROM civicrm_website WHERE id IN ( ' . implode(',', $ids) . ')'; diff --git a/CRM/Core/Block.php b/CRM/Core/Block.php index 49807e0a33..db6ad2e00d 100644 --- a/CRM/Core/Block.php +++ b/CRM/Core/Block.php @@ -29,14 +29,12 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * defines a simple implemenation of a drupal block. - * blocks definitions and html are in a smarty template file + * Defines a simple implementation of a drupal block. * + * Blocks definitions and html are in a smarty template file. */ class CRM_Core_Block { @@ -67,8 +65,6 @@ class CRM_Core_Block { /** * Initialises the $_properties array - * - * @return void */ public static function initProperties() { if (!defined('BLOCK_CACHE_GLOBAL')) { @@ -206,8 +202,6 @@ class CRM_Core_Block { * The desired property. * @param string $value * The value of the desired property. - * - * @return void */ public static function setProperty($id, $property, $value) { if (!(self::$_properties)) { @@ -217,7 +211,7 @@ class CRM_Core_Block { } /** - * Returns the whole $_properties array + * Returns the whole $_properties array. * * @return array * the $_properties array @@ -288,8 +282,6 @@ class CRM_Core_Block { * hence this hack * * @param int $id - * - * @return void */ private static function setTemplateValues($id) { switch ($id) { @@ -347,8 +339,6 @@ class CRM_Core_Block { /** * Create the list of options to create New objects for the application and format is as a block. - * - * @return void */ private static function setTemplateShortcutValues() { $config = CRM_Core_Config::singleton(); @@ -470,8 +460,6 @@ class CRM_Core_Block { /** * Create the list of dashboard links. - * - * @return void */ private static function setTemplateDashboardValues() { static $dashboardLinks = array(); @@ -507,8 +495,6 @@ class CRM_Core_Block { /** * Create the list of mail urls for the application and format is as a block. - * - * @return void */ private static function setTemplateMailValues() { static $shortCuts = NULL; @@ -540,8 +526,6 @@ class CRM_Core_Block { /** * Create the list of shortcuts for the application and format is as a block. - * - * @return void */ private static function setTemplateMenuValues() { $config = CRM_Core_Config::singleton(); @@ -555,8 +539,6 @@ class CRM_Core_Block { /** * Create the event blocks for upcoming events. - * - * @return void */ private static function setTemplateEventValues() { $config = CRM_Core_Config::singleton(); diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index c47361175a..c78f37520c 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -27,13 +27,12 @@ /** * Config handles all the run time configuration changes that the system needs to deal with. + * * Typically we'll have different values for a user's sandbox, a qa sandbox and a production area. * The default values in general, should reflect production values (minimizes chances of screwing up) * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ require_once 'Log.php'; @@ -423,8 +422,6 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { /** * Initialize the config variables. - * - * @return void */ private function _initVariables() { // retrieve serialised settings diff --git a/CRM/Core/Controller.php b/CRM/Core/Controller.php index e837019699..736406d1a2 100644 --- a/CRM/Core/Controller.php +++ b/CRM/Core/Controller.php @@ -39,8 +39,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ require_once 'HTML/QuickForm/Controller.php'; @@ -376,14 +374,12 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { } /** - * Helper function to add all the needed default actions. Note that the framework - * redefines all of the default QFC actions + * Helper function to add all the needed default actions. + * + * Note that the framework redefines all of the default QFC actions. * * @param string $uploadDirectory to store all the uploaded files * @param array $uploadNames for the various upload buttons (note u can have more than 1 upload) - * - * - * @return void */ public function addActions($uploadDirectory = NULL, $uploadNames = NULL) { $names = array( @@ -432,8 +428,6 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { * @param CRM_Core_StateMachine $stateMachine * @param \const|int $action the mode in which the state machine is operating * typically this will be add/view/edit - * - * @return void */ public function addPages(&$stateMachine, $action = CRM_Core_Action::NONE) { $pages = $stateMachine->getPages(); @@ -491,9 +485,6 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { /** * Destroy all the session state of the controller. - * - * - * @return void */ public function reset() { $this->container(TRUE); @@ -502,12 +493,11 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { /** * Virtual function to do any processing of data. + * * Sometimes it is useful for the controller to actually process data. * This is typically used when we need the controller to figure out * what pages are potentially involved in this wizard. (this is dynamic * and can change based on the arguments - * - * @return void */ public function process() { } @@ -518,9 +508,6 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { * @param string|array $name name of the variable or an assoc array of name/value pairs * @param mixed $value * Value of the variable if string. - * - * - * @return void */ public function set($name, $value = NULL) { self::$_session->set($name, $value, $this->_scope); @@ -532,7 +519,6 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { * @param string $name * name of the variable. * - * * @return mixed */ public function get($name) { @@ -601,9 +587,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { * * @param string $var * @param mixed $value - * Value of varaible. - * - * @return void + * Value of variable. */ public function assign($var, $value = NULL) { self::$_template->assign($var, $value); @@ -614,9 +598,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { * * @param string $var * @param mixed $value - * (reference) value of varaible. - * - * @return void + * (reference) value of variable. */ public function assign_by_ref($var, &$value) { self::$_template->assign_by_ref($var, $value); @@ -649,8 +631,6 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { * Setter for embedded. * * @param bool $embedded - * - * @return void */ public function setEmbedded($embedded) { $this->_embedded = $embedded; @@ -670,8 +650,6 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { * Setter for skipRedirection. * * @param bool $skipRedirection - * - * @return void */ public function setSkipRedirection($skipRedirection) { $this->_skipRedirection = $skipRedirection; @@ -720,8 +698,6 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { * Setter for print. * * @param bool $print - * - * @return void */ public function setPrint($print) { if ($print == "xls") { @@ -843,10 +819,10 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { } /** - * Write a simple fatal error message. Other controllers can decide to do something else - * and present the user a better message and/or redirect to the same page with a reset url + * Write a simple fatal error message. * - * @return void + * Other controllers can decide to do something else and present the user a better message + * and/or redirect to the same page with a reset url */ public function invalidKey() { self::invalidKeyCommon(); @@ -860,8 +836,6 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { /** * Instead of outputting a fatal error message, we'll just redirect * to the entryURL if present - * - * @return void */ public function invalidKeyRedirect() { if ($this->_entryURL && $url_parts = parse_url($this->_entryURL)) { diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index e9b71a689b..821f818854 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -30,8 +30,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ require_once 'PEAR.php'; @@ -99,8 +97,6 @@ class CRM_Core_DAO extends DB_DataObject { * * @param string $dsn * The database connection string. - * - * @return void */ public static function init($dsn) { $options = &PEAR::getStaticProperty('DB_DataObject', 'options'); @@ -267,11 +263,11 @@ class CRM_Core_DAO extends DB_DataObject { } /** - * Reset the DAO object. DAO is kinda crappy in that there is an unwritten - * rule of one query per DAO. We attempt to get around this crappy restricrion - * by resetting some of DAO's internal fields. Use this with caution + * Reset the DAO object. * - * @return void + * DAO is kinda crappy in that there is an unwritten rule of one query per DAO. + * + * We attempt to get around this crappy restriction by resetting some of DAO's internal fields. Use this with caution */ public function reset() { @@ -330,8 +326,6 @@ class CRM_Core_DAO extends DB_DataObject { * * @param object $factory * The factory application object. - * - * @return void */ public static function setFactory(&$factory) { self::$_factory = &$factory; @@ -341,8 +335,6 @@ class CRM_Core_DAO extends DB_DataObject { * Factory method to instantiate a new object from a table name. * * @param string $table - * - * @return void */ public function factory($table = '') { if (!isset(self::$_factory)) { @@ -355,8 +347,6 @@ class CRM_Core_DAO extends DB_DataObject { /** * Initialization for all DAO objects. Since we access DB_DO programatically * we need to set the links manually. - * - * @return void */ public function initialize() { $this->_connect(); @@ -571,8 +561,6 @@ class CRM_Core_DAO extends DB_DataObject { * The object that we are extracting data from. * @param array $values * (reference ) associative array of name/value pairs. - * - * @return void */ public static function storeValues(&$object, &$values) { $fields = &$object->fields(); @@ -1138,8 +1126,6 @@ FROM civicrm_domain * Name of the dao object. * @param int $contactId * Id of the contact to delete. - * - * @return void */ public static function deleteEntityContact($daoName, $contactId) { $object = new $daoName(); diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php index f2df4daf45..5517fd8333 100644 --- a/CRM/Core/Error.php +++ b/CRM/Core/Error.php @@ -31,8 +31,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ require_once 'PEAR/ErrorStack.php'; @@ -46,7 +44,8 @@ require_once 'Log.php'; */ class CRM_Exception extends PEAR_Exception { /** - * Redefine the exception so message isn't optional + * Redefine the exception so message isn't optional. + * * Supported signatures: * - PEAR_Exception(string $message); * - PEAR_Exception(string $message, int $code); @@ -169,8 +168,6 @@ class CRM_Core_Error extends PEAR_ErrorStack { * which currently use PEAR::raiseError to notify of error messages. * * @param object $pearError PEAR_Error - * - * @return void */ public static function handle($pearError) { @@ -307,8 +304,6 @@ class CRM_Core_Error extends PEAR_ErrorStack { * The email address to notify of this situation. * * @throws Exception - * - * @return void */ public static function fatal($message = NULL, $code = NULL, $email = NULL) { $vars = array( @@ -393,8 +388,6 @@ class CRM_Core_Error extends PEAR_ErrorStack { * something that follows a cleaner separation of concerns. * * @param Exception $exception - * - * @return void */ public static function handleUnhandledException($exception) { try { @@ -858,7 +851,6 @@ class CRM_Core_Error extends PEAR_ErrorStack { * * @param null $redirect * @param string $title - * @return void */ public static function statusBounce($status, $redirect = NULL, $title = NULL) { $session = CRM_Core_Session::singleton(); diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index f39bdf09c6..a68d70e3a6 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -32,8 +32,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ require_once 'HTML/QuickForm/Page.php'; @@ -245,8 +243,6 @@ class CRM_Core_Form extends HTML_QuickForm_Page { /** * Register all the standard rules that most forms potentially use. - * - * @return void */ public function registerRules() { static $rules = array( @@ -360,24 +356,19 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * called before buildForm. Any pre-processing that * needs to be done for buildForm should be done here * - * This is a virtual function and should be redefined if needed - * - * - * @return void + * This is a virtual function and should be redefined if needed. */ public function preProcess() { } /** - * called after the form is validated. Any - * processing of form state etc should be done in this function. + * Called after the form is validated. + * + * Any processing of form state etc should be done in this function. * Typically all processing associated with a form should be done * here and relevant state should be stored in the session * * This is a virtual function and should be redefined if needed - * - * - * @return void */ public function postProcess() { } @@ -419,21 +410,16 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } /** - * This virtual function is used to build the form. It replaces the - * buildForm associated with QuickForm_Page. This allows us to put - * preProcess in front of the actual form building routine - * + * This virtual function is used to build the form. * - * @return void + * It replaces the buildForm associated with QuickForm_Page. This allows us to put + * preProcess in front of the actual form building routine */ public function buildQuickForm() { } /** - * This virtual function is used to set the default values of - * various form elements - * - * access public + * This virtual function is used to set the default values of various form elements. * * @return array|NULL * reference to the array of default values @@ -443,12 +429,10 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } /** - * This is a virtual function that adds group and global rules to - * the form. Keeping it distinct from the form to keep code small - * and localized in the form building code + * This is a virtual function that adds group and global rules to the form. * - * - * @return void + * Keeping it distinct from the form to keep code small + * and localized in the form building code */ public function addRules() { } @@ -545,8 +529,6 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * displayed. The associate array has 3 fields: 'type', 'name' and 'isDefault' * The base form class will define a bunch of static arrays for commonly used * formats. - * - * @return void */ public function addButtons($params) { $prevnext = $spacing = array(); @@ -777,8 +759,6 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * Setter function for options. * * @param mixed $options - * - * @return void */ public function setOptions($options) { $this->_options = $options; @@ -818,8 +798,6 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * Setter function for Form Action. * * @param string $action - * - * @return void */ public function setFormAction($action) { $this->_attributes['action'] = $action; @@ -906,8 +884,6 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * Error Code. * @param CRM_Core_DAO $dao * A data access object on which we perform a rollback if non - empty. - * - * @return void */ public function error($message, $code = NULL, $dao = NULL) { if ($dao) { @@ -926,8 +902,6 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * Name of the variable. * @param mixed $value * Value of the variable. - * - * @return void */ public function set($name, $value) { $this->controller->set($name, $value); @@ -959,8 +933,6 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * * @param int $action * The mode we want to set the form. - * - * @return void */ public function setAction($action) { $this->_action = $action; @@ -973,8 +945,6 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * Name of variable. * @param mixed $value * Value of variable. - * - * @return void */ public function assign($var, $value = NULL) { self::$_template->assign($var, $value); @@ -986,9 +956,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * @param string $var * Name of variable. * @param mixed $value - * Value of varaible. - * - * @return void + * Value of variable. */ public function assign_by_ref($var, &$value) { self::$_template->assign_by_ref($var, $value); @@ -1137,8 +1105,6 @@ class CRM_Core_Form extends HTML_QuickForm_Page { * Button type for the form after processing. * @param string $backType * @param bool|string $submitOnce If true, add javascript to next button submit which prevents it from being clicked more than once - * - * @return void */ public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) { $buttons = array(); diff --git a/CRM/Core/Form/Date.php b/CRM/Core/Form/Date.php index 78d4d8377e..ca241e29b6 100644 --- a/CRM/Core/Form/Date.php +++ b/CRM/Core/Form/Date.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_Form_Date { @@ -40,11 +38,10 @@ class CRM_Core_Form_Date { const DATE_yyyy_mm_dd = 1, DATE_mm_dd_yy = 2, DATE_mm_dd_yyyy = 4, DATE_Month_dd_yyyy = 8, DATE_dd_mon_yy = 16, DATE_dd_mm_yyyy = 32; /** - * build the date-format form + * Build the date-format form. * * @param CRM_Core_Form $form * The form object that we are operating on. - * */ public static function buildAllowedDateFormats(&$form) { @@ -70,8 +67,7 @@ class CRM_Core_Form_Date { /** - * retrieve the date range - relative or absolute - * and assign it to the form + * Retrieve the date range - relative or absolute and assign it to the form. * * @param CRM_Core_Form $form * The form the dates should be added to. @@ -85,7 +81,6 @@ class CRM_Core_Form_Date { * Additional value pairs to add. * @param string $dateFormat * @param bool|string $displayTime - * */ public static function buildDateRange( &$form, $fieldName, $count = 1, @@ -108,8 +103,9 @@ class CRM_Core_Form_Date { } /** - * build the date range array that will provide the form option values. - * It can be - relative or absolute + * Build the date range array that will provide the form option values. + * + * It can be - relative or absolute. * * @param CRM_Core_Form $form * The form object that we are operating on. @@ -123,6 +119,7 @@ class CRM_Core_Form_Date { * Additional Operator Selections to add. * @param string $dateFormat * @param bool $displayTime + * * @return array * Values for Selector */ @@ -214,7 +211,7 @@ class CRM_Core_Form_Date { } /** - * build the date range - relative or absolute + * Build the date range - relative or absolute. * * @param CRM_Core_Form $form * The form object that we are operating on. @@ -223,7 +220,7 @@ class CRM_Core_Form_Date { * Array of option values to add. * @param string $from * Label. - * @param string|\stringe $to + * @param string $to * @param string $fromLabel * @param bool $required * @param string $dateFormat diff --git a/CRM/Core/Form/RecurringEntity.php b/CRM/Core/Form/RecurringEntity.php index 9ac7697bb5..45a35bb0be 100644 --- a/CRM/Core/Form/RecurringEntity.php +++ b/CRM/Core/Form/RecurringEntity.php @@ -30,13 +30,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * This class generates form components for processing Entity - * + * This class generates form components for processing Entity. */ class CRM_Core_Form_RecurringEntity { /** @@ -329,9 +326,6 @@ class CRM_Core_Form_RecurringEntity { /** * Process the form submission. - * - * - * @return void */ public static function postProcess($params = array(), $type, $linkedEntities = array()) { //Check entity_id not present in params take it from class variable diff --git a/CRM/Core/Form/ShortCode.php b/CRM/Core/Form/ShortCode.php index 4772b01164..1c4a8c5aa2 100755 --- a/CRM/Core/Form/ShortCode.php +++ b/CRM/Core/Form/ShortCode.php @@ -29,13 +29,12 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * Builds a form of shortcodes that can be added to WP posts - * Use hook_civicrm_preProcess to modify this list + * Builds a form of shortcodes that can be added to WP posts. + * + * Use hook_civicrm_preProcess to modify this list. */ class CRM_Core_Form_ShortCode extends CRM_Core_Form { /** @@ -68,9 +67,7 @@ class CRM_Core_Form_ShortCode extends CRM_Core_Form { /** - * Build form data. Can be modified via hook_civicrm_preProcess - * - * @return void + * Build form data. Can be modified via hook_civicrm_preProcess. */ public function preProcess() { $config = CRM_Core_Config::singleton(); @@ -171,9 +168,7 @@ class CRM_Core_Form_ShortCode extends CRM_Core_Form { } /** - * Build form elements based on the above metadata - * - * @return void + * Build form elements based on the above metadata. */ public function buildQuickForm() { CRM_Core_Resources::singleton() diff --git a/CRM/Core/Form/Tag.php b/CRM/Core/Form/Tag.php index ecb786e8c1..ffc6e187db 100644 --- a/CRM/Core/Form/Tag.php +++ b/CRM/Core/Form/Tag.php @@ -29,13 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * This class generates form element for free tag widget - * + * This class generates form element for free tag widget. */ class CRM_Core_Form_Tag { public $_entityTagValues; @@ -57,8 +54,6 @@ class CRM_Core_Form_Tag { * True if need to add entry in entry table via ajax. * @param string $tagsetElementName * If you need to create tagsetlist with specific name. - * - * @return void */ public static function buildQuickForm( &$form, $parentNames, $entityTable, $entityId = NULL, $skipTagCreate = FALSE, @@ -131,8 +126,6 @@ class CRM_Core_Form_Tag { * Entity table. * @param CRM_Core_Form $form * Form object. - * - * @return void */ public static function postProcess(&$params, $entityId, $entityTable = 'civicrm_contact', &$form) { if ($form && !empty($form->_entityTagValues)) { diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index ff01ff3e3b..75ef9b1c45 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_I18n { @@ -420,8 +418,6 @@ class CRM_Core_I18n { * the array for localization (in place). * @param array $params * an array of additional parameters. - * - * @return void */ public function localizeArray( &$array, @@ -445,8 +441,6 @@ class CRM_Core_I18n { * * @param array $array * the array for localization (in place). - * - * @return void */ public function localizeTitles(&$array) { foreach ($array as $key => $value) { diff --git a/CRM/Core/JobManager.php b/CRM/Core/JobManager.php index ca6e22a554..c6b0335715 100644 --- a/CRM/Core/JobManager.php +++ b/CRM/Core/JobManager.php @@ -31,8 +31,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_JobManager { @@ -53,8 +51,6 @@ class CRM_Core_JobManager { /** * Class constructor. - * - * @return void */ public function __construct() { $config = CRM_Core_Config::singleton(); @@ -207,9 +203,6 @@ class CRM_Core_JobManager { /** * @param string $message - * - * @return void - * collection of permissions, null if none */ public function logEntry($message) { $domainID = CRM_Core_Config::domainID(); diff --git a/CRM/Core/Joomla.php b/CRM/Core/Joomla.php index bd4987906f..5d3330d7e4 100644 --- a/CRM/Core/Joomla.php +++ b/CRM/Core/Joomla.php @@ -29,20 +29,21 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** + * Joomla class. + * + * (clearly copied & pasted from a drupal class). * + * Still used? */ class CRM_Core_Joomla { /** - * Reuse drupal blocks into a left sidebar. Assign the generated template - * to the smarty instance + * Reuse drupal blocks into a left sidebar. * - * @return void + * Assign the generated template to the smarty instance. */ public static function sidebarLeft() { $config = CRM_Core_Config::singleton(); diff --git a/CRM/Core/OptionGroup.php b/CRM/Core/OptionGroup.php index 26a8634377..c1d39246ee 100644 --- a/CRM/Core/OptionGroup.php +++ b/CRM/Core/OptionGroup.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_OptionGroup { static $_values = array(); @@ -272,9 +270,6 @@ WHERE v.option_group_id = g.id * * * @param bool $flip - * - * @return void - * */ public static function lookupValues(&$params, &$names, $flip = FALSE) { foreach ($names as $postName => $value) { diff --git a/CRM/Core/OptionValue.php b/CRM/Core/OptionValue.php index 90e3ec4e00..06c066cb7d 100644 --- a/CRM/Core/OptionValue.php +++ b/CRM/Core/OptionValue.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_OptionValue { @@ -347,8 +345,6 @@ class CRM_Core_OptionValue { * Build select query in case of option-values * * @param $query - * - * @return void */ public static function select(&$query) { if (!empty($query->_params) || !empty($query->_returnProperties)) { diff --git a/CRM/Core/Page.php b/CRM/Core/Page.php index a05784288c..84907ee01d 100644 --- a/CRM/Core/Page.php +++ b/CRM/Core/Page.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -161,12 +159,9 @@ class CRM_Core_Page { } /** - * This function takes care of all the things common to all - * pages. This typically involves assigning the appropriate smarty - * variable :) + * This function takes care of all the things common to all pages. * - * @return void|string - * The content generated by running this page + * This typically involves assigning the appropriate smarty variables :) */ public function run() { if ($this->_embedded) { @@ -248,9 +243,6 @@ class CRM_Core_Page { * @param string|array $name name of the variable or an assoc array of name/value pairs * @param mixed $value * Value of the variable if string. - * - * - * @return void */ public function set($name, $value = NULL) { self::$_session->set($name, $value, $this->_name); @@ -272,9 +264,7 @@ class CRM_Core_Page { * * @param string $var * @param mixed $value - * Value of varaible. - * - * @return void + * Value of variable. */ public function assign($var, $value = NULL) { self::$_template->assign($var, $value); @@ -285,9 +275,7 @@ class CRM_Core_Page { * * @param string $var * @param mixed $value - * (reference) value of varaible. - * - * @return void + * (reference) value of variable. */ public function assign_by_ref($var, &$value) { self::$_template->assign_by_ref($var, $value); @@ -318,9 +306,6 @@ class CRM_Core_Page { /** * Destroy all the session state of this page. - * - * - * @return void */ public function reset() { self::$_session->resetScope($this->_name); @@ -365,8 +350,6 @@ class CRM_Core_Page { * Setter for embedded. * * @param bool $embedded - * - * @return void */ public function setEmbedded($embedded) { $this->_embedded = $embedded; @@ -386,8 +369,6 @@ class CRM_Core_Page { * Setter for print. * * @param bool $print - * - * @return void */ public function setPrint($print) { $this->_print = $print; diff --git a/CRM/Core/Page/RecurringEntityPreview.php b/CRM/Core/Page/RecurringEntityPreview.php index 28bec80439..d4254459b6 100644 --- a/CRM/Core/Page/RecurringEntityPreview.php +++ b/CRM/Core/Page/RecurringEntityPreview.php @@ -29,15 +29,11 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_Page_RecurringEntityPreview extends CRM_Core_Page { /** * Run the basic page (run essentially starts execution for that page). - * - * @return void */ public function run() { $parentEventId = $startDate = $endDate = NULL; diff --git a/CRM/Core/Payment/Form.php b/CRM/Core/Payment/Form.php index 476d266ac3..f22423092b 100644 --- a/CRM/Core/Payment/Form.php +++ b/CRM/Core/Payment/Form.php @@ -77,8 +77,6 @@ class CRM_Core_Payment_Form { * * @param CRM_Core_Form $form * @param CRM_Core_Payment $processor - * - * @return void */ static protected function setBillingAddressFields(&$form, $processor) { $billingID = $form->_bltID; diff --git a/CRM/Core/Payment/Google.php b/CRM/Core/Payment/Google.php index 7ce10fd6ac..b1837d5c05 100644 --- a/CRM/Core/Payment/Google.php +++ b/CRM/Core/Payment/Google.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ require_once 'Google/library/googlecart.php'; @@ -39,7 +37,9 @@ require_once 'Google/library/googlesubscription.php'; require_once 'Google/library/googlerequest.php'; /** - * Class CRM_Core_Payment_Google + * Class CRM_Core_Payment_Google. + * + * Possibly not functional. */ class CRM_Core_Payment_Google extends CRM_Core_Payment { @@ -101,30 +101,13 @@ class CRM_Core_Payment_Google extends CRM_Core_Payment { } } - /** - * This function collects all the information from a web/api form and invokes - * the relevant payment processor specific functions to perform the transaction - * - * @param array $params - * Assoc array of input parameters for this transaction. - * - * @return void - * the result in an nice formatted array (or an error object) - * @abstract - */ - public function doDirectPayment(&$params) { - CRM_Core_Error::fatal(ts('This function is not implemented')); - } - /** * Sets appropriate parameters for checking out to google. * * @param array $params - * Name value pair of contribution datat. - * - * @param $component + * Name value pair of contribution data. * - * @return void + * @param string $component */ public function doTransferCheckout(&$params, $component) { $component = strtolower($component); @@ -197,9 +180,7 @@ class CRM_Core_Payment_Google extends CRM_Core_Payment { * @param string $component * Event/contribution. * @param object $cart - * Object of googel cart. - * - * @return void + * Object of google cart. */ public function submitPostParams($params, $component, $cart) { $url = rtrim($this->_paymentProcessor['url_site'], '/') . '/cws/v2/Merchant/' . $this->_paymentProcessor['user_name'] . '/checkout'; diff --git a/CRM/Core/Payment/PaymentExpress.php b/CRM/Core/Payment/PaymentExpress.php index 19bd88857f..f26ddfd571 100644 --- a/CRM/Core/Payment/PaymentExpress.php +++ b/CRM/Core/Payment/PaymentExpress.php @@ -113,8 +113,6 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment { * Name value pair of contribution data. * * @param $component - * - * @return void */ public function doTransferCheckout(&$params, $component) { $component = strtolower($component); diff --git a/CRM/Core/Payment/PaymentExpressIPN.php b/CRM/Core/Payment/PaymentExpressIPN.php index cb8f274895..7525758d9f 100644 --- a/CRM/Core/Payment/PaymentExpressIPN.php +++ b/CRM/Core/Payment/PaymentExpressIPN.php @@ -108,8 +108,7 @@ class CRM_Core_Payment_PaymentExpressIPN extends CRM_Core_Payment_BaseIPN { * @param $amount * @param $transactionReference * - * @internal param \xml $dataRoot response send by google in xml format - * @return void + * @return bool */ public function newOrderNotify($success, $privateData, $component, $amount, $transactionReference) { $ids = $input = $params = array(); diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index e77ce3097a..a0b2ecc626 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -44,8 +44,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_PseudoConstant { @@ -549,11 +547,11 @@ class CRM_Core_PseudoConstant { * @param string $condition * The condition that gets passed to the final query as the WHERE clause. * - * @param null $orderby + * @param bool $orderby * @param string $key - * @param null $force + * @param bool $force * - * @return void + * @return array */ public static function populate( &$var, diff --git a/CRM/Core/QuickForm/Action/Reload.php b/CRM/Core/QuickForm/Action/Reload.php index dbf15df2b4..413e69a2a3 100644 --- a/CRM/Core/QuickForm/Action/Reload.php +++ b/CRM/Core/QuickForm/Action/Reload.php @@ -33,8 +33,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_QuickForm_Action_Reload extends CRM_Core_QuickForm_Action { @@ -58,7 +56,7 @@ class CRM_Core_QuickForm_Action_Reload extends CRM_Core_QuickForm_Action { * @param string $actionName * Current action name, as one Action object can serve multiple actions. * - * @return void + * @return object|void */ public function perform(&$page, $actionName) { // save the form values and validation status to the session diff --git a/CRM/Core/Session.php b/CRM/Core/Session.php index 3c1cf6dca6..dfb0f219e7 100644 --- a/CRM/Core/Session.php +++ b/CRM/Core/Session.php @@ -25,11 +25,8 @@ +--------------------------------------------------------------------+ */ - -require_once "PEAR.php"; - /** - * Class CRM_Core_Session + * Class CRM_Core_Session. */ class CRM_Core_Session { @@ -101,14 +98,12 @@ class CRM_Core_Session { } /** - * Creates an array in the session. All variables now will be stored - * under this array + * Creates an array in the session. + * + * All variables now will be stored under this array. * * @param bool $isRead * Is this a read operation, in this case, the session will not be touched. - * - * - * @return void */ public function initialize($isRead = FALSE) { // lets initialize the _session variable just before we need it @@ -144,16 +139,12 @@ class CRM_Core_Session { ) { $this->_session[$this->_key] = array(); } - return NULL; } /** * Resets the session store. * - * * @param int $all - * - * @return void */ public function reset($all = 1) { if ($all != 1) { @@ -167,7 +158,6 @@ class CRM_Core_Session { $this->_session = array(); } - return NULL; } /** @@ -177,9 +167,6 @@ class CRM_Core_Session { * Local scope name. * @param bool $isRead * Is this a read operation, in this case, the session will not be touched. - * - * - * @return void */ public function createScope($prefix, $isRead = FALSE) { $this->initialize($isRead); @@ -198,8 +185,6 @@ class CRM_Core_Session { * * @param string $prefix * Local scope name. - * - * @return void */ public function resetScope($prefix) { $this->initialize(); @@ -228,8 +213,6 @@ class CRM_Core_Session { * Value of the variable. * @param string $prefix * A string to prefix the keys in the session with. - * - * @return void */ public function set($name, $value = NULL, $prefix = NULL) { // create session scope @@ -288,16 +271,12 @@ class CRM_Core_Session { } /** - * Gets all the variables in the current session scope - * and stuffs them in an associate array - * + * Gets all the variables in the current session scope and stuffs them in an associate array. * * @param array $vars * Associative array to store name/value pairs. * @param string $prefix * Will be stripped from the key before putting it in the return. - * - * @return void */ public function getVars(&$vars, $prefix = '') { // create session scope @@ -318,7 +297,10 @@ class CRM_Core_Session { } /** - * Set and check a timer. If it's expired, it will be set again. + * Set and check a timer. + * + * If it's expired, it will be set again. + * * Good for showing a message to the user every hour or day (so not bugging them on every page) * Returns true-ish values if the timer is not set or expired, and false if the timer is still running * If you want to get more nuanced, you can check the type of the return to see if it's 'not set' or actually expired at a certain time @@ -347,8 +329,6 @@ class CRM_Core_Session { * The url to return to when done. * @param bool $check * Should we do a dupe checking with the top element. - * - * @return void */ public function pushUserContext($userContext, $check = TRUE) { if (empty($userContext)) { @@ -384,8 +364,6 @@ class CRM_Core_Session { * * @param string $userContext * The url to return to when done. - * - * @return void */ public function replaceUserContext($userContext) { if (empty($userContext)) { @@ -426,6 +404,7 @@ class CRM_Core_Session { /** * Dumps the session to the log. + * * @param int $all */ public function debug($all = 1) { @@ -462,7 +441,7 @@ class CRM_Core_Session { } /** - * Stores an alert to be displayed to the user via crm-messages + * Stores an alert to be displayed to the user via crm-messages. * * @param string $text * The status message @@ -486,9 +465,6 @@ class CRM_Core_Session { * set to 0 for no expiration * defaults to 10 seconds for most messages, 5 if it has a title but no body, * or 0 for errors or messages containing links - * - * - * @return void */ public static function setStatus($text, $title = '', $type = 'alert', $options = array()) { // make sure session is initialized, CRM-8120 @@ -520,6 +496,8 @@ class CRM_Core_Session { } /** + * Register and retrieve session objects. + * * @param string|array $names */ public static function registerAndRetrieveSessionObjects($names) { @@ -538,6 +516,8 @@ class CRM_Core_Session { } /** + * Store session objects. + * * @param bool $reset */ public static function storeSessionObjects($reset = TRUE) { @@ -554,6 +534,7 @@ class CRM_Core_Session { /** * Retrieve contact id of the logged in user. + * * @return int|NULL * contact ID of logged in user */ @@ -566,12 +547,13 @@ class CRM_Core_Session { } /** + * Check if session is empty. + * + * if so we don't cache stuff that we can get away with, helps proxies like varnish. + * * @return bool */ public function isEmpty() { - // check if session is empty, if so we don't cache - // stuff that we can get away with - // helps proxies like varnish return empty($_SESSION); } diff --git a/CRM/Core/ShowHideBlocks.php b/CRM/Core/ShowHideBlocks.php index 8a0a426638..e1a14a4682 100644 --- a/CRM/Core/ShowHideBlocks.php +++ b/CRM/Core/ShowHideBlocks.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_ShowHideBlocks { @@ -83,8 +81,6 @@ class CRM_Core_ShowHideBlocks { /** * Load icon vars used in hide and show links. - * - * @return void */ public static function setIcons() { if (!isset(self::$_showIcon)) { @@ -96,8 +92,6 @@ class CRM_Core_ShowHideBlocks { /** * Add the values from this class to the template. - * - * @return void */ public function addToTemplate() { $hide = $show = ''; @@ -130,8 +124,6 @@ class CRM_Core_ShowHideBlocks { * * @param string $name * Id to be added. - * - * @return void */ public function addShow($name) { $this->_show[$name] = 1; @@ -145,8 +137,6 @@ class CRM_Core_ShowHideBlocks { * * @param string $name * Id to be added. - * - * @return void */ public function addHide($name) { $this->_hide[$name] = 1; @@ -185,8 +175,7 @@ class CRM_Core_ShowHideBlocks { * * @param bool $assign * - * - * @return void + * @return array */ public static function links(&$form, $prefix, $showLinkText, $hideLinkText, $assign = TRUE) { $showCode = "cj('#id_{$prefix}').show(); cj('#id_{$prefix}_show').hide();"; @@ -224,8 +213,6 @@ class CRM_Core_ShowHideBlocks { * The set the class. * @param string $hideLink * The hide block string. - * - * @return void */ public function linksForArray(&$form, $index, $maxIndex, $prefix, $showLinkText, $hideLinkText, $elementType = NULL, $hideLink = NULL) { $showHidePrefix = str_replace(array("]", "["), array("", "_"), $prefix); diff --git a/CRM/Core/State.php b/CRM/Core/State.php index 7d02f260cd..0b385e3ffb 100644 --- a/CRM/Core/State.php +++ b/CRM/Core/State.php @@ -33,8 +33,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_Core_State { @@ -154,20 +152,14 @@ class CRM_Core_State { } /** - * Mark this page as valid for the QFC framework. This is needed as - * we build more advanced functionality into the StateMachine - * - * @return void + * Mark this page as valid for the QFC framework. */ public function validate(&$data) { $data['valid'][$this->_name] = TRUE; } /** - * Mark this page as invalid for the QFC framework. This is needed as - * we build more advanced functionality into the StateMachine - * - * @return void + * Mark this page as invalid for the QFC framework. */ public function invalidate(&$data) { $data['valid'][$this->_name] = NULL; @@ -184,8 +176,6 @@ class CRM_Core_State { /** * Setter for name. - * - * @return void */ public function setName($name) { $this->_name = $name; diff --git a/CRM/Core/StateMachine.php b/CRM/Core/StateMachine.php index a1fa72881a..73850cf078 100644 --- a/CRM/Core/StateMachine.php +++ b/CRM/Core/StateMachine.php @@ -29,17 +29,15 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * Core StateMachine. All statemachines subclass for the core one - * for functionality specific to their needs. + * Core StateMachine. * - * A statemachine keeps track of different states and forms for a - * html quickform controller. + * All state machines subclass for the core one for functionality specific to their needs. * + * A state machine keeps track of different states and forms for a + * html quickform controller. */ class CRM_Core_StateMachine { @@ -112,8 +110,6 @@ class CRM_Core_StateMachine { * Setter for name. * * @param string $name - * - * @return void */ public function setName($name) { $this->_name = $name; @@ -133,7 +129,7 @@ class CRM_Core_StateMachine { * @param string $type * The type of transition being requested (Next or Back). * - * @return void + * @return object */ public function perform(&$page, $actionName, $type = 'Next') { // save the form values and validation status to the session @@ -183,8 +179,6 @@ class CRM_Core_StateMachine { * The previous page if any. * @param object $next * The next page if any. - * - * @return void */ public function addState($name, $type, $prev, $next) { $this->_states[$name] = new CRM_Core_State($name, $type, $prev, $next, $this); @@ -318,8 +312,6 @@ class CRM_Core_StateMachine { /** * Reset the state machine. - * - * @return void */ public function reset() { $this->_controller->reset(); @@ -339,8 +331,6 @@ class CRM_Core_StateMachine { * * @param string $content * The content generated by this state machine. - * - * @return void */ public function setContent(&$content) { $this->_controller->setContent($content); diff --git a/CRM/Cxn/BAO/Cxn.php b/CRM/Cxn/BAO/Cxn.php index f0605215ae..b8f4415080 100644 --- a/CRM/Cxn/BAO/Cxn.php +++ b/CRM/Cxn/BAO/Cxn.php @@ -32,8 +32,6 @@ use Civi\Cxn\Rpc\DefaultCertificateValidator; * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** -- 2.25.1