From ee0ce2ef76f15232995a39839b783c992afd0612 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 15 Jan 2015 17:13:28 +1300 Subject: [PATCH] Code tidy ups --- CRM/Activity/BAO/Activity.php | 7 +++---- CRM/Admin/Form/Setting.php | 9 ++------- CRM/Contact/Form/Edit/Phone.php | 4 +--- CRM/Contact/Form/RelatedContact.php | 4 +--- CRM/Contact/Form/Task.php | 7 +++---- CRM/Contact/Selector/Custom.php | 3 +-- CRM/Contribute/Controller/ContributionPage.php | 14 ++++++-------- CRM/Core/Controller/Simple.php | 2 +- CRM/SMS/Form/Provider.php | 5 +---- 9 files changed, 19 insertions(+), 36 deletions(-) diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index 50e65192e3..0730ca850c 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -33,8 +33,7 @@ */ /** - * This class is for activity functions - * + * This class is for activity functions.s */ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { @@ -2126,11 +2125,11 @@ AND cl.modified_id = c.id } /** - * Restore the activity + * Restore the activity. * * @param array $params * - * @return void + * @return CRM_Activity_DAO_Activity */ public static function restoreActivity(&$params) { $activity = new CRM_Activity_DAO_Activity(); diff --git a/CRM/Admin/Form/Setting.php b/CRM/Admin/Form/Setting.php index 0740797e8a..cafc645b66 100644 --- a/CRM/Admin/Form/Setting.php +++ b/CRM/Admin/Form/Setting.php @@ -43,10 +43,8 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { /** * Set default values for the form. - * default values are retrieved from the database * - * - * @return void + * Default values are retrieved from the database. */ public function setDefaultValues() { if (!$this->_defaults) { @@ -168,10 +166,7 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { } /** - * Process the form submission - * - * - * @return void + * Process the form submission. */ public function postProcess() { // store the submitted values in an array diff --git a/CRM/Contact/Form/Edit/Phone.php b/CRM/Contact/Form/Edit/Phone.php index b48758e50d..28b44f071d 100644 --- a/CRM/Contact/Form/Edit/Phone.php +++ b/CRM/Contact/Form/Edit/Phone.php @@ -38,7 +38,7 @@ class CRM_Contact_Form_Edit_Phone { /** - * Build the form object elements for a phone object + * Build the form object elements for a phone object. * * @param CRM_Core_Form $form * Reference to the form object. @@ -46,8 +46,6 @@ class CRM_Contact_Form_Edit_Phone { * Block number to build. * @param bool $blockEdit * Is it block edit. - * - * @return void */ public static function buildQuickForm(&$form, $addressBlockCount = NULL, $blockEdit = FALSE) { // passing this via the session is AWFUL. we need to fix this diff --git a/CRM/Contact/Form/RelatedContact.php b/CRM/Contact/Form/RelatedContact.php index 487da255cb..6885bcc14b 100644 --- a/CRM/Contact/Form/RelatedContact.php +++ b/CRM/Contact/Form/RelatedContact.php @@ -111,9 +111,7 @@ class CRM_Contact_Form_RelatedContact extends CRM_Core_Form { } /** - * Build the form object - * - * @return void + * Build the form object. */ public function buildQuickForm() { $params = array(); diff --git a/CRM/Contact/Form/Task.php b/CRM/Contact/Form/Task.php index e9ca3c6cac..a7f572badf 100644 --- a/CRM/Contact/Form/Task.php +++ b/CRM/Contact/Form/Task.php @@ -34,7 +34,6 @@ /** * This class generates form components for search-result tasks - * */ class CRM_Contact_Form_Task extends CRM_Core_Form { @@ -323,9 +322,9 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { /** - * Set default values for the form. Relationship that in edit/view action - * the default values are retrieved from the database + * Set default values for the form. Relationship that in edit/view action. * + * The default values are retrieved from the database. * * @return array */ @@ -348,7 +347,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { } /** - * Process the form after the input has been submitted and validated + * Process the form after the input has been submitted and validated. */ public function postProcess() { } diff --git a/CRM/Contact/Selector/Custom.php b/CRM/Contact/Selector/Custom.php index 4e8eed51e4..5445b08d25 100644 --- a/CRM/Contact/Selector/Custom.php +++ b/CRM/Contact/Selector/Custom.php @@ -36,7 +36,6 @@ * This class is used to retrieve and display a range of * contacts that match the given criteria (specifically for * results of advanced search options. - * */ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { @@ -250,7 +249,7 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { /** * Returns total number of rows for the query. * - * @param + * @param null $action * * @return int * Total number of rows diff --git a/CRM/Contribute/Controller/ContributionPage.php b/CRM/Contribute/Controller/ContributionPage.php index 12d8b8d15a..d932236553 100644 --- a/CRM/Contribute/Controller/ContributionPage.php +++ b/CRM/Contribute/Controller/ContributionPage.php @@ -41,24 +41,22 @@ * Typically the first form will display the search criteria and it's results * * The second form is used to process search results with the asscociated actions - * */ class CRM_Contribute_Controller_ContributionPage extends CRM_Core_Controller { /** - * Class constructor + * Class constructor. + * + * @param string $title + * @param bool|int $action + * @param bool $modal */ public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) { parent::__construct($title, $modal); - - $this->_stateMachine = new CRM_Contribute_StateMachine_ContributionPage($this, $action); - - // create and instantiate the pages + // Create and instantiate the pages. $this->addPages($this->_stateMachine, $action); - - // add all the actions $this->addActions(); } } diff --git a/CRM/Core/Controller/Simple.php b/CRM/Core/Controller/Simple.php index 7606058132..0f03b56030 100644 --- a/CRM/Core/Controller/Simple.php +++ b/CRM/Core/Controller/Simple.php @@ -38,7 +38,7 @@ class CRM_Core_Controller_Simple extends CRM_Core_Controller { /** - * Constructor + * Constructor. * * @param null $path * @param bool $title diff --git a/CRM/SMS/Form/Provider.php b/CRM/SMS/Form/Provider.php index e3d1910624..86df3cec8a 100644 --- a/CRM/SMS/Form/Provider.php +++ b/CRM/SMS/Form/Provider.php @@ -165,10 +165,7 @@ class CRM_SMS_Form_Provider extends CRM_Core_Form { } /** - * Process the form submission - * - * - * @return void + * Process the form submission. */ public function postProcess() { -- 2.25.1