Merge pull request #4899 from colemanw/INFRA-132
[civicrm-core.git] / CRM / Event / Form / ParticipantFeeSelection.php
index 66e3099d640eeb2637d54ac7efb03ca0fb14b84f..0e0be7404a44abc0027feee6f66d0cac0d1182b3 100644 (file)
@@ -136,7 +136,7 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
     else {
       foreach ($priceFieldId as $key => $value) {
         if (!empty($value) && ($this->_values['fee'][$value]['html_type'] == 'Radio' || $this->_values['fee'][$value]['html_type'] == 'Select') && !$this->_values['fee'][$value]['is_required']) {
-          $defaults[$this->_participantId]['price_'.array_keys($this->_values['fee'])[$key]] = 0;
+          $defaults[$this->_participantId]['price_' . array_keys($this->_values['fee'])[$key]] = 0;
         }
       }
     }
@@ -181,7 +181,8 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
     $statusOptions = CRM_Event_PseudoConstant::participantStatus(NULL, NULL, 'label');
     $this->add('select', 'status_id', ts('Participant Status'),
       array(
-        '' => ts('- select -')) + $statusOptions,
+        '' => ts('- select -')
+      ) + $statusOptions,
       TRUE
     );
 
@@ -208,7 +209,7 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
       $buttons[] = array(
         'type' => 'upload',
         'name' => ts('Save and Record Payment'),
-        'subName' => 'new'
+        'subName' => 'new',
       );
     }
     $buttons[] = array(
@@ -265,8 +266,8 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
     if ($buttonName == $this->getButtonName('upload', 'new')) {
       $session = CRM_Core_Session::singleton();
       $session->pushUserContext(CRM_Utils_System::url('civicrm/payment/add',
-          "reset=1&action=add&component=event&id={$this->_participantId}&cid={$this->_contactId}"
-        ));
+        "reset=1&action=add&component=event&id={$this->_participantId}&cid={$this->_contactId}"
+      ));
     }
   }
 
@@ -369,7 +370,7 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
       'valueName' => 'event_offline_receipt',
       'contactId' => $this->_contactId,
       'isTest' => FALSE,
-      'PDFFilename' => ts('confirmation').'.pdf',
+      'PDFFilename' => ts('confirmation') . '.pdf',
     );
 
     // try to send emails only if email id is present