Merge pull request #14004 from mfb/set-utf8
[civicrm-core.git] / CRM / Core / Payment / ProcessorForm.php
index ba07a854fc6fdc6b2f28cdbbe99ef2bcf17a0161..6afebf6e535dda762faaaab1685180ba304147f6 100644 (file)
@@ -26,6 +26,7 @@
  */
 
 use Civi\Payment\System;
+
 /**
  *
  * @package CRM
@@ -80,12 +81,12 @@ class CRM_Core_Payment_ProcessorForm {
     }
 
     if (!empty($form->_values['custom_pre_id'])) {
-      $profileAddressFields = array();
+      $profileAddressFields = [];
       $fields = CRM_Core_BAO_UFGroup::getFields($form->_values['custom_pre_id'], FALSE, CRM_Core_Action::ADD, NULL, NULL, FALSE,
         NULL, FALSE, NULL, CRM_Core_Permission::CREATE, NULL);
 
       foreach ((array) $fields as $key => $value) {
-        CRM_Core_BAO_UFField::assignAddressField($key, $profileAddressFields, array('uf_group_id' => $form->_values['custom_pre_id']));
+        CRM_Core_BAO_UFField::assignAddressField($key, $profileAddressFields, ['uf_group_id' => $form->_values['custom_pre_id']]);
       }
       if (count($profileAddressFields)) {
         $form->set('profileAddressFields', $profileAddressFields);
@@ -128,7 +129,7 @@ class CRM_Core_Payment_ProcessorForm {
     ) {
 
       CRM_Core_Error::fatal(ts('This contribution page is configured to support separate contribution and membership payments. This %1 plugin does not currently support multiple simultaneous payments, or the option to "Execute real-time monetary transactions" is disabled. Please contact the site administrator and notify them of this error',
-          array(1 => $form->_paymentProcessor['payment_processor_type'])
+          [1 => $form->_paymentProcessor['payment_processor_type']]
         )
       );
     }