style fixes based upon updated phpcs Drupal standard
[civicrm-core.git] / CRM / SMS / Form / Group.php
index a919964f157646aeed0f4cf85086dbc842a17986..acb5d76be8e77bade84069b23bd1076d9a2d0937 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2015
  */
 
 /**
- * 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
+   * Set variables up before form is built.
    */
   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);
@@ -101,13 +93,11 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
   }
 
   /**
-   * Build the form object
-   *
-   * @return void
+   * Build the form object.
    */
   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();
@@ -190,10 +180,10 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
     $groups = array();
 
     foreach (array(
-               'name',
-               'group_id',
-               'is_sms'
-             ) as $n) {
+      'name',
+      'group_id',
+      'is_sms',
+    ) as $n) {
       if (!empty($values[$n])) {
         $params[$n] = $values[$n];
       }
@@ -252,9 +242,9 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
 
       // delete previous includes/excludes, if mailing already existed
       foreach (array(
-                 'groups',
-                 'mailings'
-               ) as $entity) {
+        'groups',
+        'mailings',
+      ) as $entity) {
         $mg = new CRM_Mailing_DAO_MailingGroup();
         $mg->mailing_id = $ids['mailing_id'];
         $mg->entity_table = ($entity == 'groups') ? $groupTableName : $mailingTableName;
@@ -278,8 +268,6 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
     // also compute the recipients and store them in the mailing recipients table
     CRM_Mailing_BAO_Mailing::getRecipients($mailing->id,
       $mailing->id,
-      NULL,
-      NULL,
       TRUE,
       FALSE,
       'sms'
@@ -300,7 +288,7 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
   }
 
   /**
-   * Display Name of the form
+   * Display Name of the form.
    *
    *
    * @return string
@@ -310,14 +298,13 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
   }
 
   /**
-   * Global validation rules for the form
+   * Global validation rules for the form.
    *
    * @param array $fields
    *   Posted values of the form.
    *
    * @return array
    *   list of errors to be posted back to the form
-   * @static
    */
   public static function formRule($fields) {
     $errors = array();
@@ -347,4 +334,5 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
 
     return empty($errors) ? TRUE : $errors;
   }
+
 }