From 2b4bc76043d8f054bbaf4ec7b40af653929244c4 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Mon, 26 Oct 2015 18:36:34 +1300 Subject: [PATCH] Comments fixes --- CRM/Contact/BAO/Group.php | 2 -- CRM/Contact/Import/Form/DataSource.php | 6 +----- CRM/Contact/Import/Form/MapField.php | 5 +++-- CRM/Core/BAO/Mapping.php | 2 +- CRM/Import/Form/DataSource.php | 17 ++++++----------- CRM/Import/Form/MapField.php | 8 +++----- CRM/Import/Form/Preview.php | 9 +++------ CRM/Import/Form/Summary.php | 9 +++------ CRM/Import/Parser.php | 12 +++++++----- CRM/Import/StateMachine.php | 2 -- CRM/Utils/ReCAPTCHA.php | 4 ---- 11 files changed, 27 insertions(+), 49 deletions(-) diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index 1cf5d77dad..e8356829f5 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -58,8 +58,6 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group { CRM_Core_DAO::storeValues($group, $defaults); return $group; } - - return NULL; } /** diff --git a/CRM/Contact/Import/Form/DataSource.php b/CRM/Contact/Import/Form/DataSource.php index 65c8cab55f..007b8a3323 100644 --- a/CRM/Contact/Import/Form/DataSource.php +++ b/CRM/Contact/Import/Form/DataSource.php @@ -226,17 +226,13 @@ class CRM_Contact_Import_Form_DataSource extends CRM_Core_Form { } /** - * This virtual function is used to set the default values of - * various form elements + * Set the default values of various form elements. * * access public * * @return array * reference to the array of default values */ - /** - * @return array - */ public function setDefaultValues() { $config = CRM_Core_Config::singleton(); $defaults = array( diff --git a/CRM/Contact/Import/Form/MapField.php b/CRM/Contact/Import/Form/MapField.php index 2b14e69d42..0265d5cce8 100644 --- a/CRM/Contact/Import/Form/MapField.php +++ b/CRM/Contact/Import/Form/MapField.php @@ -58,10 +58,11 @@ class CRM_Contact_Import_Form_MapField extends CRM_Import_Form_MapField { /** * Attempt to match header labels with our mapper fields. + * * FIXME: This is essentially the same function as parent::defaultFromHeader * - * @param $columnName name of column header - * @param $patterns pattern to match for the column + * @param string $columnName name of column header + * @param array $patterns pattern to match for the column * * @return string */ diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index ba5e33dd5c..acbefd978b 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -212,7 +212,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { } /** - * Function returns associated array of elements, that will be passed for search + * Function returns associated array of elements, that will be passed for search. * * @param int $smartGroupId * Smart group id. diff --git a/CRM/Import/Form/DataSource.php b/CRM/Import/Form/DataSource.php index 616d6d4d40..6bb5bb125a 100644 --- a/CRM/Import/Form/DataSource.php +++ b/CRM/Import/Form/DataSource.php @@ -26,22 +26,17 @@ */ /** - * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * Base class for upload-only import forms (all but Contact import) + * Base class for upload-only import forms (all but Contact import). */ abstract class CRM_Import_Form_DataSource extends CRM_Core_Form { /** * Set variables up before form is built. - * - * @return void */ public function preProcess() { $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE); @@ -57,8 +52,6 @@ abstract class CRM_Import_Form_DataSource extends CRM_Core_Form { /** * Common form elements. - * - * @return void */ public function buildQuickForm() { $config = CRM_Core_Config::singleton(); @@ -114,7 +107,7 @@ abstract class CRM_Import_Form_DataSource extends CRM_Core_Form { } /** - * A long-winded way to add one radio element to the form + * A long-winded way to add one radio element to the form. */ protected function addContactTypeSelector() { //contact types option @@ -145,6 +138,8 @@ abstract class CRM_Import_Form_DataSource extends CRM_Core_Form { } /** + * Store form values. + * * @param array $names */ protected function storeFormValues($names) { @@ -154,7 +149,7 @@ abstract class CRM_Import_Form_DataSource extends CRM_Core_Form { } /** - * Common form postProcess + * Common form postProcess. * * @param string $parserClassName */ @@ -186,7 +181,7 @@ abstract class CRM_Import_Form_DataSource extends CRM_Core_Form { } /** - * Return a descriptive name for the page, used in wizard header + * Return a descriptive name for the page, used in wizard header. * * @return string */ diff --git a/CRM/Import/Form/MapField.php b/CRM/Import/Form/MapField.php index 452f4dfbd9..0d7f99d754 100644 --- a/CRM/Import/Form/MapField.php +++ b/CRM/Import/Form/MapField.php @@ -26,15 +26,13 @@ */ /** - * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * This class gets the name of the file to upload + * This class gets the name of the file to upload. + * * TODO: CRM-11254 - There's still a lot of duplicate code in the 5 child classes that should be moved here */ abstract class CRM_Import_Form_MapField extends CRM_Core_Form { @@ -83,7 +81,7 @@ abstract class CRM_Import_Form_MapField extends CRM_Core_Form { protected $_fieldUsed; /** - * Return a descriptive name for the page, used in wizard header + * Return a descriptive name for the page, used in wizard header. * * @return string */ diff --git a/CRM/Import/Form/Preview.php b/CRM/Import/Form/Preview.php index 80ce4473cd..fab8a99ea8 100644 --- a/CRM/Import/Form/Preview.php +++ b/CRM/Import/Form/Preview.php @@ -29,18 +29,17 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * This class previews the uploaded file and returns summary statistics + * This class previews the uploaded file and returns summary statistics. + * * TODO: CRM-11254 - if preProcess and postProcess functions can be reconciled between the 5 child classes, * those classes can be removed entirely and this class will not need to be abstract */ abstract class CRM_Import_Form_Preview extends CRM_Core_Form { /** - * Return a descriptive name for the page, used in wizard header + * Return a descriptive name for the page, used in wizard header. * * @return string */ @@ -50,8 +49,6 @@ abstract class CRM_Import_Form_Preview extends CRM_Core_Form { /** * Build the form object. - * - * @return void */ public function buildQuickForm() { diff --git a/CRM/Import/Form/Summary.php b/CRM/Import/Form/Summary.php index 2d60ae4732..c8a564085a 100644 --- a/CRM/Import/Form/Summary.php +++ b/CRM/Import/Form/Summary.php @@ -29,12 +29,11 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * This class summarizes the import results + * This class summarizes the import results. + * * TODO: CRM-11254 - if preProcess and postProcess functions can be reconciled between the 5 child classes, * those classes can be removed entirely and this class will not need to be abstract */ @@ -42,8 +41,6 @@ abstract class CRM_Import_Form_Summary extends CRM_Core_Form { /** * Build the form object. - * - * @return void */ public function buildQuickForm() { $this->addButtons(array( @@ -57,7 +54,7 @@ abstract class CRM_Import_Form_Summary extends CRM_Core_Form { } /** - * Return a descriptive name for the page, used in wizard header + * Return a descriptive name for the page, used in wizard header. * * @return string */ diff --git a/CRM/Import/Parser.php b/CRM/Import/Parser.php index d29bc12160..d0946b2665 100644 --- a/CRM/Import/Parser.php +++ b/CRM/Import/Parser.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ abstract class CRM_Import_Parser { /** @@ -208,14 +206,18 @@ abstract class CRM_Import_Parser { abstract protected function fini(); /** - * @param $values + * Map field. + * + * @param array $values * * @return mixed */ abstract protected function mapField(&$values); /** - * @param $values + * Preview. + * + * @param array $values * * @return mixed */ @@ -339,7 +341,7 @@ abstract class CRM_Import_Parser { } /** - * Remove single-quote enclosures from a value array (row) + * Remove single-quote enclosures from a value array (row). * * @param array $values * @param string $enclosure diff --git a/CRM/Import/StateMachine.php b/CRM/Import/StateMachine.php index d86386caf1..a418e10af3 100644 --- a/CRM/Import/StateMachine.php +++ b/CRM/Import/StateMachine.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** diff --git a/CRM/Utils/ReCAPTCHA.php b/CRM/Utils/ReCAPTCHA.php index 00bc33e605..ea6f66d309 100644 --- a/CRM/Utils/ReCAPTCHA.php +++ b/CRM/Utils/ReCAPTCHA.php @@ -62,10 +62,6 @@ class CRM_Utils_ReCAPTCHA { return self::$_singleton; } - public function __construct() { - // Empty function? - } - /** * Add element to form. * -- 2.25.1