Merge pull request #14579 from civicrm/5.15
[civicrm-core.git] / CRM / Pledge / Form / Payment.php
index 42b6ff5ff4c1c767140fe04d11bb23346b81b04b..ea24635c075bef52a4e582d69c4069c15ce301ec 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018                                |
+ | Copyright CiviCRM LLC (c) 2004-2019                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
  */
 
 /**
@@ -76,7 +76,7 @@ class CRM_Pledge_Form_Payment extends CRM_Core_Form {
    * the default values are retrieved from the database.
    */
   public function setDefaultValues() {
-    $defaults = array();
+    $defaults = [];
     if ($this->_id) {
       $params['id'] = $this->_id;
       CRM_Pledge_BAO_PledgePayment::retrieve($params, $defaults);
@@ -99,36 +99,35 @@ class CRM_Pledge_Form_Payment extends CRM_Core_Form {
 
     $this->addMoney('scheduled_amount',
       ts('Scheduled Amount'), TRUE,
-      array('readonly' => TRUE),
+      ['readonly' => TRUE],
       TRUE,
       'currency',
       NULL,
       TRUE
     );
 
-    $optionTypes = array(
+    $optionTypes = [
       '1' => ts('Adjust Pledge Payment Schedule?'),
       '2' => ts('Adjust Total Pledge Amount?'),
-    );
+    ];
     $element = $this->addRadio('option_type',
       NULL,
       $optionTypes,
-      array(), '<br/>'
+      [], '<br/>'
     );
 
-    $this->addButtons(array(
-        array(
+    $this->addButtons([
+        [
           'type' => 'next',
           'name' => ts('Save'),
           'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
           'isDefault' => TRUE,
-        ),
-        array(
+        ],
+        [
           'type' => 'cancel',
           'name' => ts('Cancel'),
-        ),
-      )
-    );
+        ],
+    ]);
   }
 
   /**
@@ -169,7 +168,7 @@ class CRM_Pledge_Form_Payment extends CRM_Core_Form {
     }
     // update pledge status
     CRM_Pledge_BAO_PledgePayment::updatePledgePaymentStatus($pledgeId,
-      array($params['id']),
+      [$params['id']],
       $params['status_id'],
       NULL,
       $formValues['scheduled_amount'],