INFRA-132 add full stops
[civicrm-core.git] / CRM / Event / Form / Registration / AdditionalParticipant.php
index e69ae49be0e7c77dbf8966e2453b2af9131a3d1b..3fba72207879493330fa090f6bc5c5d722f323a9 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -41,7 +41,7 @@
 class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_Registration {
 
   /**
-   * The defaults involved in this page
+   * The defaults involved in this page.
    */
   public $_defaults = array();
 
@@ -51,7 +51,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
   public $additionalParticipantId = NULL;
 
   /**
-   * Set variables up before form is built
+   * Set variables up before form is built.
    *
    * @return void
    */
@@ -160,7 +160,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
   }
 
   /**
-   * Build the form object
+   * Build the form object.
    *
    * @return void
    */
@@ -178,7 +178,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
     $pre = $post = array();
     foreach (array(
                'pre',
-               'post'
+               'post',
              ) as $keys) {
       if (isset($this->_values['additional_custom_' . $keys . '_id'])) {
         $this->buildCustom($this->_values['additional_custom_' . $keys . '_id'], 'additionalCustom' . ucfirst($keys), TRUE);
@@ -186,7 +186,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
       }
       foreach (array(
                  'first_name',
-                 'last_name'
+                 'last_name',
                ) as $name) {
         if (array_key_exists($name, $$keys) &&
           CRM_Utils_Array::value('is_required', CRM_Utils_Array::value($name, $$keys))
@@ -258,20 +258,20 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
           if ($this->_requireApproval) {
             $statusMessage = ts("It looks like you are now registering a group of %1 participants. The event has %2 available spaces (you will not be wait listed). Registration for this event requires approval. You will receive an email once your registration has been reviewed.", array(
                 1 => ++$processedCnt,
-                2 => $spaces
+                2 => $spaces,
               ));
           }
           else {
             $statusMessage = ts("It looks like you are now registering a group of %1 participants. The event has %2 available spaces (you will not be wait listed).", array(
                 1 => ++$processedCnt,
-                2 => $spaces
+                2 => $spaces,
               ));
           }
         }
         else {
           $statusMessage = ts("It looks like you are now registering a group of %1 participants. The event has %2 available spaces (you will not be wait listed). Please go back to the main registration page and reduce the number of additional people. You will also need to complete payment information.", array(
               1 => ++$processedCnt,
-              2 => $spaces
+              2 => $spaces,
             ));
           $allowToProceed = FALSE;
         }
@@ -365,7 +365,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
               'name' => ts('Skip Participant'),
               'subName' => 'skip',
               'icon' => 'seek-next',
-            )
+            ),
           )
         );
       }
@@ -375,7 +375,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
   }
 
   /**
-   * Global form rule
+   * Global form rule.
    *
    * @param array $fields
    *   The input form values.
@@ -384,8 +384,8 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
    * @param $self
    *
    *
-   * @return true if no errors, else array of errors
-   * @static
+   * @return bool|array
+   *   true if no errors, else array of errors
    */
   public static function formRule($fields, $files, $self) {
     $errors = array();
@@ -487,7 +487,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
           ) {
             $errors['_qf_default'] = ts('It looks like event has only %2 seats available and you are trying to register %1 participants, so could you please select price options accordingly.', array(
                 1 => $totalParticipants,
-                2 => $self->_availableRegistrations
+                2 => $self->_availableRegistrations,
               ));
           }
         }
@@ -583,7 +583,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
   }
 
   /**
-   * Process the form submission
+   * Process the form submission.
    *
    *
    * @return void
@@ -759,11 +759,11 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
   }
 
   /**
-   * Check whether call current participant is last one
+   * Check whether call current participant is last one.
    *
    * @param bool $isButtonJs
    *
-   * @return boolean
+   * @return bool
    *   ture on success.
    */
   public function isLastParticipant($isButtonJs = FALSE) {
@@ -777,7 +777,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
   /**
    * Reset values for all options those are full.
    *
-   **/
+   */
   public function resetElementValue($optionFullIds = array()) {
     if (!is_array($optionFullIds) ||
       empty($optionFullIds) ||
@@ -847,7 +847,7 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
     foreach (array(
                'constantValues',
                'submitValues',
-               'defaultValues'
+               'defaultValues',
              ) as $val) {
       $values = &$this->{"_$val"};
       if (!is_array($values) || empty($values)) {
@@ -874,4 +874,5 @@ class CRM_Event_Form_Registration_AdditionalParticipant extends CRM_Event_Form_R
       }
     }
   }
+
 }