diff --git a/give.module b/give.module
index f4a1aed..49eb6bd 100644
--- a/give.module
+++ b/give.module
@@ -44,15 +44,15 @@ function give_help($route_name, RouteMatchInterface $route_match) {
       $give_page = \Drupal::url('entity.give_form.collection');
       $output = '';
       $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('The Give module allows visitors to donate to you with credit/debit card or bank transfer using donation forms you can configure. For more information, see the <a href=":give">online documentation for the Give module</a>.', array(':give' => 'https://www.drupal.org/project/give')) . '</p>';
+      $output .= '<p>' . t('The Give module allows visitors to donate to you with credit/debit card or bank transfer using donation forms you can configure. For more information, see the <a href=":give">online documentation for the Give module</a>.', [':give' => 'https://www.drupal.org/project/give']) . '</p>';
       $output .= '<h3>' . t('Uses') . '</h3>';
       $output .= '<dl>';
       $output .= '<dt>' . t('Configuring give (donation) forms') . '</dt>';
-      $output .= '<dd>' . t('On the <a href=":give_admin">Give forms page</a>, you can configure the fields and display of the donation forms. Each give form has a machine name, a label, and zero or more defined recipients to receive notification when someone donates (or tries to donate).', array(':give_admin' => $give_page)) . '</dd>';
+      $output .= '<dd>' . t('On the <a href=":give_admin">Give forms page</a>, you can configure the fields and display of the donation forms. Each give form has a machine name, a label, and zero or more defined recipients to receive notification when someone donates (or tries to donate).', [':give_admin' => $give_page]) . '</dd>';
       $output .= '<dt>' . t('Linking to give (donation) forms') . '</dt>';
-      $output .= '<dd>' . t('One give form can be designated as the default donation form. If you choose to designate a default form, the <em>Give</em> menu link in the <em>Main</em> menu will link to it. You can modify this link from the <a href=":menu-settings">Menus page</a> if you have the Menu UI module installed. You can also create links to other give forms; the URL for each form you have set up has format <em>give/machine_name_of_form</em>.', array(':menu-settings' => $menu_page)) . '</p>';
+      $output .= '<dd>' . t('One give form can be designated as the default donation form. If you choose to designate a default form, the <em>Give</em> menu link in the <em>Main</em> menu will link to it. You can modify this link from the <a href=":menu-settings">Menus page</a> if you have the Menu UI module installed. You can also create links to other give forms; the URL for each form you have set up has format <em>give/machine_name_of_form</em>.', [':menu-settings' => $menu_page]) . '</p>';
       $output .= '<dt>' . t('Adding fields to give forms') . '</dt>';
-      $output .= '<dd>' . t('From the <a href=":give_admin">Give forms page</a>, you can configure the fields to be shown on different give forms, including their labels and help text. If you would like other content (such as text or images) to appear on a donation form, use a block. You can create and edit blocks on the <a href=":blocks">Block layout page</a>, if the Block module is installed. Another possibility is to embed donation forms in content with an entity reference field, or in paragraphs with the contributed <a href=":paragraphs">Paragraphs module</a>.', array(':blocks' => $block_page, ':give_admin' => $give_page, ':paragraphs' => 'https://www.drupal.org/project/paragraphs')) . '</dd>';
+      $output .= '<dd>' . t('From the <a href=":give_admin">Give forms page</a>, you can configure the fields to be shown on different give forms, including their labels and help text. If you would like other content (such as text or images) to appear on a donation form, use a block. You can create and edit blocks on the <a href=":blocks">Block layout page</a>, if the Block module is installed. Another possibility is to embed donation forms in content with an entity reference field, or in paragraphs with the contributed <a href=":paragraphs">Paragraphs module</a>.', [':blocks' => $block_page, ':give_admin' => $give_page, ':paragraphs' => 'https://www.drupal.org/project/paragraphs']) . '</dd>';
       $output .= '</dl>';
       return $output;
 
@@ -63,23 +63,23 @@ function give_help($route_name, RouteMatchInterface $route_match) {
  * Implements hook_entity_extra_field_info().
  */
 function give_entity_extra_field_info() {
-  $fields = array();
+  $fields = [];
   foreach (array_keys(entity_get_bundles('give_donation')) as $bundle) {
-    $fields['give_donation'][$bundle]['form']['name'] = array(
+    $fields['give_donation'][$bundle]['form']['name'] = [
       'label' => t('Donor name'),
       'description' => t('Text'),
       'weight' => -50,
-    );
-    $fields['give_donation'][$bundle]['form']['mail'] = array(
+    ];
+    $fields['give_donation'][$bundle]['form']['mail'] = [
       'label' => t('Donor e-mail'),
       'description' => t('Email'),
       'weight' => -40,
-    );
-    $fields['give_donation'][$bundle]['form']['recurring'] = array(
+    ];
+    $fields['give_donation'][$bundle]['form']['recurring'] = [
       'label' => t('Recurring donation'),
       'description' => t('Option'),
       'weight' => 50,
-    );
+    ];
   }
   return $fields;
 }
@@ -93,15 +93,15 @@ function give_mail($key, &$message, $params) {
   $donor = $params['donor'];
   $language = \Drupal::languageManager()->getLanguage($message['langcode']);
 
-  $variables = array(
+  $variables = [
     '@site-name' => \Drupal::config('system.site')->get('name'),
     '@label' => $give_donation->getLabel(),
     '@form' => !empty($params['give_form']) ? $params['give_form']->label() : NULL,
     '@form-url' => \Drupal::url('<current>', [], ['absolute' => TRUE, 'language' => $language]),
     '@donor-name' => $donor->getDisplayName(),
-  );
+  ];
   if ($donor->isAuthenticated()) {
-    $variables['@donor-url'] = $donor->url('canonical', array('absolute' => TRUE, 'language' => $language));
+    $variables['@donor-url'] = $donor->url('canonical', ['absolute' => TRUE, 'language' => $language]);
   }
   else {
     $variables['@donor-url'] = $params['donor']->getEmail();
@@ -109,7 +109,7 @@ function give_mail($key, &$message, $params) {
 
   switch ($key) {
     case 'donation_notice':
-      $options = array('langcode' => $language->getId());
+      $options = ['langcode' => $language->getId()];
       $message['subject'] .= t('[@form] @label', $variables, $options);
       $message['body'][] = t("@donor-name (@donor-url) gave a donation through form @form-url.", $variables, $options);
       $build = entity_view($give_donation, 'mail');
@@ -129,7 +129,7 @@ function give_mail($key, &$message, $params) {
  * Simple no-dependency token replacement.  More robust would be better.
  */
 function give_replace_donation_tokens($message, \Drupal\give\DonationInterface $donation) {
-  $search_replace = array(
+  $search_replace = [
     '[donor_name]' => $donation->getDonorName(),
     '[donor_email]' => $donation->getDonorMail(),
     '[give_label]' => $donation->getGiveForm()->label(),
@@ -137,6 +137,6 @@ function give_replace_donation_tokens($message, \Drupal\give\DonationInterface $
     '[recurring]' => $donation->recurring() ? 'recurring ' : '',
     '[today_date]' => strftime('%B %e, %Y'),
     '[date]' => strftime('%B %e, %Y', $donation->getUpdatedTime()),
-  );
+  ];
   return str_replace(array_keys($search_replace), array_values($search_replace), $message);
 }
diff --git a/src/Controller/GiveController.php b/src/Controller/GiveController.php
index bdc096a..ac9b938 100644
--- a/src/Controller/GiveController.php
+++ b/src/Controller/GiveController.php
@@ -64,9 +64,9 @@ class GiveController extends ControllerBase {
       // If there are no forms, do not display the form.
       if (empty($give_form)) {
         if ($this->currentUser()->hasPermission('administer give')) {
-          drupal_set_message($this->t('The give form has not been configured. <a href=":add">Add one or more forms</a> .', array(
-            ':add' => $this->url('give.form_add'))), 'error');
-          return array();
+          drupal_set_message($this->t('The give form has not been configured. <a href=":add">Add one or more forms</a> .', [
+            ':add' => $this->url('give.form_add')]), 'error');
+          return [];
         }
         else {
           throw new NotFoundHttpException();
@@ -76,9 +76,9 @@ class GiveController extends ControllerBase {
 
     $donation = $this->entityManager()
       ->getStorage('give_donation')
-      ->create(array(
+      ->create([
         'give_form' => $give_form->id(),
-      ));
+      ]);
 
     $form = $this->entityFormBuilder()->getForm($donation);
     $form['#title'] = $give_form->label();
diff --git a/src/DonationViewBuilder.php b/src/DonationViewBuilder.php
index 8f49c3c..043990e 100644
--- a/src/DonationViewBuilder.php
+++ b/src/DonationViewBuilder.php
@@ -34,11 +34,11 @@ class DonationViewBuilder extends EntityViewBuilder {
       // Add the donation extra field, if enabled.
       $display = $displays[$entity->bundle()];
       if ($entity->getDonation() && $display->getComponent('donation')) {
-        $build[$id]['donation'] = array(
+        $build[$id]['donation'] = [
           '#type' => 'item',
           '#title' => t('Donation'),
           '#plain_text' => $entity->getDonation(),
-        );
+        ];
       }
     }
     */
@@ -56,7 +56,7 @@ class DonationViewBuilder extends EntityViewBuilder {
       // convert DIVs correctly.
       foreach (Element::children($build) as $key) {
         if (isset($build[$key]['#label_display']) && $build[$key]['#label_display'] == 'above') {
-          $build[$key] += array('#prefix' => '');
+          $build[$key] += ['#prefix' => ''];
           $build[$key]['#prefix'] = $build[$key]['#title'] . ":\n";
           $build[$key]['#label_display'] = 'hidden';
         }
diff --git a/src/DonationViewsData.php b/src/DonationViewsData.php
index be673d6..cf46e24 100644
--- a/src/DonationViewsData.php
+++ b/src/DonationViewsData.php
@@ -15,14 +15,14 @@ class DonationViewsData extends EntityViewsData {
   public function getViewsData() {
     $data = parent::getViewsData();
 
-    $data['give_donation']['give_form_label'] = array(
+    $data['give_donation']['give_form_label'] = [
       'title' => $this->t('Form'),
       'help' => $this->t('The label of the associated form.'),
       'real field' => 'give_form',
-      'field' => array(
+      'field' => [
         'id' => 'give_form',
-      ),
-    );
+      ],
+    ];
 
     return $data;
   }
diff --git a/src/Entity/Donation.php b/src/Entity/Donation.php
index 4c67c43..2586c8a 100644
--- a/src/Entity/Donation.php
+++ b/src/Entity/Donation.php
@@ -114,7 +114,7 @@ class Donation extends ContentEntityBase implements DonationInterface {
    */
   public function getDollarAmount() {
     $cents = $this->getAmount();
-    return t("$@amount", array('@amount' => round($cents/100, 2)));
+    return $this->t("$@amount", ['@amount' => round($cents/100, 2)]);
   }
 
   /**
@@ -235,10 +235,10 @@ class Donation extends ContentEntityBase implements DonationInterface {
     $fields['langcode'] = BaseFieldDefinition::create('language')
       ->setLabel(t('Language'))
       ->setDescription(t('The donation language code.'))
-      ->setDisplayOptions('form', array(
+      ->setDisplayOptions('form', [
         'type' => 'language_select',
         'weight' => 2,
-      ));
+      ]);
 
     $fields['name'] = BaseFieldDefinition::create('string')
       ->setLabel(t("The donor's name"))
diff --git a/src/Form/Donation/DonationEditForm.php b/src/Form/Donation/DonationEditForm.php
index e7363bd..17605c4 100644
--- a/src/Form/Donation/DonationEditForm.php
+++ b/src/Form/Donation/DonationEditForm.php
@@ -56,29 +56,29 @@ class DonationEditForm extends ContentEntityForm {
     $donation = $this->entity;
     $form = parent::form($form, $form_state, $donation);
 
-    $form['name'] = array(
+    $form['name'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Donor name'),
       '#maxlength' => 255,
       '#default_value' => $donation->getDonorName(),
-    );
-    $form['mail'] = array(
+    ];
+    $form['mail'] = [
       '#type' => 'email',
       '#title' => $this->t('Donor email address'),
       '#default_value' => $donation->getDonorMail(),
-    );
-    $form['amount'] = array(
+    ];
+    $form['amount'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Amount (USD)'),
       '#default_value' => round($donation->getAmount()/100, 2),
       '#disabled' => TRUE,
-    );
-    $form['recurring'] = array(
+    ];
+    $form['recurring'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Recurring'),
       '#default_value' => $donation->recurring(),
       '#disabled' => TRUE,
-    );
+    ];
 
     return $form;
   }
@@ -88,10 +88,10 @@ class DonationEditForm extends ContentEntityForm {
    */
   public function save(array $form, FormStateInterface $form_state) {
     $this->entity->save();
-    $this->logger('give')->notice('The donation %label has been updated.', array(
+    $this->logger('give')->notice('The donation %label has been updated.', [
       '%label' => $this->entity->getLabel(),
       'link' => $this->getEntity()->link($this->t('Edit'), 'edit-form'),
-    ));
+    ]);
   }
 
 }
diff --git a/src/Form/Donation/DonationForm.php b/src/Form/Donation/DonationForm.php
index 92f68a2..e27f46f 100644
--- a/src/Form/Donation/DonationForm.php
+++ b/src/Form/Donation/DonationForm.php
@@ -100,24 +100,24 @@ class DonationForm extends ContentEntityForm {
     $form['#attributes']['class'][] = 'give-form';
 
     if (!empty($donation->preview)) {
-      $form['preview'] = array(
-        '#theme_wrappers' => array('container__preview'),
-        '#attributes' => array('class' => array('preview')),
-      );
+      $form['preview'] = [
+        '#theme_wrappers' => ['container__preview'],
+        '#attributes' => ['class' => ['preview']],
+      ];
       $form['preview']['donation'] = $this->entityManager->getViewBuilder('give_donation')->view($donation, 'full');
     }
 
-    $form['name'] = array(
+    $form['name'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Your name'),
       '#maxlength' => 255,
       '#required' => TRUE,
-    );
-    $form['mail'] = array(
+    ];
+    $form['mail'] = [
       '#type' => 'email',
       '#title' => $this->t('Your email address'),
       '#required' => TRUE,
-    );
+    ];
     if ($user->isAnonymous()) {
       $form['#attached']['library'][] = 'core/drupal.form';
       $form['#attributes']['data-user-info-from-browser'] = TRUE;
@@ -136,7 +136,7 @@ class DonationForm extends ContentEntityForm {
       $form['mail']['#plain_text'] = $user->getEmail();
     }
 
-    $form['amount'] = array(
+    $form['amount'] = [
       '#type' => 'number',
       '#step' => .01,
       '#min' => 4,
@@ -144,13 +144,13 @@ class DonationForm extends ContentEntityForm {
       '#title' => $this->t('Amount to give'),
       '#field_prefix' => $this->t('$'),
       '#required' => TRUE,
-    );
+    ];
 
     $form['recurring_fieldset'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Make this a recurring donation:'),
     ];
-    $form['recurring_fieldset']['recurring'] = array(
+    $form['recurring_fieldset']['recurring'] = [
       '#type' => 'radios',
       '#default_value' => 'once',
       '#options' => [
@@ -160,7 +160,7 @@ class DonationForm extends ContentEntityForm {
         '6' => $this->t('Every 6 months (semi-annually)'),
         '12' => $this->t('Every year (annually)'),
       ],
-    );
+    ];
 
     return $form;
   }
@@ -243,10 +243,10 @@ class DonationForm extends ContentEntityForm {
       $interval = $this->config('give.settings')->get('flood.interval');
 
       if (!$this->flood->isAllowed('give', $limit, $interval)) {
-        $form_state->setErrorByName('', $this->t('You cannot send more than %limit donations in @interval. Try again later.', array(
+        $form_state->setErrorByName('', $this->t('You cannot send more than %limit donations in @interval. Try again later.', [
           '%limit' => $limit,
           '@interval' => $this->dateFormatter->formatInterval($interval),
-        )));
+        ]));
       }
     }
 
diff --git a/src/Form/Donation/PaymentForm.php b/src/Form/Donation/PaymentForm.php
index 9478fee..d44fb53 100644
--- a/src/Form/Donation/PaymentForm.php
+++ b/src/Form/Donation/PaymentForm.php
@@ -97,31 +97,31 @@ class PaymentForm extends ContentEntityForm {
     $form['#suffix'] = '</div>';
     $form['#attributes']['class'][] = 'give-form give-form-payment flow-middle';
 
-    $form['thanks'] = array(
+    $form['thanks'] = [
       '#markup' => $this->t(
         "<h3>Thank you for supporting :sitename, :name!</h3>",
         [':name' => $donation->getDonorName(), ':sitename' => \Drupal::config('system.site')->get('name')]
       ),
       '#weight' => -50,
-    );
-    $form['show_amount'] = array(
+    ];
+    $form['show_amount'] = [
       '#type' => 'item',
       '#value' => $donation->getAmount(),
       '#title' => $this->t('Amount you pledged'),
       '#plain_text' => $donation->recurring() ? $this->t(':amount monthly', [':amount' => $donation->getDollarAmount()]) : $donation->getDollarAmount(),
       '#weight' => -40,
-    );
+    ];
 
-    $form['method'] = array(
+    $form['method'] = [
       '#type' => 'radios',
-      '#title' => t('Choose donation method'),
-      '#options' => array(
+      '#title' => $this->t('Choose donation method'),
+      '#options' => [
         GIVE_WITH_STRIPE => $this->t('By credit/debit card'),
         // GIVE_WITH_DWOLLA => $this->t('By bank transfer')
         GIVE_WITH_CHECK => $this->t('By check or other'),
-      ),
+      ],
       '#weight' => 0,
-    );
+    ];
 
     $form['#attached'] = [
       'library' => ['give/give-stripe-helper'],
@@ -132,27 +132,27 @@ class PaymentForm extends ContentEntityForm {
       ]
     ];
 
-    $form['stripe_errors'] = array(
+    $form['stripe_errors'] = [
       '#markup' => '<span class="payment-errors"></span>',
       '#weight' => 10,
-    );
+    ];
 
-    $form['stripe_token'] = array(
+    $form['stripe_token'] = [
       '#type' => 'hidden',
       '#default_value' => '',
-    );
+    ];
 
     // Custom radar rules can't use name but Stripe's risk assessment does.
     // Therefore this should default to the entered name but be editable.
     // TODO see https://www.drupal.org/node/2872223
-    $form['donor_name_for_stripe'] = array(
+    $form['donor_name_for_stripe'] = [
       '#type' => 'hidden',
       '#default_value' => $donation->getDonorName(),
-    );
+    ];
 
-    $form['card'] = array(
+    $form['card'] = [
       '#type' => 'item',
-      '#title' => t('Credit or debit card'),
+      '#title' => $this->t('Credit or debit card'),
       '#required' => TRUE,
       '#value' => TRUE, // For items, required is supposed to only show the asterisk, but Drupal is broken.
       '#markup' => '<div id="stripe-card-element"></div><div class="form--inline-feedback form--inline-feedback--success" id="stripe-card-errors"></div><div class="form--inline-feedback form--inline-feedback--error" id="stripe-card-success"></div>',
@@ -162,9 +162,9 @@ class PaymentForm extends ContentEntityForm {
           ':input[name="method"]' => ['value' => GIVE_WITH_STRIPE],
         ],
       ],
-    );
+    ];
 
-    $form['check_or_other_text'] = array(
+    $form['check_or_other_text'] = [
       '#type' => 'item',
       '#description' => $donation->getGiveForm()->getCheckOrOtherText(),
       '#states' => [
@@ -172,28 +172,28 @@ class PaymentForm extends ContentEntityForm {
           ':input[name="method"]' => ['value' => GIVE_WITH_CHECK],
         ],
       ],
-    );
+    ];
 
-    $form['telephone'] = array(
+    $form['telephone'] = [
       '#type' => 'tel',
-      '#title' => t('Telephone number'),
+      '#title' => $this->t('Telephone number'),
       '#states' => [
         'visible' => [
           ':input[name="method"]' => ['value' => GIVE_WITH_CHECK],
         ],
       ],
-    );
+    ];
 
-    $form['check_or_other_information'] = array(
+    $form['check_or_other_information'] = [
       '#type' => 'textarea',
-      '#title' => t('Further information'),
-      '#description' => t('Please ask any questions or explain anything needed to arrange for giving your donation.'),
+      '#title' => $this->t('Further information'),
+      '#description' => $this->t('Please ask any questions or explain anything needed to arrange for giving your donation.'),
       '#states' => [
         'visible' => [
           ':input[name="method"]' => ['value' => GIVE_WITH_CHECK],
         ],
       ],
-    );
+    ];
 
     return $form;
   }
@@ -282,11 +282,11 @@ class PaymentForm extends ContentEntityForm {
         "currency" => "usd",
         "source" => $token,
         "description" => $donation->getLabel(),
-        "metadata" => array(
+        "metadata" => [
           "give_form_id" => $donation->getGiveForm()->id(),
           "give_form_label" => $donation->getGiveForm()->label(),
           "email" => $donation->getDonorMail(),
-        ),
+        ],
       ];
 
       try {
@@ -314,10 +314,10 @@ class PaymentForm extends ContentEntityForm {
     $this->mailHandler->sendDonationNotice($donation, $user);
     drupal_set_message(
       $this->t("Thank you, :donor_name, for your donation of :amount",
-      array(
+      [
         ':donor_name' => $donation->getDonorName(),
-        ':amount' => $donation->recurring() ? $this->t(':amount monthly', [':amount' => $donation->getDollarAmount()]) : $donation->getDollarAmount()))
-    );
+        ':amount' => $donation->recurring() ? $this->t(':amount monthly', [':amount' => $donation->getDollarAmount()]) : $donation->getDollarAmount()])
+      );
     drupal_set_message($this->t("We have e-mailed a receipt to <em>:mail</em>.", [':mail' => $donation->getDonorMail()]));
 
     drupal_set_message($this->t('Your donation has been received.  Thank you!'));
diff --git a/src/Form/GiveForm/GiveFormEditForm.php b/src/Form/GiveForm/GiveFormEditForm.php
index d67d89e..0df8c03 100644
--- a/src/Form/GiveForm/GiveFormEditForm.php
+++ b/src/Form/GiveForm/GiveFormEditForm.php
@@ -59,71 +59,71 @@ class GiveFormEditForm extends EntityForm implements ContainerInjectionInterface
     $give_form = $this->entity;
     $default_form = $this->config('give.settings')->get('default_form');
 
-    $form['label'] = array(
+    $form['label'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Label'),
       '#maxlength' => 255,
       '#default_value' => $give_form->label(),
       '#description' => $this->t("Example: 'General donations', 'Renovation fund drive', or 'Annual appeal'."),
       '#required' => TRUE,
-    );
-    $form['id'] = array(
+    ];
+    $form['id'] = [
       '#type' => 'machine_name',
       '#default_value' => $give_form->id(),
       '#maxlength' => EntityTypeInterface::BUNDLE_MAX_LENGTH,
-      '#machine_name' => array(
+      '#machine_name' => [
         'exists' => '\Drupal\give\Entity\GiveForm::load',
-      ),
+      ],
       '#disabled' => !$give_form->isNew(),
-    );
-    $form['recipients'] = array(
+    ];
+    $form['recipients'] = [
       '#type' => 'textarea',
       '#title' => $this->t('Recipients'),
       '#default_value' => implode(', ', $give_form->getRecipients()),
       '#description' => $this->t("Provide who should be notified when a donation is received. Example: 'donations@example.org' or 'fund@example.org,staff@example.org' . To specify multiple recipients, separate each email address with a comma."),
       '#required' => TRUE,
-    );
-    $form['subject'] = array(
+    ];
+    $form['subject'] = [
       '#type' => 'textarea',
       '#title' => $this->t('Subject'),
       '#default_value' => $give_form->getSubject(),
       '#description' => $this->t('Subject used for e-mail reply (if Auto-reply with receipt is set below).'),
       '#required' => TRUE,
-    );
-    $form['reply'] = array(
+    ];
+    $form['reply'] = [
       '#type' => 'textarea',
       '#title' => $this->t('Auto-reply with receipt'),
       '#default_value' => $give_form->getReply(),
       '#description' => $this->t('Optionally send a receipt confirming the donation (including amount) with this text, which should include your organization name and any relevant tax information. Leave empty if you do not want to send the donor an auto-reply message and receipt.'),
-    );
-    $form['check_or_other_text'] = array(
+    ];
+    $form['check_or_other_text'] = [
       '#type' => 'textarea',
       '#title' => $this->t('Text to show for check or other'),
       '#default_value' => $give_form->getCheckOrOtherText(),
       '#description' => $this->t('Optional message to show potential givers who select the "Check or other" donation method.'),
-    );
-    $form['weight'] = array(
+    ];
+    $form['weight'] = [
       '#type' => 'weight',
       '#title' => $this->t('Weight'),
       '#default_value' => $give_form->getWeight(),
       '#description' => $this->t('When listing forms, those with lighter (smaller) weights get listed before forms with heavier (larger) weights. Forms with equal weights are sorted alphabetically.'),
-    );
-    $form['selected'] = array(
+    ];
+    $form['selected'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Make this the default form'),
       '#default_value' => ($default_form && $default_form === $give_form->id()),
-    );
+    ];
 
     $form['redirect_uri'] = [
       '#type' => 'textfield',
-      '#title' => t('Redirect Page'),
-      '#description' => t('The path to redirect the form after Submit.'),
+      '#title' => $this->t('Redirect Page'),
+      '#description' => $this->t('The path to redirect the form after Submit.'),
       '#default_value' => $give_form->getRedirectUri(),
     ];
     $form['submit_text'] = [
       '#type' => 'textfield',
-      '#title' => t('Submit button text'),
-      '#description' => t("Override the submit button's default <em>Give</em> text."),
+      '#title' => $this->t('Submit button text'),
+      '#description' => $this->t("Override the submit button's default <em>Give</em> text."),
       '#default_value' => $give_form->getSubmitText(),
     ];
 
@@ -142,7 +142,7 @@ class GiveFormEditForm extends EntityForm implements ContainerInjectionInterface
     foreach ($recipients as &$recipient) {
       $recipient = trim($recipient);
       if (!$this->emailValidator->isValid($recipient)) {
-        $form_state->setErrorByName('recipients', $this->t('%recipient is an invalid email address.', array('%recipient' => $recipient)));
+        $form_state->setErrorByName('recipients', $this->t('%recipient is an invalid email address.', ['%recipient' => $recipient]));
       }
     }
     $form_state->setValue('recipients', $recipients);
@@ -158,12 +158,12 @@ class GiveFormEditForm extends EntityForm implements ContainerInjectionInterface
 
     $edit_link = $this->entity->link($this->t('Edit'));
     if ($status == SAVED_UPDATED) {
-      drupal_set_message($this->t('Give form %label has been updated.', array('%label' => $give_form->label())));
-      $this->logger('give')->notice('Give form %label has been updated.', array('%label' => $give_form->label(), 'link' => $edit_link));
+      drupal_set_message($this->t('Give form %label has been updated.', ['%label' => $give_form->label()]));
+      $this->logger('give')->notice('Give form %label has been updated.', ['%label' => $give_form->label(), 'link' => $edit_link]);
     }
     else {
-      drupal_set_message($this->t('Give form %label has been added.', array('%label' => $give_form->label())));
-      $this->logger('give')->notice('Give form %label has been added.', array('%label' => $give_form->label(), 'link' => $edit_link));
+      drupal_set_message($this->t('Give form %label has been added.', ['%label' => $give_form->label()]));
+      $this->logger('give')->notice('Give form %label has been added.', ['%label' => $give_form->label(), 'link' => $edit_link]);
     }
 
     // Update the default form.
diff --git a/src/GiveStripe.php b/src/GiveStripe.php
index 1d755ee..2c109b7 100644
--- a/src/GiveStripe.php
+++ b/src/GiveStripe.php
@@ -26,21 +26,21 @@ class GiveStripe Implements GiveStripeInterface {
       // Try to create the plan.
       $plan = Plan::create($plan_data);
     } catch(Error\ApiConnection $e) {
-      throw new \Exception(t('Could not connect to payment processer. More information: %e', ['%e' => $e->getMessage()]));
+      throw new \Exception($this->t('Could not connect to payment processer. More information: %e', ['%e' => $e->getMessage()]));
     } catch(Error\InvalidRequest $e) {
       if ($e->getMessage() === 'Plan already exists.') {
         // If the plan already exists, lets retrieve it.
         $plan = Plan::retrieve($plan_data['id']);
       }
       else {
-        throw new \Exception(t('Invalid request: %e', ['%e' => $e->getMessage()]));
+        throw new \Exception($this->t('Invalid request: %e', ['%e' => $e->getMessage()]));
       }
     } catch(Error\Base $e) {
-      throw new \Exception(t('Error: %e', ['%e' => $e->getMessage()]));
+      throw new \Exception($this->t('Error: %e', ['%e' => $e->getMessage()]));
     }
     // Check if the plan was created or retrieved correctly.
     if (!($plan instanceof Plan)) {
-      throw new \Exception(t("Unable to create subscription plan for recurring donation. Could not complete donation."));
+      throw new \Exception($this->t("Unable to create subscription plan for recurring donation. Could not complete donation."));
     }
     return $plan;
   }
diff --git a/src/MailHandler.php b/src/MailHandler.php
index f0e4713..0a7a828 100644
--- a/src/MailHandler.php
+++ b/src/MailHandler.php
@@ -73,7 +73,7 @@ class MailHandler implements MailHandlerInterface {
   public function sendDonationNotice(DonationInterface $donation, AccountInterface $donor) {
     // Clone the donor, as we make changes to mail and name properties.
     $donor_cloned = clone $this->userStorage->load($donor->id());
-    $params = array();
+    $params = [];
     $current_langcode = $this->languageManager->getCurrentLanguage()->getId();
     $recipient_langcode = $this->languageManager->getDefaultLanguage()->getId();
     $give_form = $donation->getGiveForm();
@@ -86,7 +86,7 @@ class MailHandler implements MailHandlerInterface {
 
       // For the email message, clarify that the donor name is not verified; it
       // could potentially clash with a username on this site.
-      $donor_cloned->name = $this->t('@name (not verified)', array('@name' => $donation->getDonorName()));
+      $donor_cloned->name = $this->t('@name (not verified)', ['@name' => $donation->getDonorName()]);
     }
 
     // Build email parameters.
@@ -106,11 +106,11 @@ class MailHandler implements MailHandlerInterface {
       $this->mailManager->mail('give', 'donation_receipt', $donor_cloned->getEmail(), $current_langcode, $params);
     }
 
-    $this->logger->notice('%donor-name (@donor-from) gave via %give_form.', array(
+    $this->logger->notice('%donor-name (@donor-from) gave via %give_form.', [
       '%donor-name' => $donor_cloned->getUsername(),
       '@donor-from' => $donor_cloned->getEmail(),
       '%give_form' => $give_form->label(),
-    ));
+    ]);
   }
 
 }
diff --git a/tests/src/Functional/DonationTest.php b/tests/src/Functional/DonationTest.php
index b475846..29392af 100644
--- a/tests/src/Functional/DonationTest.php
+++ b/tests/src/Functional/DonationTest.php
@@ -218,7 +218,7 @@ class DonationTest extends GiveTestBase {
     // Check to that the user was sent to the step 2.
     $this->submitDonateByCheck('12345678', 'Test');
 
-    $captured_emails = $this->getMails(array('id' => 'give_donation_receipt'));
+    $captured_emails = $this->getMails(['id' => 'give_donation_receipt']);
     $this->assertEquals(1, count($captured_emails));
     $this->assertEquals(trim('Auto reply message'), trim($captured_emails[0]['body']));
   }
diff --git a/tests/src/Kernel/GiveFormAndDonationEntityTest.php b/tests/src/Kernel/GiveFormAndDonationEntityTest.php
index 3159041..942f7ad 100644
--- a/tests/src/Kernel/GiveFormAndDonationEntityTest.php
+++ b/tests/src/Kernel/GiveFormAndDonationEntityTest.php
@@ -19,14 +19,14 @@ class GiveFormAndDonationEntityTest extends EntityKernelTestBase {
    *
    * @var array
    */
-  public static $modules = array(
+  public static $modules = [
     'views',
     'system',
     'give',
     'field',
     'user',
     'give_test',
-  );
+  ];
 
   /**
    * {@inheritdoc}
@@ -91,7 +91,7 @@ class GiveFormAndDonationEntityTest extends EntityKernelTestBase {
   public function testDonationMethods() {
     $donation_storage = $this->container->get('entity.manager')->getStorage('give_donation');
     /** @var \Drupal\give\Entity\Donation $donation */
-    $donation = $donation_storage->create(array('give_form' => 'tzedakah'));
+    $donation = $donation_storage->create(['give_form' => 'tzedakah']);
 
     // Check for empty values first.
     $this->assertEquals(0, $donation->getAmount());
diff --git a/tests/src/Unit/MailHandlerTest.php b/tests/src/Unit/MailHandlerTest.php
index 14ed5b4..7dd5a63 100644
--- a/tests/src/Unit/MailHandlerTest.php
+++ b/tests/src/Unit/MailHandlerTest.php
@@ -80,7 +80,7 @@ class MailHandlerTest extends UnitTestCase {
 
     $string_translation = $this->getStringTranslationStub();
     $this->giveMailHandler = new MailHandler($this->mailManager, $this->languageManager, $this->logger, $string_translation, $this->entityManager);
-    $language = new Language(array('id' => 'en'));
+    $language = new Language(['id' => 'en']);
 
     $this->languageManager->expects($this->any())
       ->method('getDefaultLanguage')
@@ -137,114 +137,114 @@ class MailHandlerTest extends UnitTestCase {
    * Data provider for ::testSendMailDonations.
    */
   public function getSendMailDonations() {
-    $data = array();
-    $recipients = array('admin@drupal.org', 'user@drupal.org');
-    $default_result = array(
+    $data = [];
+    $recipients = ['admin@drupal.org', 'user@drupal.org'];
+    $default_result = [
       'module' => 'give',
       'key' => '',
       'to' => implode(', ', $recipients),
       'langcode' => 'en',
-      'params' => array(),
+      'params' => [],
       'from' => 'anonymous@drupal.org',
-    );
-    $results = array();
+    ];
+    $results = [];
     $donation = $this->getAnonymousMockDonation($recipients, '');
     $donor = $this->getMockDonor();
-    $result = array(
+    $result = [
       'key' => 'donation_notice',
-      'params' => array(
+      'params' => [
         'give_donation' => $donation,
         'donor' => $donor,
         'give_form' => $donation->getGiveForm(),
-      ),
-    );
+      ],
+    ];
     $results[] = $result + $default_result;
-    $data[] = array($donation, $donor, $results);
+    $data[] = [$donation, $donor, $results];
 
-    $results = array();
+    $results = [];
     $donation = $this->getAnonymousMockDonation($recipients, 'reply');
     $donor = $this->getMockDonor();
-    $result = array(
+    $result = [
       'key' => 'donation_notice',
-      'params' => array(
+      'params' => [
         'give_donation' => $donation,
         'donor' => $donor,
         'give_form' => $donation->getGiveForm(),
-      ),
-    );
+      ],
+    ];
     $results[] = $result + $default_result;
     $result['key'] = 'donation_receipt';
     $result['to'] = 'anonymous@drupal.org';
     $result['from'] = NULL;
     $results[] = $result + $default_result;
-    $data[] = array($donation, $donor, $results);
+    $data[] = [$donation, $donor, $results];
 
-    $results = array();
+    $results = [];
     $donation = $this->getAnonymousMockDonation($recipients, '', TRUE);
     $donor = $this->getMockDonor();
-    $result = array(
+    $result = [
       'key' => 'donation_notice',
-      'params' => array(
+      'params' => [
         'give_donation' => $donation,
         'donor' => $donor,
         'give_form' => $donation->getGiveForm(),
-      ),
-    );
+      ],
+    ];
     $results[] = $result + $default_result;
-    $data[] = array($donation, $donor, $results);
+    $data[] = [$donation, $donor, $results];
 
-    $results = array();
+    $results = [];
     $donation = $this->getAnonymousMockDonation($recipients, 'reply', TRUE);
     $donor = $this->getMockDonor();
-    $result = array(
+    $result = [
       'key' => 'donation_notice',
-      'params' => array(
+      'params' => [
         'give_donation' => $donation,
         'donor' => $donor,
         'give_form' => $donation->getGiveForm(),
-      ),
-    );
+      ],
+    ];
     $results[] = $result + $default_result;
     $result['key'] = 'donation_receipt';
     $result['from'] = NULL;
     $results[] = $result + $default_result;
-    $data[] = array($donation, $donor, $results);
+    $data[] = [$donation, $donor, $results];
 
     // For authenticated user.
-    $results = array();
+    $results = [];
     $donation = $this->getAuthenticatedMockDonation();
     $donor = $this->getMockDonor(FALSE, 'user@drupal.org');
-    $result = array(
+    $result = [
       'module' => 'give',
       'key' => 'user_mail',
       'to' => 'user2@drupal.org',
       'langcode' => 'en',
-      'params' => array(
+      'params' => [
         'give_donation' => $donation,
         'donor' => $donor,
-      ),
+      ],
       'from' => 'user@drupal.org',
-    );
+    ];
     $results[] = $result;
-    $data[] = array($donation, $donor, $results);
+    $data[] = [$donation, $donor, $results];
 
-    $results = array();
+    $results = [];
     $donation = $this->getAuthenticatedMockDonation(TRUE);
     $donor = $this->getMockDonor(FALSE, 'user@drupal.org');
-    $result = array(
+    $result = [
       'module' => 'give',
       'key' => 'user_mail',
       'to' => 'user2@drupal.org',
       'langcode' => 'en',
-      'params' => array(
+      'params' => [
         'give_donation' => $donation,
         'donor' => $donor,
-      ),
+      ],
       'from' => 'user@drupal.org',
-    );
+    ];
     $results[] = $result;
 
-    $data[] = array($donation, $donor, $results);
+    $data[] = [$donation, $donor, $results];
 
     return $data;
   }
