Merge pull request #17470 from colemanw/array
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 3 Jun 2020 21:16:07 +0000 (09:16 +1200)
committerGitHub <noreply@github.com>
Wed, 3 Jun 2020 21:16:07 +0000 (09:16 +1200)
NFC - Change array() to short syntax []

1  2 
CRM/Contribute/Form/UpdateBilling.php

index f1872d522e40e5342cf66d79a8ee47172405741c,e4708d5920eb8a7651217a707234c7f71cf8482c..b7d9e550f121c606709c1f41a4532cbb88150ced
@@@ -55,12 -55,12 +55,12 @@@ class CRM_Contribute_Form_UpdateBillin
      }
  
      if ((!$this->_crid && !$this->_coid && !$this->_mid) || (!$this->_subscriptionDetails)) {
 -      CRM_Core_Error::fatal('Required information missing.');
 +      throw new CRM_Core_Exception('Required information missing.');
      }
  
      if (!$this->_paymentProcessor['object']->supports('updateSubscriptionBillingInfo')) {
 -      CRM_Core_Error::fatal(ts("%1 processor doesn't support updating subscription billing details.",
 -        array(1 => $this->_paymentProcessor['object']->_processorName)
 +      throw new CRM_Core_Exception(ts("%1 processor doesn't support updating subscription billing details.",
 +        [1 => $this->_paymentProcessor['title']]
        ));
      }
      $this->assign('paymentProcessor', $this->_paymentProcessor);
     *   Default values
     */
    public function setDefaultValues() {
-     $this->_defaults = array();
+     $this->_defaults = [];
  
      if ($this->_subscriptionDetails->contact_id) {
-       $fields = array();
+       $fields = [];
        $names = array(
          'first_name',
          'middle_name',
     *   true if no errors, else array of errors
     */
    public static function formRule($fields, $files, $self) {
-     $errors = array();
+     $errors = [];
      CRM_Core_Form::validateMandatoryFields($self->_fields, $fields, $errors);
  
      // validate the payment instrument values (e.g. credit card number)
      }
      $fields["email-{$this->_bltID}"] = 1;
  
-     $processorParams = array();
+     $processorParams = [];
      foreach ($params as $key => $val) {
        $key = str_replace('billing_', '', $key);
        list($key) = explode('-', $key);