From 3940468019e3387cc4fcedb6a2c817149f7a0d27 Mon Sep 17 00:00:00 2001 From: Saurabh Batra Date: Fri, 23 Oct 2015 22:03:15 +0530 Subject: [PATCH] Minor comment-fixes for CRM/SMS directory. --- CRM/SMS/BAO/Provider.php | 4 ---- CRM/SMS/Controller/Send.php | 2 -- CRM/SMS/Form/Group.php | 20 +++++--------------- CRM/SMS/Form/Provider.php | 1 - CRM/SMS/Form/Schedule.php | 21 +-------------------- CRM/SMS/Form/Upload.php | 22 +++++++++++----------- CRM/SMS/Page/Callback.php | 2 -- CRM/SMS/Page/Provider.php | 6 ------ CRM/SMS/Provider.php | 2 -- CRM/SMS/StateMachine/Send.php | 3 --- 10 files changed, 17 insertions(+), 66 deletions(-) diff --git a/CRM/SMS/BAO/Provider.php b/CRM/SMS/BAO/Provider.php index 7d664ceaa6..65711742c5 100644 --- a/CRM/SMS/BAO/Provider.php +++ b/CRM/SMS/BAO/Provider.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id: $ - * */ class CRM_SMS_BAO_Provider extends CRM_SMS_DAO_Provider { @@ -39,8 +37,6 @@ class CRM_SMS_BAO_Provider extends CRM_SMS_DAO_Provider { * * @return \CRM_SMS_DAO_Provider */ - /** - */ public function __construct() { parent::__construct(); } diff --git a/CRM/SMS/Controller/Send.php b/CRM/SMS/Controller/Send.php index dbbda9f19d..a168bef265 100644 --- a/CRM/SMS/Controller/Send.php +++ b/CRM/SMS/Controller/Send.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_SMS_Controller_Send extends CRM_Core_Controller { diff --git a/CRM/SMS/Form/Group.php b/CRM/SMS/Form/Group.php index e314d21cd4..064848ece8 100644 --- a/CRM/SMS/Form/Group.php +++ b/CRM/SMS/Form/Group.php @@ -29,20 +29,15 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** - * Choose include / exclude groups and mass sms - * + * Choose include / exclude groups and mass sms. */ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { /** * Set variables up before form is built. - * - * @return void */ public function preProcess() { if (!CRM_SMS_BAO_Provider::activeProviderCount()) { @@ -55,10 +50,7 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { /** * Set default values for the form. - * the default values are retrieved from the database - * - * - * @return void + * The default values are retrieved from the database. */ public function setDefaultValues() { $mailingID = CRM_Utils_Request::retrieve('mid', 'Integer', $this, FALSE, NULL); @@ -102,12 +94,10 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { /** * Build the form object. - * - * @return void */ public function buildQuickForm() { - //get the context + // Get the context. $context = $this->get('context'); $this->assign('context', $context); @@ -117,10 +107,10 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { TRUE ); - //get the mailing groups. + // Get the mailing groups. $groups = CRM_Core_PseudoConstant::nestedGroup('Mailing'); - //get the sms mailing list + // Get the sms mailing list. $mailings = CRM_Mailing_PseudoConstant::completed('sms'); if (!$mailings) { $mailings = array(); diff --git a/CRM/SMS/Form/Provider.php b/CRM/SMS/Form/Provider.php index e1979c97cd..ff1501a3ea 100644 --- a/CRM/SMS/Form/Provider.php +++ b/CRM/SMS/Form/Provider.php @@ -29,7 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id: $ */ /** diff --git a/CRM/SMS/Form/Schedule.php b/CRM/SMS/Form/Schedule.php index d10079637b..1e7ecc7229 100644 --- a/CRM/SMS/Form/Schedule.php +++ b/CRM/SMS/Form/Schedule.php @@ -29,19 +29,11 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * - */ - -/** - * */ class CRM_SMS_Form_Schedule extends CRM_Core_Form { /** * Set variables up before form is built. - * - * @return void */ public function preProcess() { @@ -54,9 +46,6 @@ class CRM_SMS_Form_Schedule extends CRM_Core_Form { /** * Set default values for the form. - * - * - * @return void */ public function setDefaultValues() { $defaults = array(); @@ -70,10 +59,6 @@ class CRM_SMS_Form_Schedule extends CRM_Core_Form { /** * Build the form object for the last step of the sms wizard. - * - * @param - * - * @return void */ public function buildQuickform() { $this->addDateTime('start_date', ts('Schedule SMS'), FALSE, array('formatType' => 'mailing')); @@ -149,10 +134,6 @@ class CRM_SMS_Form_Schedule extends CRM_Core_Form { /** * Process the posted form values. Create and schedule a Mass SMS. - * - * @param - * - * @return void */ public function postProcess() { $params = array(); @@ -193,7 +174,7 @@ class CRM_SMS_Form_Schedule extends CRM_Core_Form { $params['scheduled_date'] = CRM_Utils_Date::processDate($params['start_date'] . ' ' . $params['start_date_time']); } - /* Build the mailing object */ + // Build the mailing object. CRM_Mailing_BAO_Mailing::create($params, $ids); $session = CRM_Core_Session::singleton(); diff --git a/CRM/SMS/Form/Upload.php b/CRM/SMS/Form/Upload.php index d2c471f844..4600431e91 100644 --- a/CRM/SMS/Form/Upload.php +++ b/CRM/SMS/Form/Upload.php @@ -50,7 +50,7 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { public function setDefaultValues() { $mailingID = CRM_Utils_Request::retrieve('mid', 'Integer', $this, FALSE, NULL); - //need to differentiate new/reuse mailing, CRM-2873 + // Need to differentiate new/reuse mailing, CRM-2873. $reuseMailing = FALSE; if ($mailingID) { $reuseMailing = TRUE; @@ -72,8 +72,8 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { $dao->find(TRUE); $dao->storeValues($dao, $defaults); - //we don't want to retrieve template details once it is - //set in session + // We don't want to retrieve template details once it is + // set in session. $templateId = $this->get('template'); $this->assign('templateSelected', $templateId ? $templateId : 0); if (isset($defaults['msg_template_id']) && !$templateId) { @@ -94,7 +94,7 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { } } - //fix for CRM-2873 + // Fix for CRM-2873. if (!$reuseMailing) { $textFilePath = $this->get('textFilePath'); if ($textFilePath && @@ -227,7 +227,7 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { 'SMSsaveTemplateName', ); $msgTemplate = NULL; - //mail template is composed + // Mail template is composed. if ($formValues['upload_type']) { $composeParams = array(); foreach ($composeFields as $key) { @@ -272,13 +272,13 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { $ids['mailing_id'] = $this->_mailingID; - //get the from email address + // Get the from email address. $params['sms_provider_id'] = $formValues['sms_provider_id']; - //get the from Name + // Get the from Name. $params['from_name'] = CRM_Core_DAO::getFieldValue('CRM_SMS_DAO_Provider', $params['sms_provider_id'], 'username'); - //Build SMS in mailing table + // Build SMS in mailing table. CRM_Mailing_BAO_Mailing::create($params, $ids); } @@ -315,7 +315,7 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { require_once 'api/api.php'; $contact = civicrm_api('contact', 'get', $values); - //CRM-4524 + // CRM-4524. $contact = reset($contact['values']); $verp = array_flip(array('optOut', 'reply', 'unsubscribe', 'resubscribe', 'owner')); @@ -369,8 +369,8 @@ class CRM_SMS_Form_Upload extends CRM_Core_Form { $dataErrors = array(); - /* Do a full token replacement on a dummy verp, the current - * contact and domain, and the first organization. */ + // Do a full token replacement on a dummy verp, the current + // contact and domain, and the first organization. // here we make a dummy mailing object so that we // can retrieve the tokens that we need to replace diff --git a/CRM/SMS/Page/Callback.php b/CRM/SMS/Page/Callback.php index c9ebaffee5..183a6c9ac8 100644 --- a/CRM/SMS/Page/Callback.php +++ b/CRM/SMS/Page/Callback.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ class CRM_SMS_Page_Callback { diff --git a/CRM/SMS/Page/Provider.php b/CRM/SMS/Page/Provider.php index 2e5ce2ed50..6b56614115 100644 --- a/CRM/SMS/Page/Provider.php +++ b/CRM/SMS/Page/Provider.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** @@ -99,8 +97,6 @@ class CRM_SMS_Page_Provider extends CRM_Core_Page_Basic { * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. - * - * @return void */ public function run() { // set title and breadcrumb @@ -129,8 +125,6 @@ class CRM_SMS_Page_Provider extends CRM_Core_Page_Basic { * Browse all Providers. * * @param array $action - * - * @return void */ public function browse($action = NULL) { $providers = CRM_SMS_BAO_Provider::getProviders(); diff --git a/CRM/SMS/Provider.php b/CRM/SMS/Provider.php index 1b73fc7f09..fa73ff52b4 100644 --- a/CRM/SMS/Provider.php +++ b/CRM/SMS/Provider.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ abstract class CRM_SMS_Provider { diff --git a/CRM/SMS/StateMachine/Send.php b/CRM/SMS/StateMachine/Send.php index dbc4794851..fb0e20c5b0 100644 --- a/CRM/SMS/StateMachine/Send.php +++ b/CRM/SMS/StateMachine/Send.php @@ -29,13 +29,10 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2015 - * $Id$ - * */ /** * State machine for managing different states of the Import process. - * */ class CRM_SMS_StateMachine_Send extends CRM_Core_StateMachine { -- 2.25.1