diff --git a/includes/mailchimp.drush.inc b/includes/mailchimp.drush.inc
index 8ac8bb6..94624ed 100644
--- a/includes/mailchimp.drush.inc
+++ b/includes/mailchimp.drush.inc
@@ -9,16 +9,16 @@
  * Implements hook_drush_command().
  */
 function mailchimp_drush_command() {
-  $items = array();
+  $items = [];
 
-  $items['mailchimp-cron'] = array(
+  $items['mailchimp-cron'] = [
     'callback' => '_mailchimp_cron_batch',
     'description' => "Trigger Mailchimp cron task",
-    'examples' => array(
+    'examples' => [
       'drush mailchimp-cron 5000' => 'Run Mailchimp cron with a batch size of 5000.',
       'drush mailchimp-cron' => 'Run a Mailchimp cron task.',
-    ),
-  );
+    ],
+  ];
 
   return $items;
 }
diff --git a/mailchimp.install b/mailchimp.install
index bb13069..8139544 100644
--- a/mailchimp.install
+++ b/mailchimp.install
@@ -11,11 +11,11 @@
  * Implements hook_requirements().
  */
 function mailchimp_requirements($phase) {
-  $requirements = array(
-    'mailchimp' => array(
+  $requirements = [
+    'mailchimp' => [
       'title' => t('Mailchimp'),
-    ),
-  );
+    ],
+  ];
 
   if ($phase == 'runtime') {
     $config = \Drupal::config('mailchimp.settings');
diff --git a/mailchimp.module b/mailchimp.module
index d848805..14ac11d 100644
--- a/mailchimp.module
+++ b/mailchimp.module
@@ -119,7 +119,7 @@
  *   Array of list data.
  */
 function mailchimp_get_list($list_id) {
-  $lists = mailchimp_get_lists(array($list_id));
+  $lists = mailchimp_get_lists([$list_id]);
   return reset($lists);
 }
 
@@ -134,8 +134,8 @@
  * @return array
  *   An array of list data arrays.
  */
-function mailchimp_get_lists($list_ids = array(), $reset = FALSE) {
-  $lists = array();
+function mailchimp_get_lists($list_ids = [], $reset = FALSE) {
+  $lists = [];
   $cache = \Drupal::cache('mailchimp');
   $cached_data = $reset ? NULL : $cache->get('lists');
 
@@ -148,16 +148,16 @@
       /* @var \Mailchimp\MailchimpLists $mcapi */
       $mcapi = mailchimp_get_api_object('MailchimpLists');
       if ($mcapi != null) {
-        $result = $mcapi->getLists(array('count' => 500));
+        $result = $mcapi->getLists(['count' => 500]);
 
         if ($result->total_items > 0) {
           foreach ($result->lists as $list) {
-            $int_category_data = $mcapi->getInterestCategories($list->id, array('count' => 500));
+            $int_category_data = $mcapi->getInterestCategories($list->id, ['count' => 500]);
             if ($int_category_data->total_items > 0) {
 
-              $list->intgroups = array();
+              $list->intgroups = [];
               foreach ($int_category_data->categories as $interest_category) {
-                $interest_data = $mcapi->getInterests($list->id, $interest_category->id, array('count' => 500));
+                $interest_data = $mcapi->getInterests($list->id, $interest_category->id, ['count' => 500]);
 
                 if ($interest_data->total_items > 0) {
                   $interest_category->interests = $interest_data->interests;
@@ -170,7 +170,7 @@
             $lists[$list->id] = $list;
 
             // Append mergefields:
-            $mergefields = $mcapi->getMergeFields($list->id, array('count' => 500));
+            $mergefields = $mcapi->getMergeFields($list->id, ['count' => 500]);
             if ($mergefields->total_items > 0) {
               $lists[$list->id]->mergevars = $mergefields->merge_fields;
             }
@@ -183,14 +183,14 @@
       }
     }
     catch (\Exception $e) {
-      \Drupal::logger('mailchimp')->error('An error occurred requesting list information from Mailchimp. "{message}"', array(
-        'message' => $e->getMessage()));
+      \Drupal::logger('mailchimp')->error('An error occurred requesting list information from Mailchimp. "{message}"', [
+        'message' => $e->getMessage()]);
     }
   }
 
   // Filter by given IDs.
   if (!empty($list_ids)) {
-    $filtered_lists = array();
+    $filtered_lists = [];
 
     foreach ($list_ids as $id) {
       if (array_key_exists($id, $lists)) {
@@ -236,7 +236,7 @@
  *   Struct describing mergevars for the specified lists.
  */
 function mailchimp_get_mergevars($list_ids, $reset = FALSE) {
-  $mergevars = array();
+  $mergevars = [];
   $cache = \Drupal::cache('mailchimp');
 
   if (!$reset) {
@@ -263,8 +263,8 @@
 
       foreach ($list_ids as $list_id) {
         // Add default EMAIL merge var for all lists.
-        $mergevars[$list_id] = array(
-          (object) array(
+        $mergevars[$list_id] = [
+          (object) [
             'tag' => 'EMAIL',
             'name' => t('Email Address'),
             'type' => 'email',
@@ -272,13 +272,13 @@
             'default_value' => '',
             'public' => TRUE,
             'display_order' => 1,
-            'options' => (object) array(
+            'options' => (object) [
               'size' => 25,
-            ),
-          ),
-        );
+            ],
+          ],
+        ];
 
-        $result = $mc_lists->getMergeFields($list_id, array('count' => 500));
+        $result = $mc_lists->getMergeFields($list_id, ['count' => 500]);
 
         if ($result->total_items > 0) {
           $mergevars[$list_id] = array_merge($mergevars[$list_id], $result->merge_fields);
@@ -289,10 +289,10 @@
     }
 
     catch (\Exception $e) {
-      \Drupal::logger('mailchimp')->error('An error occurred requesting mergevars for list {list}. "{message}"', array(
+      \Drupal::logger('mailchimp')->error('An error occurred requesting mergevars for list {list}. "{message}"', [
         'list' => $list_id,
         'message' => $e->getMessage()
-      ));
+      ]);
     }
   }
 
@@ -349,11 +349,11 @@
       $cache->set($list_id . '-' . $email, $memberinfo);
     }
     else {
-      \Drupal::logger('mailchimp')->error('An error occurred requesting memberinfo for {email} in list {list}. "{message}"', array(
+      \Drupal::logger('mailchimp')->error('An error occurred requesting memberinfo for {email} in list {list}. "{message}"', [
         'email' => $email,
         'list' => $list_id,
         'message' => $e->getMessage(),
-      ));
+      ]);
     }
   }
 
@@ -416,7 +416,7 @@
  *
  * @see Mailchimp_Lists::subscribe()
  */
-function mailchimp_subscribe($list_id, $email, $merge_vars = NULL, $interests = array(), $double_optin = FALSE, $format = 'html', $language = NULL, $gdpr_consent = FALSE) {
+function mailchimp_subscribe($list_id, $email, $merge_vars = NULL, $interests = [], $double_optin = FALSE, $format = 'html', $language = NULL, $gdpr_consent = FALSE) {
   $config = \Drupal::config('mailchimp.settings');
 
   if (empty($language)) {
@@ -424,7 +424,7 @@
   }
 
   if ($config->get('cron')) {
-    $args = array(
+    $args = [
       'list_id' => $list_id,
       'email' => $email,
       'merge_vars' => $merge_vars,
@@ -433,7 +433,7 @@
       'format' => $format,
       'language' => $language,
       'gdpr_consent' => $gdpr_consent,
-    );
+    ];
 
     return mailchimp_addto_queue('mailchimp_subscribe_process', $args);
   }
@@ -446,7 +446,7 @@
  *
  * @see Mailchimp_Lists::subscribe()
  */
-function mailchimp_subscribe_process($list_id, $email, $merge_vars = NULL, $interests = array(), $double_optin = FALSE, $format = 'html', $language = NULL, $gdpr_consent = FALSE) {
+function mailchimp_subscribe_process($list_id, $email, $merge_vars = NULL, $interests = [], $double_optin = FALSE, $format = 'html', $language = NULL, $gdpr_consent = FALSE) {
   $config = \Drupal::config('mailchimp.settings');
   $result = FALSE;
 
@@ -457,11 +457,11 @@
       throw new Exception('Cannot subscribe to list without Mailchimp API. Check API key has been entered.');
     }
 
-    $parameters = array(
+    $parameters = [
       // If double opt-in is required, set member status to 'pending'.
       'status' => ($double_optin) ? \Mailchimp\MailchimpLists::MEMBER_STATUS_PENDING : \Mailchimp\MailchimpLists::MEMBER_STATUS_SUBSCRIBED,
       'email_type' => $format,
-    );
+    ];
 
     if (!empty($language)) {
       $parameters['language'] = $language;
@@ -469,7 +469,7 @@
 
     // Set interests.
     if (!empty($interests)) {
-      $selected_interests = array();
+      $selected_interests = [];
       foreach ($interests as $interest_group) {
         // This could happen in case the selected interest group
         // is set to display radio inputs. So we either do an
@@ -519,15 +519,15 @@
     $result = $mc_lists->addOrUpdateMember($list_id, $email, $parameters);
 
     if (isset($result->id)) {
-      \Drupal::moduleHandler()->invokeAll('mailchimp_subscribe_success', array($list_id, $email, $merge_vars));
+      \Drupal::moduleHandler()->invokeAll('mailchimp_subscribe_success', [$list_id, $email, $merge_vars]);
 
       // Clear user cache, just in case there's some cruft leftover:
       mailchimp_cache_clear_member($list_id, $email);
 
-      \Drupal::logger('mailchimp')->notice('{email} was subscribed to list {list}.', array(
+      \Drupal::logger('mailchimp')->notice('{email} was subscribed to list {list}.', [
         'email' => $email,
         'list' => $list_id,
-      ));
+      ]);
 
       // For newly subscribed members set GDPR consent if it's been given.
       if (!$was_subscribed && $gdpr_consent) {
@@ -553,27 +553,27 @@
     }
     else {
       if (!$config->get('test_mode')) {
-        \Drupal::logger('mailchimp')->warning('A problem occurred subscribing {email} to list {list}.', array(
+        \Drupal::logger('mailchimp')->warning('A problem occurred subscribing {email} to list {list}.', [
           'email' => $email,
           'list' => $list_id,
-        ));
+        ]);
       }
     }
   }
   catch (\Exception $e) {
     if ($e->getCode() == '400' && strpos($e->getMessage(), 'Member In Compliance State') !== FALSE && !$double_optin) {
-      \Drupal::logger('mailchimp')->error('Detected "Member In Compliance State" subscribing {email} to list {list}. Trying again using double-opt in.', array(
+      \Drupal::logger('mailchimp')->error('Detected "Member In Compliance State" subscribing {email} to list {list}. Trying again using double-opt in.', [
         'email' => $email,
         'list' => $list_id,
-      ));
+      ]);
       return mailchimp_subscribe_process($list_id, $email, $merge_vars, $interests, TRUE, $format, $language, $gdpr_consent);
     }
 
-    \Drupal::logger('mailchimp')->error('An error occurred subscribing {email} to list {list}. "{message}"', array(
+    \Drupal::logger('mailchimp')->error('An error occurred subscribing {email} to list {list}. "{message}"', [
       'email' => $email,
       'list' => $list_id,
       'message' => $e->getMessage(),
-    ));
+    ]);
   }
 
   if ($double_optin) {
@@ -597,10 +597,10 @@
   $queue = \Drupal::queue(MAILCHIMP_QUEUE_CRON);
   $queue->createQueue();
 
-  return $queue->createItem(array(
+  return $queue->createItem([
     'function' => $function,
     'args' => $args,
-  ));
+  ]);
 }
 
 /**
@@ -608,11 +608,11 @@
  *
  * @see Mailchimp_Lists::updateMember()
  */
-function mailchimp_update_member($list_id, $email, $merge_vars, $interests = array(), $format = 'html', $double_optin = FALSE, $gdpr_consent = FALSE) {
+function mailchimp_update_member($list_id, $email, $merge_vars, $interests = [], $format = 'html', $double_optin = FALSE, $gdpr_consent = FALSE) {
   $config = \Drupal::config('mailchimp.settings');
 
   if ($config->get('cron')) {
-    $args = array(
+    $args = [
       'list_id' => $list_id,
       'email' => $email,
       'merge_vars' => $merge_vars,
@@ -620,7 +620,7 @@
       'format' => $format,
       'double_optin' => $double_optin,
       'gdpr_consent' => $gdpr_consent,
-    );
+    ];
 
     return mailchimp_addto_queue('mailchimp_update_member_process', $args);
   }
@@ -640,14 +640,14 @@
     /* @var \Mailchimp\MailchimpLists $mc_lists */
     $mcapi = mailchimp_get_api_object('MailchimpLists');
 
-    $parameters = array(
+    $parameters = [
       'status' => ($double_optin) ? MailchimpLists::MEMBER_STATUS_PENDING : MailchimpLists::MEMBER_STATUS_SUBSCRIBED,
       'email_type' => $format,
-    );
+    ];
 
     // Set interests.
     if (!empty($interests)) {
-      $selected_interests = array();
+      $selected_interests = [];
       foreach ($interests as $interest_group) {
         foreach ($interest_group as $interest_id => $interest_status) {
           $selected_interests[$interest_id] = ($interest_status !== 0);
@@ -683,36 +683,36 @@
     $result = $mcapi->updateMember($list_id, $email, $parameters);
 
     if (isset($result->id)) {
-      \Drupal::logger('mailchimp')->notice('{email} was updated in list {list_id}.', array(
+      \Drupal::logger('mailchimp')->notice('{email} was updated in list {list_id}.', [
         'email' => $email,
         'list' => $list_id,
-      ));
+      ]);
 
       // Clear user cache:
       mailchimp_cache_clear_member($list_id, $email);
     }
     else {
-      \Drupal::logger('mailchimp')->warning('A problem occurred updating {email} on list {list}.', array(
+      \Drupal::logger('mailchimp')->warning('A problem occurred updating {email} on list {list}.', [
         'email' => $email,
         'list' => $list_id,
-      ));
+      ]);
     }
   }
   catch (\Exception $e) {
     if ($e->getCode() == '400' && strpos($e->getMessage(), 'Member In Compliance State') !== FALSE && !$double_optin) {
-      \Drupal::logger('mailchimp')->error('Detected "Member In Compliance State" subscribing {email} to list {list}.  Trying again using double-opt in.', array(
+      \Drupal::logger('mailchimp')->error('Detected "Member In Compliance State" subscribing {email} to list {list}.  Trying again using double-opt in.', [
         'email' => $email,
         'list' => $list_id,
-      ));
+      ]);
 
       return mailchimp_update_member_process($list_id, $email, $merge_vars, $interests, $format, TRUE, $gdpr_consent);
     }
 
-    \Drupal::logger('mailchimp')->error('An error occurred updating {email} on list {list}. "{message}"', array(
+    \Drupal::logger('mailchimp')->error('An error occurred updating {email} on list {list}. "{message}"', [
       'email' => $email,
       'list' => $list_id,
       'message' => $e->getMessage(),
-    ));
+    ]);
   }
 
   if ($double_optin) {
@@ -728,7 +728,7 @@
  * Note that this function can cause locking an is somewhat slow. It is not
  * recommended unless you know what you are doing! See the MCAPI documentation.
  */
-function mailchimp_get_members($list_id, $status = 'subscribed', $options = array()) {
+function mailchimp_get_members($list_id, $status = 'subscribed', $options = []) {
   $results = FALSE;
 
   $lock = \Drupal::lock();
@@ -744,8 +744,8 @@
       $results = $mcapi->getMembers($list_id, $options);
     }
     catch (\Exception $e) {
-      \Drupal::logger('mailchimp')->error('An error occurred pulling member info for a list. "{message}"', array(
-        'message' => $e->getMessage()));
+      \Drupal::logger('mailchimp')->error('An error occurred pulling member info for a list. "{message}"', [
+        'message' => $e->getMessage()]);
     }
 
     $lock->release('mailchimp_get_members');
@@ -775,10 +775,10 @@
         // TODO: Remove 'advanced' earlier? Needed at all?
         unset($batch_data['merge_vars']['advanced']);
 
-        $parameters = array(
+        $parameters = [
           'email_type' => $batch_data['email_type'],
           'merge_fields' => (object) $batch_data['merge_vars'],
-        );
+        ];
 
         $mc_lists->addOrUpdateMember($list_id, $batch_data['email'], $parameters, TRUE);
       }
@@ -788,8 +788,8 @@
     }
   }
   catch (\Exception $e) {
-    \Drupal::logger('mailchimp')->error('An error occurred performing batch subscribe/update. "{message}"', array(
-      'message' => $e->getMessage()));
+    \Drupal::logger('mailchimp')->error('An error occurred performing batch subscribe/update. "{message}"', [
+      'message' => $e->getMessage()]);
   }
 
   return $results;
@@ -809,10 +809,10 @@
     if ($config->get('cron')) {
       $result = mailchimp_addto_queue(
         'mailchimp_unsubscribe_process',
-        array(
+        [
           'list_id' => $list_id,
           'email' => $email,
-        )
+        ]
       );
     }
     else {
@@ -838,7 +838,7 @@
 
     $mc_lists->removeMember($list_id, $email);
 
-    \Drupal::moduleHandler()->invokeAll('mailchimp_unsubscribe_success', array($list_id, $email));
+    \Drupal::moduleHandler()->invokeAll('mailchimp_unsubscribe_success', [$list_id, $email]);
 
     // Clear user cache:
     mailchimp_cache_clear_member($list_id, $email);
@@ -846,11 +846,11 @@
     return TRUE;
   }
   catch (\Exception $e) {
-    \Drupal::logger('mailchimp')->error('An error occurred unsubscribing {email} from list {list}. "{message}"', array(
+    \Drupal::logger('mailchimp')->error('An error occurred unsubscribing {email} from list {list}. "{message}"', [
       'email' => $email,
       'list' => $list_id,
       'message' => $e->getMessage(),
-    ));
+    ]);
   }
 
   return FALSE;
@@ -894,10 +894,10 @@
     }
   }
   catch (\Exception $e) {
-    \Drupal::logger('mailchimp')->error('An error occurred retrieving campaign data for {campaign}. "{message}"', array(
+    \Drupal::logger('mailchimp')->error('An error occurred retrieving campaign data for {campaign}. "{message}"', [
       'campaign' => $campaign_id,
       'message' => $e->getMessage(),
-    ));
+    ]);
   }
 
   return $campaign_data;
@@ -919,12 +919,12 @@
     $lists = $mcapi->getListsForEmail($email);
   }
   catch (\Exception $e) {
-    \Drupal::logger('mailchimp')->error('An error occurred retreiving lists data for {email}. "{message}"', array(
+    \Drupal::logger('mailchimp')->error('An error occurred retreiving lists data for {email}. "{message}"', [
       'email' => $email,
       'message' => $e->getMessage(),
-    ));
+    ]);
 
-    $lists = array();
+    $lists = [];
   }
 
   return $lists;
@@ -944,10 +944,10 @@
     return ($result->total_items > 0) ? $result->webhooks : FALSE;
   }
   catch (\Exception $e) {
-    \Drupal::logger('mailchimp')->error('An error occurred reading webhooks for list {list}. "{message}"', array(
+    \Drupal::logger('mailchimp')->error('An error occurred reading webhooks for list {list}. "{message}"', [
       'list' => $list_id,
       'message' => $e->getMessage(),
-    ));
+    ]);
 
     return FALSE;
   }
@@ -970,7 +970,7 @@
  * @return string
  *   The ID of the new webhook.
  */
-function mailchimp_webhook_add($list_id, $url, $events = array(), $sources = array()) {
+function mailchimp_webhook_add($list_id, $url, $events = [], $sources = []) {
   try {
     /* @var \Mailchimp\MailchimpLists $mc_lists */
     $mc_lists = mailchimp_get_api_object('MailchimpLists');
@@ -978,20 +978,20 @@
       throw new Exception('Cannot add webhook without Mailchimp API. Check API key has been entered.');
     }
 
-    $parameters = array(
+    $parameters = [
       'events' => (object) $events,
       'sources' => (object) $sources,
-    );
+    ];
 
     $result = $mc_lists->addWebhook($list_id, $url, $parameters);
 
     return $result->id;
   }
   catch (\Exception $e) {
-    \Drupal::logger('mailchimp')->error('An error occurred adding webhook for list {list}. "{message}"', array(
+    \Drupal::logger('mailchimp')->error('An error occurred adding webhook for list {list}. "{message}"', [
       'list' => $list_id,
       'message' => $e->getMessage(),
-    ));
+    ]);
 
     return FALSE;
   }
@@ -1029,10 +1029,10 @@
     return FALSE;
   }
   catch (\Exception $e) {
-    \Drupal::logger('mailchimp')->error('An error occurred deleting webhook for list {list}. "{message}"', array(
+    \Drupal::logger('mailchimp')->error('An error occurred deleting webhook for list {list}. "{message}"', [
       'list' => $list_id,
       'message' => $e->getMessage(),
-    ));
+    ]);
     return FALSE;
   }
 }
@@ -1072,7 +1072,7 @@
  * Implements hook_flush_caches().
  */
 function mailchimp_flush_caches() {
-  return array('mailchimp');
+  return ['mailchimp'];
 }
 
 /**
@@ -1116,11 +1116,11 @@
   }
 
   // Allow other modules to act on a webhook.
-  \Drupal::moduleHandler()->invokeAll('mailchimp_process_webhook', array($type, $data));
+  \Drupal::moduleHandler()->invokeAll('mailchimp_process_webhook', [$type, $data]);
 
   // Log event:
-  \Drupal::logger('mailchimp')->info('Webhook type {type} has been processed.', array(
-    'type' => $type));
+  \Drupal::logger('mailchimp')->info('Webhook type {type} has been processed.', [
+    'type' => $type]);
 
   return NULL;
 }
@@ -1165,15 +1165,15 @@
  * @return array
  *   A collection of form elements, one per interest group.
  */
-function mailchimp_interest_groups_form_elements($list, $defaults = array(), $email = NULL, $mode = 'default') {
-  $return = array();
+function mailchimp_interest_groups_form_elements($list, $defaults = [], $email = NULL, $mode = 'default') {
+  $return = [];
 
   if ($mode == 'hidden') {
     foreach ($list->intgroups as $group) {
-      $return[$group->id] = array(
+      $return[$group->id] = [
         '#type' => 'value',
-        '#value' => isset($defaults[$group->id]) ? $defaults[$group->id] : array(),
-      );
+        '#value' => isset($defaults[$group->id]) ? $defaults[$group->id] : [],
+      ];
     }
     return $return;
   }
@@ -1183,7 +1183,7 @@
       /* @var \Mailchimp\MailchimpLists $mc_lists */
       $mc_lists = mailchimp_get_api_object('MailchimpLists');
 
-      $interest_data = $mc_lists->getInterests($list->id, $group->id, array('count' => 500));
+      $interest_data = $mc_lists->getInterests($list->id, $group->id, ['count' => 500]);
 
       if (!empty($email)) {
         $memberinfo = mailchimp_get_memberinfo($list->id, $email);
@@ -1203,7 +1203,7 @@
           }
           else {
             $field_type = 'value';
-            $value = isset($defaults[$group->id]) ? $defaults[$group->id] : array();
+            $value = isset($defaults[$group->id]) ? $defaults[$group->id] : [];
           }
           break;
 
@@ -1220,12 +1220,12 @@
       }
 
       // Extract the field options:
-      $options = array();
+      $options = [];
       if ($field_type == 'select') {
         $options[''] = '-- select --';
       }
 
-      $default_values = array();
+      $default_values = [];
 
       // Set interest options and default values.
       foreach ($interest_data->interests as $interest) {
@@ -1249,14 +1249,14 @@
         }
       }
 
-      $return[$group->id] = array(
+      $return[$group->id] = [
         '#type' => $field_type,
         '#title' => $field_title,
         '#description' => $field_description,
         '#options' => $options,
-        '#default_value' => isset($default_values[$group->id]) ? $default_values[$group->id] : array(),
-        '#attributes' => array('class' => array('mailchimp-newsletter-interests-' . $list->id)),
-      );
+        '#default_value' => isset($default_values[$group->id]) ? $default_values[$group->id] : [],
+        '#attributes' => ['class' => ['mailchimp-newsletter-interests-' . $list->id]],
+      ];
       if ($value !== NULL) {
         $return[$group->id]['#value'] = $value;
       }
@@ -1281,11 +1281,11 @@
  */
 function mailchimp_insert_drupal_form_tag($mergevar) {
   // Insert common FormAPI properties:
-  $input = array(
+  $input = [
     '#weight' => $mergevar->display_order,
     '#required' => $mergevar->required,
     '#default_value' => $mergevar->default_value,
-  );
+  ];
 
   $input['#title'] = t((string) $mergevar->name);
 
@@ -1295,36 +1295,36 @@
       // https://apidocs.mailchimp.com/api/2.0/lists/subscribe.php
       $input['#type'] = 'container';
       $input['#tree'] = TRUE;
-      $input['addr1'] = array(
+      $input['addr1'] = [
         '#title' => t('Address 1'),
         '#type' => 'textfield',
-      );
-      $input['addr2'] = array(
+      ];
+      $input['addr2'] = [
         '#title' => t('Address 2'),
         '#type' => 'textfield',
-      );
-      $input['city'] = array(
+      ];
+      $input['city'] = [
         '#title' => t('City'),
         '#type' => 'textfield',
-      );
-      $input['state'] = array(
+      ];
+      $input['state'] = [
         '#title' => t('State'),
         '#type' => 'textfield',
         '#size' => 2,
         '#maxlength' => 2,
-      );
-      $input['zip'] = array(
+      ];
+      $input['zip'] = [
         '#title' => t('Zip'),
         '#type' => 'textfield',
         '#size' => 6,
         '#maxlength' => 6,
-      );
-      $input['country'] = array(
+      ];
+      $input['country'] = [
         '#title' => t('Country'),
         '#type' => 'textfield',
         '#size' => 2,
         '#maxlength' => 2,
-      );
+      ];
       break;
     case 'dropdown':
       // Dropdown is mapped to <select> element in Drupal Form API.
@@ -1332,7 +1332,7 @@
 
       // Creates options, we must delete array keys to have relevant information
       // on Mailchimp.
-      $choices = array();
+      $choices = [];
       foreach ($mergevar->options->choices as $choice) {
         $choices[$choice] = $choice;
       }
@@ -1347,7 +1347,7 @@
 
       // Creates options, we must delete array keys to have relevant information
       // on Mailchimp.
-      $choices = array();
+      $choices = [];
       foreach ($mergevar->options->choices as $choice) {
         $choices[$choice] = $choice;
       }
@@ -1365,7 +1365,7 @@
         $input['#type'] = 'textfield';
       };
       $input['#size'] = $mergevar->options->size;
-      $input['#element_validate'] = array('mailchimp_validate_email');
+      $input['#element_validate'] = ['mailchimp_validate_email'];
       break;
 
    case 'date':
@@ -1458,10 +1458,10 @@
           $connected_site = $mc_connected->getConnectedSite($connected_site_id);
           if (!empty($connected_site)) {
 
-            $mcjs = array(
+            $mcjs = [
               '#type' => 'markup',
               '#markup' => Markup::create($connected_site->site_script->fragment),
-            );
+            ];
 
             $page_bottom['mailchimp_connected'] = $mcjs;
           }
diff --git a/modules/mailchimp_campaign/mailchimp_campaign.module b/modules/mailchimp_campaign/mailchimp_campaign.module
index 582ec31..44873b7 100644
--- a/modules/mailchimp_campaign/mailchimp_campaign.module
+++ b/modules/mailchimp_campaign/mailchimp_campaign.module
@@ -15,7 +15,7 @@
     return;
   }
 
-  $ids = array();
+  $ids = [];
   if (!empty($entities)) {
     /* @var $campaign \Drupal\mailchimp_campaign\Entity\MailchimpCampaign */
     foreach ($entities as $campaign) {
@@ -48,17 +48,17 @@
  * Implements hook_theme().
  */
 function mailchimp_campaign_theme($existing, $type, $theme, $path) {
-  return array(
-    'mailchimp_campaign_node_campaigns_list' => array(
-      'variables' => array('node_campaigns' => array()),
-    ),
-    'mailchimp_campaign_mclinks' => array(
-      'variables' => array('data' => NULL),
-    ),
-    'mailchimp_campaign_actions' => array(
-      'variables' => array('campaign' => NULL),
-    ),
-  );
+  return [
+    'mailchimp_campaign_node_campaigns_list' => [
+      'variables' => ['node_campaigns' => []],
+    ],
+    'mailchimp_campaign_mclinks' => [
+      'variables' => ['data' => NULL],
+    ],
+    'mailchimp_campaign_actions' => [
+      'variables' => ['campaign' => NULL],
+    ],
+  ];
 }
 
 /**
@@ -83,9 +83,9 @@
     $content = mailchimp_campaign_render_template($template);
   }
   else {
-    $content = array(
+    $content = [
       'sections' => mailchimp_campaign_render_template($template),
-    );
+    ];
   }
 
   // Test for valid list segment, if selected.
@@ -96,14 +96,14 @@
   }
 
   // Build content parameters.
-  $content_parameters = array();
+  $content_parameters = [];
 
   if (!empty($template_id)) {
     // Use template sections as campaign content.
-    $content_parameters['template'] = (object) array(
+    $content_parameters['template'] = (object) [
       'id' => (int) $template_id,
       'sections' => (object) $content['sections'],
-    );
+    ];
   } else if (isset($content['html'])) {
     // Use HTML as campaign content.
     $content_parameters['html'] = $content['html'];
@@ -131,8 +131,8 @@
     }
     catch (\Exception $e) {
       \Drupal::messenger()->addError($e->getMessage());
-      \Drupal::logger('mailchimp_campaign')->error('An error occurred while creating this campaign: {message}', array(
-        'message' => $e->getMessage()));
+      \Drupal::logger('mailchimp_campaign')->error('An error occurred while creating this campaign: {message}', [
+        'message' => $e->getMessage()]);
       return NULL;
     }
 
@@ -155,17 +155,17 @@
       \Drupal::messenger()->addError($e->getMessage());
       \Drupal::logger('mailchimp_campaign')->error(
         'An error occurred while updating this campaign: @msg',
-        array('@msg' => $e->getMessage()));
+        ['@msg' => $e->getMessage()]);
       return NULL;
     }
   }
 
   if (!empty($result->id)) {
     \Drupal::messenger()->addStatus(t('Campaign %name (%cid) was successfully saved.',
-      array('%name' => $settings->title, '%cid' => $campaign_id)));
+      ['%name' => $settings->title, '%cid' => $campaign_id]));
 
     // Clear cached data for this campaign.
-    mailchimp_campaign_get_campaigns(array($campaign_id), TRUE);
+    mailchimp_campaign_get_campaigns([$campaign_id], TRUE);
   }
 
   return $campaign_id;
@@ -195,11 +195,11 @@
 
     if (($result->status == MAILCHIMP_STATUS_SENDING) || ($result->status == MAILCHIMP_STATUS_SENT)) {
       // Log action, and notify the user.
-      \Drupal::logger('mailchimp_campaign')->notice('Mailchimp campaign {name} has been sent.', array(
-        'name' => $campaign->label()));
+      \Drupal::logger('mailchimp_campaign')->notice('Mailchimp campaign {name} has been sent.', [
+        'name' => $campaign->label()]);
 
       $controller = \Drupal::entityTypeManager()->getStorage('mailchimp_campaign');
-      $controller->resetCache(array($campaign->getMcCampaignId()));
+      $controller->resetCache([$campaign->getMcCampaignId()]);
 
       $cache = \Drupal::cache('mailchimp');
 
@@ -212,9 +212,9 @@
   catch (\Exception $e) {
     \Drupal::messenger()->addError($e->getMessage());
     \Drupal::logger('mailchimp_campaign')
-      ->error('An error occurred while sending to this campaign: {message}', array(
+      ->error('An error occurred while sending to this campaign: {message}', [
         'message' => $e->getMessage()
-      ));
+      ]);
   }
   return FALSE;
 }
@@ -241,8 +241,8 @@
 
   catch (\Exception $e) {
     \Drupal::messenger()->addError($e->getMessage());
-    \Drupal::logger('mailchimp_campaign')->error('An error occurred while deleting this campaign: {message}', array(
-      'message' => $e->getMessage()));
+    \Drupal::logger('mailchimp_campaign')->error('An error occurred while deleting this campaign: {message}', [
+      'message' => $e->getMessage()]);
     return FALSE;
   }
 }
@@ -260,7 +260,7 @@
   $cache = \Drupal::cache('mailchimp');
   $cached_templates = $cache->get('templates');
 
-  $all_templates = array();
+  $all_templates = [];
 
   // Return cached lists.
   if (!$reset && !empty($cached_templates)) {
@@ -270,17 +270,17 @@
   else {
     /* @var \Mailchimp\MailchimpTemplates $mc_templates */
     if ($mc_templates = mailchimp_get_api_object('MailchimpTemplates')) {
-      $template_types = array(
+      $template_types = [
         'user' => 1,
         'base' => 1,
         'gallery' => 1,
-      );
+      ];
 
       foreach ($template_types as $type => $chosen) {
         if ($chosen) {
-          $all_templates[$type] = array();
+          $all_templates[$type] = [];
 
-          $response = $mc_templates->getTemplates(array('type' => $type));
+          $response = $mc_templates->getTemplates(['type' => $type]);
 
           foreach ($response->templates as $template) {
             $all_templates[$type][$template->id] = $template;
@@ -322,7 +322,7 @@
         /* @var \Mailchimp\MailchimpTemplates $mc_templates */
         if ($mc_templates = mailchimp_get_api_object('MailchimpTemplates')) {
           $template->info = $mc_templates->getTemplateContent($template_id);
-          $tags = array('cache_mailchimp');
+          $tags = ['cache_mailchimp'];
           \Drupal::cache()->set('template_' . $template_id, $template->info, CacheBackendInterface::CACHE_PERMANENT, $tags);
         }
       }
@@ -344,7 +344,7 @@
  *   Array of template content indexed by section ID.
  */
 function mailchimp_campaign_render_template($template) {
-  $content = array();
+  $content = [];
 
   foreach ($template as $key => $part) {
     if (isset($part['format'])) {
@@ -370,7 +370,7 @@
   $cache = \Drupal::cache('mailchimp');
   $cached_campaigns = $cache->get('campaigns');
 
-  $campaigns = array();
+  $campaigns = [];
   foreach ($mc_campaign_ids as $id) {
     if (!isset($cached_campaigns->data[$id])
       || ($cached_campaigns->data[$id]->status == MAILCHIMP_STATUS_SENDING)
@@ -393,8 +393,8 @@
     }
     catch (\Exception $e) {
       \Drupal::messenger()->addError($e->getMessage());
-      \Drupal::logger('mailchimp_campaign')->error('An error occurred while getting campaigns: {message}', array(
-        'message' => $e->getMessage()));
+      \Drupal::logger('mailchimp_campaign')->error('An error occurred while getting campaigns: {message}', [
+        'message' => $e->getMessage()]);
 
       return NULL;
     }
@@ -409,13 +409,13 @@
       }
       catch(Exception $e) {
         \Drupal::messenger()->addError(t('%message (Campaign %campaign_id removed from Mailchimp?)',
-          array(
+          [
             '%message' => $e->getMessage(),
             '%campaign_id' => $campaign_id,
-          )
+          ]
         ));
-        \Drupal::logger('mailchimp_campaign')->error('An error occurred while getting campaigns: {message}', array(
-          'message' => $e->getMessage()));
+        \Drupal::logger('mailchimp_campaign')->error('An error occurred while getting campaigns: {message}', [
+          'message' => $e->getMessage()]);
       }
     }
 
@@ -440,20 +440,20 @@
   /* @var \Mailchimp\MailchimpLists $mcapi */
   $mcapi = mailchimp_get_api_object('MailchimpLists');
 
-  $parameters = array(
+  $parameters = [
     'type' => $type,
     'count' => 500,
-  );
+  ];
 
   try {
     $response = $mcapi->getSegments($list_id, $parameters);
   }
   catch (\Exception $e) {
     \Drupal::messenger()->addError($e->getMessage());
-    \Drupal::logger('mailchimp_campaign')->error('An error occurred getting list segments for list ID {list_id}: {message} ', array(
+    \Drupal::logger('mailchimp_campaign')->error('An error occurred getting list segments for list ID {list_id}: {message} ', [
       'list_id' => $list_id,
       'message' => $e->getMessage(),
-    ));
+    ]);
 
     return NULL;
   }
@@ -477,12 +477,12 @@
   $mc_lists = mailchimp_get_api_object('MailchimpLists');
 
   try {
-    $result = $mc_lists->getSegmentMembers($list_id, $list_segment_id, array('count' => 500));
+    $result = $mc_lists->getSegmentMembers($list_id, $list_segment_id, ['count' => 500]);
   }
   catch (\Exception $e) {
     \Drupal::messenger()->addError($e->getMessage());
-    \Drupal::logger('mailchimp_campaign')->error('An error occurred testing a list segment: {message}', array(
-      'message' => $e->getMessage()));
+    \Drupal::logger('mailchimp_campaign')->error('An error occurred testing a list segment: {message}', [
+      'message' => $e->getMessage()]);
 
     return NULL;
   }
@@ -493,7 +493,7 @@
 /**
  * Loads multiple campaigns.
  */
-function mailchimp_campaign_load_multiple($campaign_ids = array(), $reset = FALSE) {
+function mailchimp_campaign_load_multiple($campaign_ids = [], $reset = FALSE) {
   if (empty($campaign_ids)) {
     $campaign_ids = Drupal::entityQuery('mailchimp_campaign')
       ->sort('created', 'DESC')
diff --git a/modules/mailchimp_campaign/src/Controller/MailchimpCampaignController.php b/modules/mailchimp_campaign/src/Controller/MailchimpCampaignController.php
index 4a1212a..cbe2489 100644
--- a/modules/mailchimp_campaign/src/Controller/MailchimpCampaignController.php
+++ b/modules/mailchimp_campaign/src/Controller/MailchimpCampaignController.php
@@ -108,13 +108,13 @@
    * {@inheritdoc}
    */
   public function overview() {
-    $content = array();
+    $content = [];
 
-    $content['campaigns_table'] = array(
+    $content['campaigns_table'] = [
       '#type' => 'table',
-      '#header' => array($this->t('Title'), $this->t('Subject'), $this->t('Status'), $this->t('Mailchimp Audience'), $this->t('Mailchimp Template'), $this->t('Created'), $this->t('Actions')),
+      '#header' => [$this->t('Title'), $this->t('Subject'), $this->t('Status'), $this->t('Mailchimp Audience'), $this->t('Mailchimp Template'), $this->t('Created'), $this->t('Actions')],
       '#empty' => '',
-    );
+    ];
 
     try {
       $campaigns = mailchimp_campaign_load_multiple();
@@ -140,9 +140,9 @@
       $campaign_id = $campaign->getMcCampaignId();
 
       $archive_url = Url::fromUri($campaign->mc_data->archive_url);
-      $campaign_url = Url::fromRoute('entity.mailchimp_campaign.view', array('mailchimp_campaign' => $campaign_id));
-      $list_url = Url::fromUri('https://admin.mailchimp.com/lists/dashboard/overview?id=' . $campaign->list->id, array('attributes' => array('target' => '_blank')));
-      $send_url = Url::fromRoute('entity.mailchimp_campaign.send', array('mailchimp_campaign' => $campaign_id));
+      $campaign_url = Url::fromRoute('entity.mailchimp_campaign.view', ['mailchimp_campaign' => $campaign_id]);
+      $list_url = Url::fromUri('https://admin.mailchimp.com/lists/dashboard/overview?id=' . $campaign->list->id, ['attributes' => ['target' => '_blank']]);
+      $send_url = Url::fromRoute('entity.mailchimp_campaign.send', ['mailchimp_campaign' => $campaign_id]);
 
       if ($campaign->mc_data->status === "save") {
         $send_link = Link::fromTextAndUrl($this->t("Send"), $send_url)->toString();
@@ -150,7 +150,7 @@
       // "Sent" campaigns were not being cached, so we needed to reload to get
       // the latest status.
       elseif ($campaign->mc_data->status === "sending") {
-        $campaigns = mailchimp_campaign_load_multiple(array($campaign_id), TRUE);
+        $campaigns = mailchimp_campaign_load_multiple([$campaign_id], TRUE);
         $campaign = $campaigns[$campaign_id];
         $send_link = $this->t("Sent");
       }
@@ -159,39 +159,39 @@
       }
 
 
-      $actions = array(
+      $actions = [
         Link::fromTextAndUrl(('View Archive'), $archive_url)->toString(),
         Link::fromTextAndUrl(('View'), $campaign_url)->toString(),
         $send_link,
-      );
+      ];
 
-      $content['campaigns_table'][$campaign_id]['title'] = array(
+      $content['campaigns_table'][$campaign_id]['title'] = [
         '#markup' => Link::fromTextAndUrl($campaign->mc_data->settings->title, $campaign_url)->toString(),
-      );
+      ];
 
-      $content['campaigns_table'][$campaign_id]['subject'] = array(
+      $content['campaigns_table'][$campaign_id]['subject'] = [
         '#markup' => $campaign->mc_data->settings->subject_line,
-      );
+      ];
 
-      $content['campaigns_table'][$campaign_id]['status'] = array(
+      $content['campaigns_table'][$campaign_id]['status'] = [
         '#markup' => $campaign->mc_data->status,
-      );
+      ];
 
-      $content['campaigns_table'][$campaign_id]['list'] = array(
+      $content['campaigns_table'][$campaign_id]['list'] = [
         '#markup' => Link::fromTextAndUrl($campaign->list->name, $list_url)->toString(),
-      );
+      ];
 
       if (empty($campaign->mc_data->settings->template_id)) {
-        $content['campaigns_table'][$campaign_id]['template'] = array(
+        $content['campaigns_table'][$campaign_id]['template'] = [
           '#markup' => "-- none --",
-        );
+        ];
       }
       else {
-        $template_url = Url::fromUri('https://admin.mailchimp.com/templates/edit?id=' . $campaign->mc_data->settings->template_id, array('attributes' => array('target' => '_blank')));
+        $template_url = Url::fromUri('https://admin.mailchimp.com/templates/edit?id=' . $campaign->mc_data->settings->template_id, ['attributes' => ['target' => '_blank']]);
         $category = FALSE;
         // Templates are grouped into categories, so we go hunting for our
         // template ID in each category.
-        $template_category = array();
+        $template_category = [];
         foreach($templates as $category_name => $template_category) {
           if (isset($template_category[$campaign->mc_data->settings->template_id])) {
             $category = $category_name;
@@ -199,35 +199,35 @@
           }
         }
         if ($category) {
-          $content['campaigns_table'][$campaign_id]['template'] = array(
+          $content['campaigns_table'][$campaign_id]['template'] = [
             '#markup' => Link::fromTextAndUrl($template_category[$campaign->mc_data->settings->template_id]->name, $template_url)->toString(),
-          );
+          ];
         }
         else {
-          $content['campaigns_table'][$campaign_id]['template'] = array(
+          $content['campaigns_table'][$campaign_id]['template'] = [
             '#markup' => $this->t('-- template %template_url not found --',
-            array(
+            [
               '%template_url' => Link::fromTextAndUrl($campaign->mc_data->settings->template_id, $template_url)->toString(),
-            )),
-          );
+            ]),
+          ];
         }
       }
-      $content['campaigns_table'][$campaign_id]['created'] = array(
+      $content['campaigns_table'][$campaign_id]['created'] = [
         '#markup' => $this->dateFormatter->format(strtotime($campaign->mc_data->create_time), 'custom', 'F j, Y - g:ia'),
-      );
+      ];
 
-      $content['campaigns_table'][$campaign_id]['actions'] = array(
+      $content['campaigns_table'][$campaign_id]['actions'] = [
         '#markup' => implode(' | ', $actions),
-      );
+      ];
     }
 
-    $mailchimp_campaigns_url = Url::fromUri('https://admin.mailchimp.com/campaigns', array('attributes' => array('target' => '_blank')));
+    $mailchimp_campaigns_url = Url::fromUri('https://admin.mailchimp.com/campaigns', ['attributes' => ['target' => '_blank']]);
 
-    $content['mailchimp_list_link'] = array(
+    $content['mailchimp_list_link'] = [
       '#title' => $this->t('Go to Mailchimp Campaigns'),
       '#type' => 'link',
       '#url' => $mailchimp_campaigns_url,
-    );
+    ];
 
     return $content;
   }
@@ -259,7 +259,7 @@
    *   Renderable array of page content.
    */
   public function stats(MailchimpCampaign $mailchimp_campaign) {
-    $content = array();
+    $content = [];
 
     /* @var \Mailchimp\MailchimpReports $mc_reports */
     $mc_reports = mailchimp_get_api_object('MailchimpReports');
@@ -273,9 +273,9 @@
     } catch (\Exception $e) {
       $this->messenger->addError($this->t($e->getMessage()));
       $this->logger
-        ->error('An error occurred getting report data from Mailchimp: {message}', array(
+        ->error('An error occurred getting report data from Mailchimp: {message}', [
           'message' => $e->getMessage()
-        ));
+        ]);
     }
 
     if (!empty($response)) {
@@ -284,70 +284,70 @@
       $content['#attached']['library'][] = 'mailchimp_campaign/campaign-stats';
 
       // Time series chart data.
-      $content['#attached']['drupalSettings']['mailchimp_campaign'] = array(
-        'stats' => array(),
-      );
+      $content['#attached']['drupalSettings']['mailchimp_campaign'] = [
+        'stats' => [],
+      ];
 
       foreach ($response->timeseries as $series) {
-        $content['#attached']['drupalSettings']['mailchimp_campaign']['stats'][] = array(
+        $content['#attached']['drupalSettings']['mailchimp_campaign']['stats'][] = [
           'timestamp' => $series->timestamp,
           'emails_sent' => isset($series->emails_sent) ? $series->emails_sent : 0,
           'unique_opens' => $series->unique_opens,
           'recipients_click' => isset($series->recipients_click) ? $series->recipients_click : 0,
-        );
+        ];
       }
 
-      $content['charts'] = array(
+      $content['charts'] = [
         '#prefix' => '<h2>' . $this->t('Hourly stats for the first 24 hours of the campaign') . '</h2>',
         '#markup' => '<div id="mailchimp-campaign-chart"></div>',
-      );
+      ];
 
-      $content['metrics_table'] = array(
+      $content['metrics_table'] = [
         '#type' => 'table',
-        '#header' => array($this->t('Key'), $this->t('Value')),
+        '#header' => [$this->t('Key'), $this->t('Value')],
         '#empty' => '',
         '#prefix' => '<h2>' . $this->t('Other campaign metrics') . '</h2>',
-      );
+      ];
 
-      $stat_groups = array(
+      $stat_groups = [
         'bounces',
         'forwards',
         'opens',
         'clicks',
         'facebook_likes',
         'list_stats'
-      );
+      ];
 
       foreach ($stat_groups as $group) {
-        $content['metrics_table'][] = array(
-          'key' => array(
+        $content['metrics_table'][] = [
+          'key' => [
             '#markup' => '<strong>' . ucfirst(str_replace('_', ' ', $group)) . '</strong>',
-          ),
-          'value' => array(
+          ],
+          'value' => [
             '#markup' => ''
-          ),
-        );
+          ],
+        ];
 
         foreach ($response->{$group} as $key => $value) {
           if ($key == "last_open" && !empty($value)) {
             $value = $this->dateFormatter->format(strtotime($value) ,'custom','F j, Y - g:ia') ;
           }
 
-          $content['metrics_table'][] = array(
-            'key' => array(
+          $content['metrics_table'][] = [
+            'key' => [
               '#markup' => $key,
-            ),
-            'value' => array(
+            ],
+            'value' => [
               '#markup' => $value
-            ),
-          );
+            ],
+          ];
         }
       }
     }
     else {
-      $content['unavailable'] = array(
+      $content['unavailable'] = [
         '#markup' => 'The campaign stats are unavailable at this time.',
-      );
+      ];
     }
 
     return $content;
@@ -371,7 +371,7 @@
 
     $entity_ids = $query->execute();
 
-    $entities = array();
+    $entities = [];
 
     if (!empty($entity_ids)) {
       $entities_data = entity_load_multiple($entity_type, $entity_ids);
@@ -381,10 +381,10 @@
         foreach ($entities_data as $id => $entity) {
           $title = $entity->getTypedData()->getString('title');
 
-          $entities[] = array(
+          $entities[] = [
             'value' => $title . ' [' . $id . ']',
             'label' => Html::escape($title),
-          );
+          ];
         }
       }
     }
diff --git a/modules/mailchimp_campaign/src/Entity/MailchimpCampaign.php b/modules/mailchimp_campaign/src/Entity/MailchimpCampaign.php
index a8d4197..891938c 100644
--- a/modules/mailchimp_campaign/src/Entity/MailchimpCampaign.php
+++ b/modules/mailchimp_campaign/src/Entity/MailchimpCampaign.php
@@ -89,7 +89,7 @@
    * in the GUI. The behaviour of the widgets used can be determined here.
    */
   public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
-    $fields = array();
+    $fields = [];
 
     // Standard field, used as unique if primary index.
     $fields['mc_campaign_id'] = BaseFieldDefinition::create('string')
@@ -107,11 +107,11 @@
       ->setLabel(t('Template'))
       ->setDescription(t('Campaign body template.'))
       ->setSetting('case_sensitive', TRUE)
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string_long',
         'weight' => 0,
-      ));
+      ]);
 
     $fields['created'] = BaseFieldDefinition::create('created')
       ->setLabel(t('Created'))
diff --git a/modules/mailchimp_campaign/src/Entity/MailchimpCampaignViewBuilder.php b/modules/mailchimp_campaign/src/Entity/MailchimpCampaignViewBuilder.php
index 2bfc62a..f453157 100644
--- a/modules/mailchimp_campaign/src/Entity/MailchimpCampaignViewBuilder.php
+++ b/modules/mailchimp_campaign/src/Entity/MailchimpCampaignViewBuilder.php
@@ -104,9 +104,9 @@
       }
     }
 
-    $list_url = Url::fromUri('https://admin.mailchimp.com/lists/dashboard/overview?id=' . $entity->list->id, array('attributes' => array('target' => '_blank')));
-    $archive_url = Url::fromUri($entity->mc_data->archive_url, array(
-      'attributes' => array('target' => '_blank')));
+    $list_url = Url::fromUri('https://admin.mailchimp.com/lists/dashboard/overview?id=' . $entity->list->id, ['attributes' => ['target' => '_blank']]);
+    $archive_url = Url::fromUri($entity->mc_data->archive_url, [
+      'attributes' => ['target' => '_blank']]);
     $send_time = 'N/A';
 
     if (isset($entity->mc_data->send_time) && $entity->mc_data->send_time) {
@@ -114,68 +114,68 @@
         ->format(strtotime($entity->mc_data->send_time), 'custom', 'F j, Y - g:ia');
     }
 
-    $fields = array(
-      'title' => array(
+    $fields = [
+      'title' => [
         'label' => $this->t('Title'),
         'value' => $entity->mc_data->settings->title,
-      ),
+      ],
 
-      'subject' => array(
+      'subject' => [
         'label' => $this->t('Subject'),
         'value' => $entity->mc_data->settings->subject_line,
-      ),
-      'list' => array(
+      ],
+      'list' => [
         'label' => $this->t('Mailchimp Audience'),
         'value' => Link::fromTextAndUrl($entity->list->name, $list_url)->toString(),
-      ),
-      'list_segment' => array(
+      ],
+      'list_segment' => [
         'label' => $this->t('Audience Tags'),
         'value' => $list_segment_name,
-      ),
-      'from_email' => array(
+      ],
+      'from_email' => [
         'label' => $this->t('From Email'),
         'value' => $entity->mc_data->settings->reply_to,
-      ),
-      'from_name' => array(
+      ],
+      'from_name' => [
         'label' => $this->t('From Name'),
         'value' => $entity->mc_data->settings->from_name,
-      ),
-      'template' => array(
+      ],
+      'template' => [
         'label' => $this->t('Template'),
         'value' => $mc_template_name,
-      ),
-      'type' => array(
+      ],
+      'type' => [
         'label' => $this->t('Audience type'),
         'value' => $entity->mc_data->type,
-      ),
-      'status' => array(
+      ],
+      'status' => [
         'label' => $this->t('Status'),
         'value' => $entity->mc_data->status,
-      ),
-      'emails_sent' => array(
+      ],
+      'emails_sent' => [
         'label' => $this->t('Emails sent'),
         'value' => $entity->mc_data->emails_sent,
-      ),
-      'send_time' => array(
+      ],
+      'send_time' => [
         'label' => $this->t('Send time'),
         'value' => $send_time,
-      ),
-      'content' => array(
+      ],
+      'content' => [
         'label' => $this->t('Rendered template HTML (@archive)',
-          array(
+          [
             '@archive' => Link::fromTextAndUrl('View Mailchimp archive', $archive_url)->toString(),
-            )
+            ]
           ),
         'value' => $rendered,
-      ),
-    );
+      ],
+    ];
 
     foreach ($fields as $key => $field) {
-      $build[$key] = array(
+      $build[$key] = [
         '#prefix' => "<div class=\"field campaign-{$key}\"><h3 class=\"field-label\">{$field['label']}</h3>",
         '#markup' => "<p>{$field['value']}</p>",
         '#suffix' => '</div>',
-      );
+      ];
     }
 
     return $build;
@@ -191,7 +191,7 @@
    *   Array of template content indexed by section ID.
    */
   private function renderTemplate($template) {
-    $content = array();
+    $content = [];
     foreach ($template as $key => $part) {
       if (isset($part['format'])) {
         $content[$key] = check_markup($part['value'], $part['format']);
diff --git a/modules/mailchimp_campaign/src/Form/MailchimpCampaignDeleteForm.php b/modules/mailchimp_campaign/src/Form/MailchimpCampaignDeleteForm.php
index 6172508..5c69730 100644
--- a/modules/mailchimp_campaign/src/Form/MailchimpCampaignDeleteForm.php
+++ b/modules/mailchimp_campaign/src/Form/MailchimpCampaignDeleteForm.php
@@ -46,7 +46,7 @@
    */
   public function getQuestion() {
     return $this->t('Are you sure you want to delete %name?',
-      array('%name' => $this->entity->label()));
+      ['%name' => $this->entity->label()]);
   }
 
   /**
@@ -75,7 +75,7 @@
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
     if (mailchimp_campaign_delete_campaign($this->entity)) {
-      $this->messenger->addStatus($this->t('Mailchimp Campaign %label has been deleted.', array('%label' => $this->entity->label())));
+      $this->messenger->addStatus($this->t('Mailchimp Campaign %label has been deleted.', ['%label' => $this->entity->label()]));
     }
 
     $form_state->setRedirectUrl($this->getCancelUrl());
diff --git a/modules/mailchimp_campaign/src/Form/MailchimpCampaignForm.php b/modules/mailchimp_campaign/src/Form/MailchimpCampaignForm.php
index b68f25c..de17085 100644
--- a/modules/mailchimp_campaign/src/Form/MailchimpCampaignForm.php
+++ b/modules/mailchimp_campaign/src/Form/MailchimpCampaignForm.php
@@ -122,38 +122,38 @@
 
     $form_state->set('campaign', $campaign);
 
-    $form['title'] = array(
+    $form['title'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Title'),
       '#description' => $this->t('An internal name to use for this campaign. By default, the campaign subject will be used.'),
       '#required' => FALSE,
       '#default_value' => (!empty($campaign->mc_data)) ? $campaign->mc_data->settings->title : '',
-    );
-    $form['subject'] = array(
+    ];
+    $form['subject'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Subject'),
       '#required' => TRUE,
       '#default_value' => (!empty($campaign->mc_data)) ? $campaign->mc_data->settings->subject_line : '',
-    );
-    $form['preview_text'] = array(
+    ];
+    $form['preview_text'] = [
       '#type' => 'textfield',
       '#title' => t('Preview text'),
       '#description' => t('Text that shows as preview in e-mail clients, but not in the mail itself.'),
       '#required' => FALSE,
       '#default_value' => (!empty($campaign->mc_data)) ? $campaign->mc_data->settings->preview_text : '',
-    );
+    ];
     $mailchimp_lists = mailchimp_get_lists();
-    $form['list_id'] = array(
+    $form['list_id'] = [
       '#type' => 'select',
       '#title' => $this->t('Audience'),
       '#description' => $this->t('Select the audience this campaign should be sent to.'),
       '#options' => $this->buildOptionList($mailchimp_lists),
       '#default_value' => (!empty($campaign->mc_data)) ? $campaign->mc_data->recipients->list_id : -1,
       '#required' => TRUE,
-      '#ajax' => array(
+      '#ajax' => [
         'callback' => 'Drupal\mailchimp_campaign\Form\MailchimpCampaignForm::listSegmentCallback',
-      ),
-    );
+      ],
+    ];
 
     if (!empty($form_state->getValue('list_id'))) {
       $list_id = $form_state->getValue('list_id');
@@ -165,16 +165,16 @@
       }
     }
 
-    $list_segments = array();
+    $list_segments = [];
     if (isset($list_id)) {
       $list_segments = mailchimp_campaign_get_list_segments($list_id, NULL);
     }
 
-    $form['list_segment_id'] = array(
+    $form['list_segment_id'] = [
       '#type' => 'select',
       '#title' => $this->t('Audience Tags'),
       '#description' => $this->t('Select the audience tags this campaign should be sent to.'),
-    );
+    ];
     if (!empty($list_segments)) {
       $form['list_segment_id']['#options'] = $this->buildOptionList($list_segments, '-- Entire list --');
       $form['list_segment_id']['#default_value'] = (isset($segment_id)) ? $segment_id : '';
@@ -183,7 +183,7 @@
     $form['list_segment_id']['#prefix'] = '<div id="list-segments-wrapper">';
     $form['list_segment_id']['#suffix'] = '</div>';
 
-    $form['from_email'] = array(
+    $form['from_email'] = [
       '#type' => 'textfield',
       '#title' => $this->t('From Email'),
       '#description' => $this->t('the From: email address for your campaign message.'),
@@ -191,8 +191,8 @@
       '#size' => 40,
       '#maxlength' => 255,
       '#required' => TRUE,
-    );
-    $form['from_name'] = array(
+    ];
+    $form['from_name'] = [
       '#type' => 'textfield',
       '#title' => $this->t('From Name'),
       '#description' => $this->t('the From: name for your campaign message (not an email address)'),
@@ -200,31 +200,31 @@
       '#size' => 40,
       '#maxlength' => 255,
       '#required' => TRUE,
-    );
-    $template_type_labels = array(
+    ];
+    $template_type_labels = [
       'user' => 'My Custom Templates',
       'basic' => 'Basic Templates',
       'gallery' => 'Themes',
-    );
+    ];
 
-    $form['template_id'] = array(
+    $form['template_id'] = [
       '#type' => 'select',
       '#title' => $this->t('Template'),
       '#description' => $this->t('Select a Mailchimp user template to use. Due to a limitation in the API, only templates that do not contain repeating sections are available. If empty, the default template will be applied.'),
       '#options' => $this->buildOptionList(mailchimp_campaign_list_templates(), '-- Select --', $template_type_labels),
       '#default_value' => (!empty($campaign->mc_data)) ? $campaign->mc_data->settings->template_id : -1,
-      '#ajax' => array(
+      '#ajax' => [
         'callback' => 'Drupal\mailchimp_campaign\Form\MailchimpCampaignForm::templateCallback',
-      ),
-    );
+      ],
+    ];
 
-    $form['content'] = array(
+    $form['content'] = [
       '#id' => 'content-sections',
       '#type' => 'fieldset',
       '#title' => $this->t('Content sections'),
       '#description' => $this->t('The HTML content or, if a template is selected, the content for each section.'),
       '#tree' => TRUE,
-    );
+    ];
 
     $mc_template = NULL;
     if (!empty($form_state->getValue('template_id'))) {
@@ -237,11 +237,11 @@
     }
 
     if (isset($list_id)) {
-      $merge_vars_list = mailchimp_get_mergevars(array($list_id));
+      $merge_vars_list = mailchimp_get_mergevars([$list_id]);
       $merge_vars = $merge_vars_list[$list_id];
     }
     else {
-      $merge_vars = array();
+      $merge_vars = [];
     }
 
     $campaign_template = $campaign->getTemplate();
@@ -266,17 +266,17 @@
           $default_value = $campaign_template[$section]['value'];
           $format = $campaign_template[$section]['format'];
         }
-        $form['content'][$section . '_wrapper'] = array(
+        $form['content'][$section . '_wrapper'] = [
           '#type' => 'details',
           '#title' => Html::escape(ucfirst($section)),
           '#open' => FALSE,
-        );
-        $form['content'][$section . '_wrapper'][$section] = array(
+        ];
+        $form['content'][$section . '_wrapper'][$section] = [
           '#type' => 'text_format',
           '#format' => $format,
           '#title' => Html::escape(ucfirst($section)),
           '#default_value' => $default_value,
-        );
+        ];
 
         if (isset($campaign_content[$section . '_wrapper']['entity_import']['entity_type'])) {
           $entity_type = $campaign_content[$section . '_wrapper']['entity_import']['entity_type'];
@@ -292,19 +292,19 @@
     else {
       $section = 'html';
 
-      $form['content']['html_wrapper'] = array(
+      $form['content']['html_wrapper'] = [
         '#type' => 'details',
         '#title' => $this->t('Content'),
         '#open' => FALSE,
-      );
-      $form['content']['html_wrapper']['html'] = array(
+      ];
+      $form['content']['html_wrapper']['html'] = [
         '#type' => 'text_format',
         '#format' => ($campaign_template != NULL) ? $campaign_template['html']['format'] : 'mailchimp_campaign',
         '#title' => $this->t('Content'),
         '#description' => $this->t('The HTML content of the campaign.'),
         '#access' => empty($form_state->getValue('template_id')),
         '#default_value' => ($campaign_template != NULL) ? $campaign_template['html']['value'] : '',
-      );
+      ];
 
       if (isset($campaign_content[$section . '_wrapper']['entity_import']['entity_type'])) {
         $entity_type = $campaign_content[$section . '_wrapper']['entity_import']['entity_type'];
@@ -318,14 +318,14 @@
 
     // Message preview:
     if (!empty($form_state->getValue('mailchimp_campaign_campaign_preview'))) {
-      $form['preview_wrapper'] = array(
+      $form['preview_wrapper'] = [
         '#title' => $this->t('Campaign content preview'),
         '#type' => 'details',
         '#open' => TRUE,
-      );
-      $form['preview_wrapper']['preview'] = array(
+      ];
+      $form['preview_wrapper']['preview'] = [
         '#markup' => $form_state->getValue('mailchimp_campaign_campaign_preview'),
-      );
+      ];
     }
 
     return $form;
@@ -339,11 +339,11 @@
 
     $actions['submit']['#value'] = $this->t('Save as draft');
 
-    $actions['preview'] = array(
+    $actions['preview'] = [
       '#type' => 'submit',
       '#value' => $this->t('Preview content'),
-      '#submit' => array('::submitForm', '::preview'),
-    );
+      '#submit' => ['::submitForm', '::preview'],
+    ];
 
     return $actions;
   }
@@ -354,23 +354,23 @@
   public function save(array $form, FormStateInterface $form_state) {
     $values = $form_state->getValues();
 
-    $recipients = (object) array(
+    $recipients = (object) [
       'list_id' => $values['list_id'],
-    );
+    ];
 
     if (isset($values['list_segment_id']) && !empty($values['list_segment_id'])) {
-      $recipients->segment_opts = (object) array(
+      $recipients->segment_opts = (object) [
         'saved_segment_id' => (int) $values['list_segment_id'],
-      );
+      ];
     }
 
-    $settings = (object) array(
+    $settings = (object) [
       'subject_line' => $values['subject'],
       'title' => $values['title'],
       'from_name' => Html::escape($values['from_name']),
       'reply_to' => $values['from_email'],
       'preview_text' => $values['preview_text'],
-    );
+    ];
 
     $template_content = $this->parseTemplateContent($form_state->getValue('content'));
 
@@ -491,8 +491,8 @@
    * @return array
    *   Associative array of item IDs to name.
    */
-  private function buildOptionList($list, $no_selection_label = '-- Select --', $labels = array()) {
-    $options = array();
+  private function buildOptionList($list, $no_selection_label = '-- Select --', $labels = []) {
+    $options = [];
     if ($no_selection_label) {
       $options[''] = $no_selection_label;
     }
@@ -524,9 +524,9 @@
    *   Associative array of entity IDs to name.
    */
   private function buildEntityOptionList($entity_info) {
-    $options = array(
+    $options = [
       '' => '-- Select --',
-    );
+    ];
 
     foreach ($entity_info as $entity_id => $entity_data) {
       // Exclude Mailchimp entities.
@@ -548,7 +548,7 @@
    *   Associative array of view mode IDs to name.
    */
   private function buildEntityViewModeOptionList($entity_type) {
-    $options = array();
+    $options = [];
 
     $view_modes = $this->entityDisplayRepository->getViewModes($entity_type);
 
@@ -571,86 +571,86 @@
    *   Array of form elements used to display entity imports.
    */
   private function getEntityImportFormElements($entity_type, $section) {
-    $form = array();
+    $form = [];
 
     // Get available entity types.
     $entity_info = $this->getEntitiesForContentImport();
     $entity_options = $this->buildEntityOptionList($entity_info);
 
-    $form['entity_import'] = array(
+    $form['entity_import'] = [
       '#id' => 'entity-import',
       '#type' => 'details',
       '#title' => $this->t('Insert site content'),
       '#description' => $this->t('<b>For use only with text filters that use the Mailchimp Campaign filter</b><br />You can insert an entity of a given type and pick the view mode that will be rendered within this campaign section.'),
       '#open' => FALSE,
-    );
+    ];
 
-    $form['entity_import']['entity_type'] = array(
+    $form['entity_import']['entity_type'] = [
       '#type' => 'select',
       '#title' => $this->t('Entity Type'),
       '#options' => $entity_options,
       '#default_value' => $entity_type,
-      '#ajax' => array(
+      '#ajax' => [
         'callback' => 'Drupal\mailchimp_campaign\Form\MailchimpCampaignForm::entityTypeCallback',
         'wrapper' => $section . '-content-entity-lookup-wrapper',
-      ),
-    );
+      ],
+    ];
     $form['entity_import']['entity_type']['#attributes']['class'][] = $section . '-entity-import-entity-type';
 
-    $form['entity_import']['entity_import_wrapper'] = array(
+    $form['entity_import']['entity_import_wrapper'] = [
       '#type' => 'container',
-      '#attributes' => array(
+      '#attributes' => [
         'id' => $section . '-content-entity-lookup-wrapper',
-      ),
-    );
+      ],
+    ];
 
     if ($entity_type != NULL) {
       // Get available entity view modes.
       $entity_view_mode_options = $this->buildEntityViewModeOptionList($entity_type);
 
-      $form['entity_import']['entity_id'] = array(
+      $form['entity_import']['entity_id'] = [
         '#type' => 'textfield',
         '#title' => $this->t('Entity Title'),
         '#maxlength' => 255,
         // Pass entity type as first parameter to autocomplete callback.
         '#autocomplete_route_name' => 'mailchimp_campaign.entity_autocomplete',
-        '#autocomplete_route_parameters' => array(
+        '#autocomplete_route_parameters' => [
           'entity_type' => $entity_type,
-        ),
-      );
+        ],
+      ];
       $form['entity_import']['entity_id']['#attributes']['id'] = $section . '-entity-import-entity-id';
 
-      $form['entity_import']['entity_view_mode'] = array(
+      $form['entity_import']['entity_view_mode'] = [
         '#type' => 'select',
         '#title' => $this->t('View Mode'),
         '#options' => $entity_view_mode_options,
-        '#attributes' => array(
+        '#attributes' => [
           'id' => $section . '-entity-import-entity-view-mode',
-        ),
-      );
+        ],
+      ];
     }
 
-    $form['entity_import']['entity_import_link'] = array(
+    $form['entity_import']['entity_import_link'] = [
       '#type' => 'item',
       '#markup' => '<a id="' . $section . '-add-entity-token-link" class="add-entity-token-link" href="javascript:void(0);">' . $this->t('Insert entity token') . '</a>',
-      '#states' => array(
-        'invisible' => array(
-          ':input[name="content[' . $section . '_wrapper][entity_import][entity_type]"]' => array('value' => ''),
-        ),
-      ),
-    );
+      '#states' => [
+        'invisible' => [
+          ':input[name="content[' . $section . '_wrapper][entity_import][entity_type]"]' => ['value' => ''],
+        ],
+      ],
+    ];
 
-    $form['entity_import']['entity_import_tag'] = array(
+    $form['entity_import']['entity_import_tag'] = [
       '#type' => 'container',
-      '#attributes' => array(
+      '#attributes' => [
         'id' => $section . '-entity-import-tag-field',
-      ),
-      '#states' => array(
-        'invisible' => array(
-          ':input[name="content[' . $section . '_wrapper][entity_import][entity_type]"]' => array('value' => ''),
-        ),
-      ),
-    );
+      ],
+      '#states' => [
+        'invisible' => [
+          ':input[name="content[' . $section . '_wrapper][entity_import][entity_type]"]' => ['value' => ''],
+        ],
+      ],
+    ];
 
     return $form;
   }
@@ -667,7 +667,7 @@
   private function getEntitiesForContentImport() {
     $entity_info = $this->entityTypeManager->getDefinitions();
 
-    $filtered_entities = array();
+    $filtered_entities = [];
 
     foreach ($entity_info as $key => $entity) {
       $entity_keys = $entity->getKeys();
@@ -695,31 +695,31 @@
    *   Array of form elements used to display merge vars.
    */
   private function getMergeVarsFormElements($merge_vars, $list_name) {
-    $form = array();
+    $form = [];
 
-    $form['merge_vars'] = array(
+    $form['merge_vars'] = [
       '#type' => 'container',
-      '#attributes' => array(
-        'class' => array(
+      '#attributes' => [
+        'class' => [
           'merge-vars-wrapper'
-        ),
-      ),
-    );
+        ],
+      ],
+    ];
 
-    $merge_vars_url = Url::fromUri('https://admin.mailchimp.com/lists/', array('attributes' => array('target' => '_blank')));
+    $merge_vars_url = Url::fromUri('https://admin.mailchimp.com/lists/', ['attributes' => ['target' => '_blank']]);
 
-    $form['merge_vars']['content'] = array(
+    $form['merge_vars']['content'] = [
       '#type' => 'item',
       '#title' => 'Mailchimp merge variables',
       '#markup' => $this->buildMergeVarsHtml($merge_vars),
       '#description' => $this->t(
         'Insert merge variables from the %list_name audience or one of the @standard_link.',
-        array(
+        [
           '%list_name' => $list_name,
           '@standard_link' => Link::fromTextAndUrl($this->t('standard Mailchimp merge variables'), $merge_vars_url)->toString(),
-        )
+        ]
       ),
-    );
+    ];
 
     return $form;
   }
@@ -735,22 +735,22 @@
    */
   private function buildMergeVarsHtml($merge_vars) {
     if (!empty($merge_vars)) {
-      $element = array();
+      $element = [];
 
-      $element['mergevars_table'] = array(
+      $element['mergevars_table'] = [
         '#type' => 'table',
         '#empty' => '',
-      );
+      ];
 
       foreach ($merge_vars as $var) {
-        $element['mergevars_table'][$var->name] = array(
+        $element['mergevars_table'][$var->name] = [
           '#markup' => $var->name,
-        );
+        ];
 
         if (isset($var->link) && !is_null($var->link)) {
-          $element['mergevars_table'][$var->link] = array(
+          $element['mergevars_table'][$var->link] = [
             '#markup' => '<a id="merge-var-' . $var->tag . '" class="add-merge-var" href="javascript:void(0);">*|' . $var->tag . '|*</a>',
-          );
+          ];
         }
       }
 
@@ -771,7 +771,7 @@
    *   The template content array minus wrapper elements.
    */
   private function parseTemplateContent($content) {
-    $template_content = array();
+    $template_content = [];
     $content_keys = array_keys($content);
     foreach ($content_keys as $content_key) {
       if (strpos($content_key, '_wrapper') !== FALSE) {
diff --git a/modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php b/modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php
index 3d9b2de..0c1db11 100644
--- a/modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php
+++ b/modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php
@@ -46,7 +46,7 @@
    */
   public function getQuestion() {
     return $this->t('Are you sure you want to send %name?',
-      array('%name' => $this->entity->label()));
+      ['%name' => $this->entity->label()]);
   }
 
   /**
@@ -76,7 +76,7 @@
   public function submitForm(array &$form, FormStateInterface $form_state) {
     if (mailchimp_campaign_send_campaign($this->entity)) {
       $this->messenger->addStatus($this->t('Mailchimp Campaign %name has been sent.',
-        array('%name' => $this->entity->label())));
+        ['%name' => $this->entity->label()]));
     }
 
     $form_state->setRedirectUrl($this->getCancelUrl());
diff --git a/modules/mailchimp_campaign/src/Plugin/Filter/FilterMailchimpCampaign.php b/modules/mailchimp_campaign/src/Plugin/Filter/FilterMailchimpCampaign.php
index 197bbef..0622049 100644
--- a/modules/mailchimp_campaign/src/Plugin/Filter/FilterMailchimpCampaign.php
+++ b/modules/mailchimp_campaign/src/Plugin/Filter/FilterMailchimpCampaign.php
@@ -25,7 +25,7 @@
 
     // Replace node macros with entity content.
     $pattern = '/\[mailchimp_campaign\|entity_type=(\w+)\|entity_id=(\d+)\|view_mode=(\w+)\]/s';
-    $text = preg_replace_callback($pattern, array($this, 'processCallback'), $text);
+    $text = preg_replace_callback($pattern, [$this, 'processCallback'], $text);
 
     // Convert URL to absolute.
     $text = $this->convertUrl($text);
@@ -38,7 +38,7 @@
   /**
    * Callback for preg_replace in process()
    */
-  public static function processCallback($matches = array()) {
+  public static function processCallback($matches = []) {
     $content = '';
     $entity_type = $entity_id = $view_mode = '';
     foreach ($matches as $key => $match) {
@@ -75,7 +75,7 @@
    */
   public function tips($long = FALSE) {
     $tip = $this->t('Converts content tokens in the format %pattern into the appropriate rendered content and makes all paths absolute. Use the "Insert Site Content" widget below to generate tokens.',
-      array('%pattern' => '[mailchimp_campaign|entity_type=node|entity_id=1|view_mode=teaser]')
+      ['%pattern' => '[mailchimp_campaign|entity_type=node|entity_id=1|view_mode=teaser]']
     );
 
     return $tip;
@@ -86,7 +86,7 @@
    */
   private function convertUrl($text) {
     global $base_url;
-    $matches = array();
+    $matches = [];
     preg_match_all('/<(a|img).*?(href|src)="(.*?)"/', $text, $matches);
     foreach ($matches[3] as $key => $url) {
       if ($url[0] == '/') {
diff --git a/modules/mailchimp_campaign/src/Tests/MailchimpCampaignTest.php b/modules/mailchimp_campaign/src/Tests/MailchimpCampaignTest.php
index 2c86372..fa02e8f 100644
--- a/modules/mailchimp_campaign/src/Tests/MailchimpCampaignTest.php
+++ b/modules/mailchimp_campaign/src/Tests/MailchimpCampaignTest.php
@@ -14,7 +14,7 @@
    *
    * @var array
    */
-  public static $modules = array('mailchimp', 'mailchimp_campaign', 'mailchimp_test');
+  public static $modules = ['mailchimp', 'mailchimp_campaign', 'mailchimp_test'];
 
   /**
    * Tests retrieval of a specific campaign.
diff --git a/modules/mailchimp_lists/mailchimp_lists.module b/modules/mailchimp_lists/mailchimp_lists.module
index 3f4a493..dcd5f95 100644
--- a/modules/mailchimp_lists/mailchimp_lists.module
+++ b/modules/mailchimp_lists/mailchimp_lists.module
@@ -40,7 +40,7 @@
   foreach ($list_fields as $field) {
     // Additional foreach to support multiple values.
     foreach ($entity->get($field) as $item) {
-      mailchimp_lists_process_subscribe_form_choices(array('subscribe' => FALSE), $item, $entity);
+      mailchimp_lists_process_subscribe_form_choices(['subscribe' => FALSE], $item, $entity);
     }
   }
 }
@@ -94,11 +94,11 @@
 
   if (empty($merge_fields) || !isset($merge_fields['EMAIL'])) {
     if ($log_errors) {
-      \Drupal::logger('mailchimp_lists')->notice('Mailchimp Audiences field "{field}" on {entity} -> {bundle} has no EMAIL field configured, subscription actions cannot take place.', array(
+      \Drupal::logger('mailchimp_lists')->notice('Mailchimp Audiences field "{field}" on {entity} -> {bundle} has no EMAIL field configured, subscription actions cannot take place.', [
         'field' => $instance->getFieldDefinition()->getName(),
         'entity' => $entity->getEntityType()->getLabel(),
         'bundle' => $entity->bundle(),
-      ));
+      ]);
     }
 
     return FALSE;
@@ -164,13 +164,13 @@
 
   if ($function) {
     if ($function == 'remove') {
-      $mergevars = array();
+      $mergevars = [];
     }
     else {
       $mergevars = _mailchimp_lists_mergevars_populate($settings['merge_fields'], $entity);
     }
 
-    $interests = isset($choices['interest_groups']) ? $choices['interest_groups'] : array();
+    $interests = isset($choices['interest_groups']) ? $choices['interest_groups'] : [];
 
     switch ($function) {
       case 'add':
@@ -262,7 +262,7 @@
         else {
           if (!is_array($choices['interest_groups'][$grouping['id']])) {
             // Standardize formatting of choices:
-            $choices['interest_groups'][$grouping['id']] = array($choices['interest_groups'][$grouping['id']] => $choices['interest_groups'][$grouping['id']]);
+            $choices['interest_groups'][$grouping['id']] = [$choices['interest_groups'][$grouping['id']] => $choices['interest_groups'][$grouping['id']]];
           }
 
           foreach ($grouping['groups'] as $group) {
@@ -286,7 +286,7 @@
  * @see \Drupal\ctools\TypedDataResolver::getContextFromProperty()
  */
 function _mailchimp_lists_mergevars_populate($merge_fields, EntityInterface $entity) {
-  $mergevars = array();
+  $mergevars = [];
 
 
   foreach (array_filter($merge_fields) as $label => $property_path) {
@@ -362,26 +362,26 @@
   // Assemble a list/audience of current subscription statuses so we don't alter them.
   // Because of cacheing we don't want to use the standard checks. Expiring the
   // cache would kill the point of doing this as a batch API operation.
-  $batch = array(
-    'operations' => array(
-      array('mailchimp_lists_get_subscribers', array($field)),
-      array(
+  $batch = [
+    'operations' => [
+      ['mailchimp_lists_get_subscribers', [$field]],
+      [
         'mailchimp_lists_populate_member_batch',
-        array(
+        [
           $entity_type,
           $bundle_name,
           $field,
           $merge_fields,
-        ),
-      ),
-      array('mailchimp_lists_execute_mergevar_batch_update', array($mc_list_id)),
-    ),
+        ],
+      ],
+      ['mailchimp_lists_execute_mergevar_batch_update', [$mc_list_id]],
+    ],
     'finished' => 'mailchimp_lists_populate_member_batch_complete',
     'title' => t('Processing Merge Variable Updates'),
     'init_message' => t('Starting Mailchimp Merge Variable Update.'),
     'progress_message' => t('Processed @current out of @total.'),
     'error_message' => t('Mailchimp Merge Variable Update Failed.'),
-  );
+  ];
 
   batch_set($batch);
 }
@@ -391,16 +391,16 @@
  */
 function mailchimp_lists_get_subscribers(FieldConfig $field, &$context) {
   if (!isset($context['sandbox']['progress'])) {
-    $context['results']['subscribers'] = array();
+    $context['results']['subscribers'] = [];
     $context['sandbox']['progress'] = 0;
   }
 
   $limit = 100;
 
-  $options = array(
+  $options = [
     'offset' => $context['sandbox']['progress'] / $limit,
     'count' => $limit,
-  );
+  ];
 
   $mc_list_id = $field->getFieldStorageDefinition()->getSetting('mc_list_id');
 
@@ -414,7 +414,7 @@
       $context['results']['subscribers'][strtolower($result->email_address)] = $result;
       $context['sandbox']['progress']++;
     }
-    $context['message'] = t('Check subscription status for contact %count of %total.', array('%count' => $context['sandbox']['progress'], '%total' => $context['sandbox']['max']));
+    $context['message'] = t('Check subscription status for contact %count of %total.', ['%count' => $context['sandbox']['progress'], '%total' => $context['sandbox']['max']]);
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
   }
 }
@@ -439,7 +439,7 @@
 
     if ($context['sandbox']['max']) {
       $context['sandbox']['entity_ids'] = array_keys($query_results);
-      $context['results']['update_queue'] = array();
+      $context['results']['update_queue'] = [];
     }
   }
 
@@ -452,22 +452,22 @@
       $merge_vars = _mailchimp_lists_mergevars_populate($mergefields, $entity);
 
       if ($merge_vars['EMAIL'] && isset($context['results']['subscribers'][strtolower($merge_vars['EMAIL'])])) {
-        $context['results']['update_queue'][] = array(
+        $context['results']['update_queue'][] = [
           'email' => $merge_vars['EMAIL'],
           // Preserve subscribers's email type selection:
           'email_type' => $context['results']['subscribers'][strtolower($merge_vars['EMAIL'])]->email_type,
           'merge_vars' => $merge_vars,
-        );
+        ];
       }
 
       $context['sandbox']['progress']++;
     }
 
     $context['message'] = t('Checking for changes on items %count - %next.',
-      array(
+      [
         '%count' => $context['sandbox']['progress'],
         '%next' => $context['sandbox']['progress'] + $batch_size,
-      )
+      ]
     );
 
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
@@ -510,10 +510,10 @@
     $batch_size = count($batch);
     $context['sandbox']['progress'] += $batch_size;
     $context['message'] = t('Updating Mailchimp mergevars for items %count - %next.',
-      array(
+      [
         '%count' => $context['sandbox']['progress'],
         '%next' => $context['sandbox']['progress'] + $batch_size,
-      )
+      ]
     );
 
     $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['total'];
@@ -527,17 +527,17 @@
   if ($success) {
     if ($results['errors']) {
       \Drupal::messenger()->addWarning(t('Update errors occurred: merge variables updated on %count records, errors occurred on %errors records.',
-        array(
+        [
           '%count' => $results['updates'],
           '%errors' => $results['errors'],
-        )
+        ]
       ));
     }
     else {
       \Drupal::messenger()->addStatus(t('Merge variables updated on %count records.',
-        array(
+        [
           '%count' => $results['updates'],
-        )
+        ]
       ));
     }
   }
@@ -553,14 +553,14 @@
  *   Default webhook event names, indexed by the IDs used by the Mailchimp API.
  */
 function mailchimp_lists_default_webhook_events() {
-  return array(
+  return [
     'subscribe' => 'Subscribes',
     'unsubscribe' => 'Unsubscribes',
     'profile' => 'Profile Updates',
     'cleaned' => 'Cleaned Emails',
     'upemail' => 'Email Address Changes',
     'campaign' => 'Campaign Sending Status',
-  );
+  ];
 }
 
 /**
@@ -573,7 +573,7 @@
  *   An array of enabled webhook event names.
  */
 function mailchimp_lists_enabled_webhook_events($list_id) {
-  $enabled_events = array();
+  $enabled_events = [];
 
   $webhook_url = mailchimp_webhook_url();
 
diff --git a/modules/mailchimp_lists/mailchimp_lists.rules.inc b/modules/mailchimp_lists/mailchimp_lists.rules.inc
index 6e742b5..94a675f 100644
--- a/modules/mailchimp_lists/mailchimp_lists.rules.inc
+++ b/modules/mailchimp_lists/mailchimp_lists.rules.inc
@@ -8,33 +8,33 @@
  * Implements hook_rules_action_info().
  */
 function mailchimp_lists_rules_action_info() {
-  $items = array();
-  $items['mailchimp_lists_user_subscribe'] = array(
+  $items = [];
+  $items['mailchimp_lists_user_subscribe'] = [
     'label' => t('Subscribe or unsubscribe entity from a mailchimp audience'),
-    'parameter' => array(
-      'entity' => array(
+    'parameter' => [
+      'entity' => [
         'type' => 'entity',
         'label' => t('Entity'),
         'description' => t('The entity to subscribe/unsubscribe'),
-      ),
-      'field' => array(
+      ],
+      'field' => [
         'type' => '*',
         'label' => t('Mailchimp Audience Subscription Field'),
         'description' => t('Subscription Field connected to the desired Mailchimp Audience.'),
         'restriction' => 'selector',
         'wrapped' => TRUE,
         'allow null' => FALSE,
-      ),
-      'subscribe' => array(
+      ],
+      'subscribe' => [
         'type' => 'boolean',
         'label' => t('Subscribe'),
         'description' => t('True to subscribe, False to unsubscribe'),
-      ),
-    ),
+      ],
+    ],
     'group' => t('Mailchimp'),
     'access callback' => 'mailchimp_lists_rules_access_callback',
     'base' => 'mailchimp_lists_rules_action_entity_subscribe',
-  );
+  ];
   return $items;
 }
 
diff --git a/modules/mailchimp_lists/src/Controller/MailchimpFieldsController.php b/modules/mailchimp_lists/src/Controller/MailchimpFieldsController.php
index 9a5deb4..e7419de 100644
--- a/modules/mailchimp_lists/src/Controller/MailchimpFieldsController.php
+++ b/modules/mailchimp_lists/src/Controller/MailchimpFieldsController.php
@@ -43,9 +43,9 @@
    * {@inheritdoc}
    */
   public function overview() {
-    $content = array();
+    $content = [];
 
-    $content['description'] = array(
+    $content['description'] = [
       '#markup' => $this->t('This displays a list of all Mailchimp Subscription Fields
         configured on your system, with a row for each unique Instance of that field.
         To edit each field\'s settings, go to the Entity Bundle\'s configuration
@@ -59,13 +59,13 @@
         Mailchimp subscribers for each field configuration using the \'Batch Update\'
         option on this table. The Mailchimp Subscription Field is provided by the
         Mailchimp Audiences (mailchimp_lists) module.')
-    );
+    ];
 
-    $content['fields_table'] = array(
+    $content['fields_table'] = [
       '#type' => 'table',
-      '#header' => array($this->t('Entity Type'), $this->t('Bundle'), $this->t('Field'), $this->t('Batch Update'),),
+      '#header' => [$this->t('Entity Type'), $this->t('Bundle'), $this->t('Field'), $this->t('Batch Update'),],
       '#empty' => '',
-    );
+    ];
 
     $field_map = $this->entityFieldManager->getFieldMap();
 
@@ -74,25 +74,25 @@
       foreach ($fields as $field_name => $field_properties) {
         if ($field_properties['type'] == 'mailchimp_lists_subscription') {
           foreach ($field_properties['bundles'] as $bundle) {
-            $batch_update_url = Url::fromRoute('mailchimp_lists.update_mergevars', array(
+            $batch_update_url = Url::fromRoute('mailchimp_lists.update_mergevars', [
               'entity_type' => $entity_type,
               'bundle' => $bundle,
               'field_name' => $field_name,
               'destination' => 'admin/config/services/mailchimp/fields',
-            ));
+            ]);
 
-            $content['fields_table'][$row_id]['entity_type'] = array(
+            $content['fields_table'][$row_id]['entity_type'] = [
               '#markup' => $entity_type,
-            );
-            $content['fields_table'][$row_id]['bundle'] = array(
+            ];
+            $content['fields_table'][$row_id]['bundle'] = [
               '#markup' => $bundle,
-            );
-            $content['fields_table'][$row_id]['field'] = array(
+            ];
+            $content['fields_table'][$row_id]['field'] = [
               '#markup' => $field_name,
-            );
-            $content['fields_table'][$row_id]['batch_update'] = array(
+            ];
+            $content['fields_table'][$row_id]['batch_update'] = [
               '#markup' => Link::fromTextAndUrl($this->t('Update Mailchimp Mergevar Values'), $batch_update_url)->toString(),
-            );
+            ];
 
             $row_id++;
           }
diff --git a/modules/mailchimp_lists/src/Controller/MailchimpListsController.php b/modules/mailchimp_lists/src/Controller/MailchimpListsController.php
index ff4004a..628e2ca 100644
--- a/modules/mailchimp_lists/src/Controller/MailchimpListsController.php
+++ b/modules/mailchimp_lists/src/Controller/MailchimpListsController.php
@@ -16,65 +16,65 @@
    * {@inheritdoc}
    */
   public function overview() {
-    $content = array();
+    $content = [];
 
-    $lists_admin_url = Url::fromUri('https://admin.mailchimp.com/lists/', array('attributes' => array('target' => '_blank')));
+    $lists_admin_url = Url::fromUri('https://admin.mailchimp.com/lists/', ['attributes' => ['target' => '_blank']]);
 
     $lists_empty_message = $this->t('You don\'t have any audiences configured in your
       Mailchimp account, (or you haven\'t configured your API key correctly on
       the Global Settings tab). Head over to @link and create some audiences, then
       come back here and click "Refresh audiences from Mailchimp"',
-      array('@link' => Link::fromTextAndUrl($this->t('Mailchimp'), $lists_admin_url)->toString()));
+      ['@link' => Link::fromTextAndUrl($this->t('Mailchimp'), $lists_admin_url)->toString()]);
 
-    $content['lists_table'] = array(
+    $content['lists_table'] = [
       '#type' => 'table',
-      '#header' => array($this->t('Name'), $this->t('Members'), $this->t('Webhook Status'),),
+      '#header' => [$this->t('Name'), $this->t('Members'), $this->t('Webhook Status'),],
       '#empty' => $lists_empty_message,
-    );
+    ];
 
     $mc_lists = mailchimp_get_lists();
     $total_webhook_events = count(mailchimp_lists_default_webhook_events());
 
     foreach ($mc_lists as $mc_list) {
       $enabled_webhook_events = count(mailchimp_lists_enabled_webhook_events($mc_list->id));
-      $webhook_url = Url::fromRoute('mailchimp_lists.webhook', array('list_id' => $mc_list->id));
+      $webhook_url = Url::fromRoute('mailchimp_lists.webhook', ['list_id' => $mc_list->id]);
       $webhook_link = Link::fromTextAndUrl('update', $webhook_url);
 
       $webhook_status = $enabled_webhook_events . ' of ' . $total_webhook_events . ' enabled (' .  $webhook_link->toString() . ')';
 
-      $list_url = Url::fromUri('https://admin.mailchimp.com/lists/dashboard/overview?id=' . $mc_list->id, array('attributes' => array('target' => '_blank')));
+      $list_url = Url::fromUri('https://admin.mailchimp.com/lists/dashboard/overview?id=' . $mc_list->id, ['attributes' => ['target' => '_blank']]);
 
-      $content['lists_table'][$mc_list->id]['name'] = array(
+      $content['lists_table'][$mc_list->id]['name'] = [
         '#title' => $this->t($mc_list->name),
         '#type' => 'link',
         '#url' => $list_url
-      );
-      $content['lists_table'][$mc_list->id]['member_count'] = array(
+      ];
+      $content['lists_table'][$mc_list->id]['member_count'] = [
         '#markup' => $mc_list->stats->member_count,
-      );
-      $content['lists_table'][$mc_list->id]['web_id'] = array(
+      ];
+      $content['lists_table'][$mc_list->id]['web_id'] = [
         '#markup' => $webhook_status,
-      );
+      ];
     }
 
-    $refresh_url = Url::fromRoute('mailchimp_lists.refresh', array('destination' => 'admin/config/services/mailchimp/lists'));
+    $refresh_url = Url::fromRoute('mailchimp_lists.refresh', ['destination' => 'admin/config/services/mailchimp/lists']);
 
-    $content['refresh_link'] = array(
+    $content['refresh_link'] = [
       '#title' => 'Refresh audiences from Mailchimp',
       '#type' => 'link',
       '#url' => $refresh_url,
-      '#attributes' => array(
-          'class' => array('button', 'button-action', 'button--primary', 'button--small')
-        ),
-    );
+      '#attributes' => [
+          'class' => ['button', 'button-action', 'button--primary', 'button--small']
+        ],
+    ];
 
-    $mailchimp_lists_url = Url::fromUri('https://admin.mailchimp.com/lists', array('attributes' => array('target' => '_blank')));
+    $mailchimp_lists_url = Url::fromUri('https://admin.mailchimp.com/lists', ['attributes' => ['target' => '_blank']]);
 
-    $content['mailchimp_list_link'] = array(
+    $content['mailchimp_list_link'] = [
       '#title' => $this->t('Go to Mailchimp Audiences'),
       '#type' => 'link',
       '#url' => $mailchimp_lists_url,
-    );
+    ];
 
     return $content;
   }
diff --git a/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php b/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php
index eb402fd..bfeca67 100644
--- a/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php
+++ b/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php
@@ -83,7 +83,7 @@
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-    mailchimp_get_lists(array(), TRUE);
+    mailchimp_get_lists([], TRUE);
     $this->messenger->addStatus($this->t('Mailchimp audience cache cleared.'));
   }
 
diff --git a/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php b/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php
index 22b0055..97bb34c 100644
--- a/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php
+++ b/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php
@@ -65,7 +65,7 @@
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    $form = array();
+    $form = [];
 
     $field_settings = $this->fieldInstance->getFieldDefinition()->getSettings();
     $field_formatter_settings = $this->fieldFormatter->getSettings();
@@ -74,7 +74,7 @@
 
     $email = mailchimp_lists_load_email($this->fieldInstance, $this->fieldInstance->getEntity());
     if (!$email) {
-      return array();
+      return [];
     }
 
     $field_name = $this->fieldInstance->getFieldDefinition()->getName();
@@ -82,58 +82,58 @@
     // Determine if a user is subscribed to the list.
     $is_subscribed = mailchimp_is_subscribed($mc_list['id'], $email);
     $wrapper_key = 'mailchimp_' . $field_name;
-    $form['wrapper_key'] = array(
+    $form['wrapper_key'] = [
       '#type' => 'hidden',
       '#default_value' => $wrapper_key,
-    );
-    $form[$wrapper_key] = array(
+    ];
+    $form[$wrapper_key] = [
       '#type' => 'container',
       '#tree' => TRUE,
       '#description' => $this->fieldInstance->getFieldDefinition()->getDescription(),
-      '#attributes' => array(
-        'class' => array(
+      '#attributes' => [
+        'class' => [
           'mailchimp-newsletter-wrapper',
           'mailchimp-newsletter-' . $field_name,
-        ),
-      ),
-    );
+        ],
+      ],
+    ];
     // Add the title and description to lists for anonymous users or if requested:
-    $form[$wrapper_key]['subscribe'] = array(
+    $form[$wrapper_key]['subscribe'] = [
       '#type' => 'checkbox',
       '#title' => 'Subscribe',
       '#disabled' => $this->fieldInstance->getFieldDefinition()->isRequired(),
       '#required' => $this->fieldInstance->getFieldDefinition()->isRequired(),
       '#default_value' => $this->fieldInstance->getFieldDefinition()->isRequired() || $is_subscribed,
-    );
+    ];
     // Present interest groups:
     if ($field_settings['show_interest_groups'] && $field_formatter_settings['show_interest_groups']) {
       // Perform test in case error comes back from MCAPI when getting groups:
       if (is_array($mc_list['intgroups'])) {
-        $form[$wrapper_key]['interest_groups'] = array(
+        $form[$wrapper_key]['interest_groups'] = [
           '#type' => 'fieldset',
           '#title' => isset($settings['interest_groups_label']) ? $settings['interest_groups_label'] : $this->t('Interest Groups'),
           '#weight' => 100,
-          '#states' => array(
-            'invisible' => array(
-              ':input[name="' . $wrapper_key . '[subscribe]"]' => array('checked' => FALSE),
-            ),
-          ),
-        );
+          '#states' => [
+            'invisible' => [
+              ':input[name="' . $wrapper_key . '[subscribe]"]' => ['checked' => FALSE],
+            ],
+          ],
+        ];
 
         $groups_default = $this->fieldInstance->getInterestGroups();
 
         if ($groups_default == NULL) {
-          $groups_default = array();
+          $groups_default = [];
         }
 
         $form[$wrapper_key]['interest_groups'] += mailchimp_interest_groups_form_elements($mc_list, $groups_default, $email);
       }
     }
 
-    $form['submit'] = array(
+    $form['submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Save'),
-    );
+    ];
 
     return $form;
   }
diff --git a/modules/mailchimp_lists/src/Form/MailchimpListsWebhookSettingsForm.php b/modules/mailchimp_lists/src/Form/MailchimpListsWebhookSettingsForm.php
index 5a9815a..0a2b599 100644
--- a/modules/mailchimp_lists/src/Form/MailchimpListsWebhookSettingsForm.php
+++ b/modules/mailchimp_lists/src/Form/MailchimpListsWebhookSettingsForm.php
@@ -71,21 +71,21 @@
     $default_webhook_events = mailchimp_lists_default_webhook_events();
     $enabled_webhook_events = mailchimp_lists_enabled_webhook_events($list_id);
 
-    $form['webhook_events'] = array(
+    $form['webhook_events'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Enabled webhook events for the @name audience',
-        array(
+        [
           '@name' => $list->name,
-        )),
+        ]),
       '#tree' => TRUE,
-    );
+    ];
 
     foreach ($default_webhook_events as $event => $name) {
-      $form['webhook_events'][$event] = array(
+      $form['webhook_events'][$event] = [
         '#type' => 'checkbox',
         '#title' => $name,
         '#default_value' => in_array($event, $enabled_webhook_events),
-      );
+      ];
     }
 
     return parent::buildForm($form, $form_state);
@@ -108,7 +108,7 @@
 
     $webhook_events = $form_state->getValue('webhook_events');
 
-    $events = array();
+    $events = [];
     foreach ($webhook_events as $webhook_id => $enable) {
       $events[$webhook_id] = ($enable === 1);
     }
@@ -129,11 +129,11 @@
         }
       }
 
-      $sources = array(
+      $sources = [
         'user' => TRUE,
         'admin' => TRUE,
         'api' => FALSE,
-      );
+      ];
 
       // Add webhook with enabled events.
       $result = mailchimp_webhook_add(
@@ -146,16 +146,16 @@
 
     if ($result) {
       $this->messenger->addStatus($this->t('Webhooks for audience "%name" have been updated.',
-        array(
+        [
           '%name' => $list->name,
-        )
+        ]
       ));
     }
     else {
       $this->messenger->addWarning($this->t('Unable to update webhooks for audience "%name".',
-        array(
+        [
           '%name' => $list->name,
-        )
+        ]
       ));
     }
 
diff --git a/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php b/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php
index 42f9322..9722472 100644
--- a/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php
+++ b/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php
@@ -58,9 +58,9 @@
    * {@inheritdoc}
    */
   public static function defaultSettings() {
-    $settings = array(
+    $settings = [
       'show_interest_groups' => FALSE,
-    );
+    ];
 
     return $settings;
   }
@@ -74,13 +74,13 @@
     $field_settings = $this->getFieldSettings();
     $settings = $this->getSettings();
 
-    $form['show_interest_groups'] = array(
+    $form['show_interest_groups'] = [
       '#title' => $this->t('Show Interest Groups'),
       '#type' => 'checkbox',
       '#description' => $field_settings['show_interest_groups'] ? $this->t('Check to display interest group membership details.') : $this->t('To display Interest Groups, first enable them in the field instance settings.'),
       '#default_value' => $field_settings['show_interest_groups'] && $settings['show_interest_groups'],
       '#disabled' => !$field_settings['show_interest_groups'],
-    );
+    ];
 
     return $form;
   }
@@ -92,7 +92,7 @@
     $field_settings = $this->getFieldSettings();
     $settings = $this->getSettings();
 
-    $summary = array();
+    $summary = [];
 
     if ($field_settings['show_interest_groups'] && $settings['show_interest_groups']) {
       $summary[] = $this->t('Display Interest Groups');
@@ -108,7 +108,7 @@
    * {@inheritdoc}
    */
   public function viewElements(FieldItemListInterface $items, $langcode) {
-    $elements = array();
+    $elements = [];
 
     /* @var $item \Drupal\mailchimp_lists\Plugin\Field\FieldType\MailchimpListsSubscription */
     foreach ($items as $delta => $item) {
diff --git a/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsSubscribeDefaultFormatter.php b/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsSubscribeDefaultFormatter.php
index 559fdab..7aeced3 100644
--- a/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsSubscribeDefaultFormatter.php
+++ b/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsSubscribeDefaultFormatter.php
@@ -23,9 +23,9 @@
    * {@inheritdoc}
    */
   public static function defaultSettings() {
-    $settings = array(
+    $settings = [
       'show_interest_groups' => FALSE,
-    );
+    ];
 
     return $settings;
   }
@@ -39,13 +39,13 @@
     $field_settings = $this->getFieldSettings();
     $settings = $this->getSettings();
 
-    $form['show_interest_groups'] = array(
+    $form['show_interest_groups'] = [
       '#title' => $this->t('Show Interest Groups'),
       '#type' => 'checkbox',
       '#description' => $field_settings['show_interest_groups'] ? $this->t('Check to display interest group membership details.') : $this->t('To display Interest Groups, first enable them in the field instance settings.'),
       '#default_value' => $field_settings['show_interest_groups'] && $settings['show_interest_groups'],
       '#disabled' => !$field_settings['show_interest_groups'],
-    );
+    ];
 
     return $form;
   }
@@ -57,7 +57,7 @@
     $field_settings = $this->getFieldSettings();
     $settings = $this->getSettings();
 
-    $summary = array();
+    $summary = [];
 
     if ($field_settings['show_interest_groups'] && $settings['show_interest_groups']) {
       $summary[] = $this->t('Display Interest Groups');
@@ -73,11 +73,11 @@
    * {@inheritdoc}
    */
   public function viewElements(FieldItemListInterface $items, $langcode) {
-    $elements = array();
+    $elements = [];
 
     /* @var $item \Drupal\mailchimp_lists\Plugin\Field\FieldType\MailchimpListsSubscription */
     foreach ($items as $delta => $item) {
-      $elements[$delta] = array();
+      $elements[$delta] = [];
 
       $field_settings = $this->getFieldSettings();
 
@@ -86,35 +86,35 @@
 
       if ($email && !empty($mc_list)) {
         if (mailchimp_is_subscribed($field_settings['mc_list_id'], $email)) {
-          $status = $this->t('Subscribed to %list', array('%list' => $mc_list->name));
+          $status = $this->t('Subscribed to %list', ['%list' => $mc_list->name]);
         }
         else {
-          $status = $this->t('Not subscribed to %list', array('%list' => $mc_list->name));
+          $status = $this->t('Not subscribed to %list', ['%list' => $mc_list->name]);
         }
       }
       else {
         $status = $this->t('Invalid email configuration.');
       }
-      $elements[$delta]['status'] = array(
+      $elements[$delta]['status'] = [
         '#markup' => $status,
-        '#description' => $this->t('@mc_list_description', array(
+        '#description' => $this->t('@mc_list_description', [
           '@mc_list_description' => $item->getFieldDefinition()
             ->getDescription()
-        )),
-      );
+        ]),
+      ];
 
       if ($field_settings['show_interest_groups'] && $this->getSetting('show_interest_groups')) {
         $member_info = mailchimp_get_memberinfo($field_settings['mc_list_id'], $email);
 
         if (!empty($mc_list->intgroups)) {
-          $elements[$delta]['interest_groups'] = array(
+          $elements[$delta]['interest_groups'] = [
             '#type' => 'fieldset',
             '#title' => $this->t('Interest Groups'),
             '#weight' => 100,
-          );
+          ];
 
           foreach ($mc_list->intgroups as $interest_group) {
-            $items = array();
+            $items = [];
             foreach ($interest_group->interests as $interest) {
               if (isset($member_info->interests->{$interest->id}) && ($member_info->interests->{$interest->id} === TRUE)) {
                 $items[] = $interest->name;
@@ -122,12 +122,12 @@
             }
 
             if (count($items) > 0) {
-              $elements[$delta]['interest_groups'][$interest_group->id] = array(
+              $elements[$delta]['interest_groups'][$interest_group->id] = [
                 '#title' => $interest_group->title,
                 '#theme' => 'item_list',
                 '#items' => $items,
                 '#type' => 'ul',
-              );
+              ];
             }
           }
         }
diff --git a/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php b/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php
index e4b74d4..f9654de 100644
--- a/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php
+++ b/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php
@@ -31,48 +31,48 @@
    * {@inheritdoc}
    */
   public static function defaultStorageSettings() {
-    return array(
+    return [
       'mc_list_id' => '',
       'double_opt_in' => 0,
       'send_welcome' => 0,
-    ) + parent::defaultStorageSettings();
+    ] + parent::defaultStorageSettings();
   }
 
   /**
    * {@inheritdoc}
    */
   public static function defaultFieldSettings() {
-    return array(
+    return [
       'subscribe_checkbox_label' => 'Subscribe',
       'show_interest_groups' => 0,
       'hide_subscribe_checkbox' => 0,
       'interest_groups_hidden' => 0,
       'interest_groups_label' => '',
-      'merge_fields' => array(),
+      'merge_fields' => [],
       'unsubscribe_on_delete' => 0,
-    ) + parent::defaultFieldSettings();
+    ] + parent::defaultFieldSettings();
   }
 
   /**
    * {@inheritdoc}
    */
   public static function schema(FieldStorageDefinitionInterface $field_definition) {
-    $columns = array(
-      'subscribe' => array(
+    $columns = [
+      'subscribe' => [
         'type' => 'int',
         'size' => 'tiny',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'interest_groups' => array(
+      ],
+      'interest_groups' => [
         'type' => 'text',
         'size' => 'normal',
         'not null' => TRUE,
-      ),
-    );
-    return array(
+      ],
+    ];
+    return [
       'columns' => $columns,
-    );
+    ];
   }
 
   /**
@@ -97,14 +97,14 @@
     $element = parent::storageSettingsForm($form, $form_state, $has_data);
 
     $lists = mailchimp_get_lists();
-    $options = array('' => $this->t('-- Select --'));
+    $options = ['' => $this->t('-- Select --')];
     foreach ($lists as $mc_list) {
       $options[$mc_list->id] = $mc_list->name;
     }
 
     $field_map = \Drupal::entityManager()->getFieldMap();
 
-    $field_definitions = array();
+    $field_definitions = [];
     foreach ($field_map as $entity_type => $fields) {
       $field_definitions[$entity_type] = \Drupal::entityManager()->getFieldStorageDefinitions($entity_type);
     }
@@ -126,31 +126,31 @@
     }
 
     $refresh_lists_url = Url::fromRoute('mailchimp_lists.refresh');
-    $mailchimp_url = Url::fromUri('https://admin.mailchimp.com', array('attributes' => array('target' => '_blank')));
+    $mailchimp_url = Url::fromUri('https://admin.mailchimp.com', ['attributes' => ['target' => '_blank']]);
 
-    $element['mc_list_id'] = array(
+    $element['mc_list_id'] = [
       '#type' => 'select',
       '#title' => $this->t('Mailchimp Audience'),
       '#multiple' => FALSE,
       '#description' => $this->t('Available Mailchimp audiences which are not already
         attached to Mailchimp Subscription Fields. If there are no options,
         make sure you have created an audience at @Mailchimp first, then @cacheclear.',
-        array(
+        [
           '@Mailchimp' => Link::fromTextAndUrl('Mailchimp', $mailchimp_url)->toString(),
           '@cacheclear' => Link::fromTextAndUrl('clear your audience cache', $refresh_lists_url)->toString(),
-        )),
+        ]),
       '#options' => $options,
       '#default_value' => $this->getSetting('mc_list_id'),
       '#required' => TRUE,
       '#disabled' => $has_data,
-    );
-    $element['double_opt_in'] = array(
+    ];
+    $element['double_opt_in'] = [
       '#type' => 'checkbox',
       '#title' => 'Require subscribers to Double Opt-in',
       '#description' => 'New subscribers will be sent a link with an email they must follow to confirm their subscription.',
       '#default_value' => $this->getSetting('double_opt_in'),
       '#disabled' => $has_data,
-    );
+    ];
 
     return $element;
   }
@@ -169,59 +169,59 @@
     $this->definition;
     $instance_settings = $this->definition->getSettings();
 
-    $element['subscribe_checkbox_label'] = array(
+    $element['subscribe_checkbox_label'] = [
       '#title' => 'Subscribe Checkbox Label',
       '#type' => 'textfield',
       '#default_value' => isset($instance_settings['subscribe_checkbox_label']) ? $instance_settings['subscribe_checkbox_label'] : 'Subscribe',
-    );
-    $element['show_interest_groups'] = array(
+    ];
+    $element['show_interest_groups'] = [
       '#title' => "Enable Interest Groups",
       '#type' => "checkbox",
       '#default_value' => $instance_settings['show_interest_groups'],
-    );
-    $element['hide_subscribe_checkbox'] = array(
+    ];
+    $element['hide_subscribe_checkbox'] = [
       '#title' => $this->t('Hide Subscribe Checkbox'),
       '#type' => 'checkbox',
       '#default_value' => $instance_settings['hide_subscribe_checkbox'],
       '#description' => $this->t('When Interest Groups are enabled, the "subscribe" checkbox is hidden and selecting any interest group will subscribe a user to the audience.'),
-      '#states' => array(
-        'visible' => array(
-          'input[name="settings[show_interest_groups]"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
-    $element['interest_groups_hidden'] = array(
+      '#states' => [
+        'visible' => [
+          'input[name="settings[show_interest_groups]"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
+    $element['interest_groups_hidden'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Hide Interest Groups.'),
       '#description' => $this->t('If checked, the Interest Groups will not be displayed, but the default values will be used.'),
       '#default_value' => $instance_settings['interest_groups_hidden'],
-      '#states' => array(
-        'visible' => array(
-          'input[name="settings[show_interest_groups]"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
-    $element['interest_groups_label'] = array(
+      '#states' => [
+        'visible' => [
+          'input[name="settings[show_interest_groups]"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
+    $element['interest_groups_label'] = [
       '#title' => "Interest Groups Label",
       '#type' => "textfield",
       '#default_value' => !empty($instance_settings['interest_groups_label']) ? $instance_settings['interest_groups_label'] : 'Interest Groups',
-    );
-    $element['merge_fields'] = array(
+    ];
+    $element['merge_fields'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Merge Fields'),
       '#description' => $this->t('Multi-value fields will only sync their first value to Mailchimp, as Mailchimp does not support multi-value fields.'),
       '#tree' => TRUE,
-    );
+    ];
 
-    $element['unsubscribe_on_delete'] = array(
+    $element['unsubscribe_on_delete'] = [
       '#title' => "Unsubscribe on deletion",
       '#type' => "checkbox",
       '#description' => $this->t('Unsubscribe entities from this audience when they are deleted.'),
       '#default_value' => $instance_settings['unsubscribe_on_delete'],
-    );
+    ];
 
     $mv_defaults = $instance_settings['merge_fields'];
-    $mergevars = mailchimp_get_mergevars(array($mc_list_id));
+    $mergevars = mailchimp_get_mergevars([$mc_list_id]);
 
     $field_config = $this->getFieldDefinition();
 
@@ -236,12 +236,12 @@
 
     foreach ($mergevars[$mc_list_id] as $mergevar) {
       $default_value = isset($mv_defaults[$mergevar->tag]) ? $mv_defaults[$mergevar->tag] : -1;
-      $element['merge_fields'][$mergevar->tag] = array(
+      $element['merge_fields'][$mergevar->tag] = [
         '#type' => 'select',
         '#title' => Html::escape($mergevar->name),
         '#default_value' => array_key_exists($default_value, $fields_flat) ? $default_value : '',
         '#required' => $mergevar->required,
-      );
+      ];
       if (!$mergevar->required || $mergevar->tag === 'EMAIL') {
         $element['merge_fields'][$mergevar->tag]['#options'] = $fields;
         if ($mergevar->tag === 'EMAIL') {
@@ -342,7 +342,7 @@
    *   List of properties that can be used as an #options list/audience.
    */
   private function getFieldmapOptions($entity_type, $entity_bundle = NULL, $required = FALSE, $prefix = NULL, $tree = NULL) {
-    $options = array();
+    $options = [];
     if (!$prefix) {
       $options[''] = $this->t('-- Select --');
     }
diff --git a/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php b/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php
index 372ec27..9dbc509 100644
--- a/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php
+++ b/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php
@@ -44,18 +44,18 @@
     // Load the Mailchimp list from the field's list ID.
     $mc_list = mailchimp_get_list($this->fieldDefinition->getSetting('mc_list_id'));
 
-    $element += array(
+    $element += [
       '#title' => Html::escape($element['#title']),
       '#type' => 'fieldset',
-    );
+    ];
 
-    $element['subscribe'] = array(
+    $element['subscribe'] = [
       '#title' => $this->fieldDefinition->getSetting('subscribe_checkbox_label') ?: $this->t('Subscribe'),
       '#type' => 'checkbox',
       '#default_value' => ($subscribe_default) ? TRUE : $this->fieldDefinition->isRequired(),
       '#required' => $this->fieldDefinition->isRequired(),
       '#disabled' => $this->fieldDefinition->isRequired(),
-    );
+    ];
 
     // TRUE if interest groups are enabled for this list.
     $show_interest_groups = $this->fieldDefinition->getSetting('show_interest_groups');
@@ -83,31 +83,31 @@
       $mc_list = mailchimp_get_list($instance->getFieldDefinition()->getSetting('mc_list_id'));
 
       if ($interest_groups_hidden && !$is_default_value_widget) {
-        $element['interest_groups'] = array();
+        $element['interest_groups'] = [];
       }
       else {
-        $element['interest_groups'] = array(
+        $element['interest_groups'] = [
           '#type' => $interest_group_element_type,
           '#title' => Html::escape($instance->getFieldDefinition()->getSetting('interest_groups_label')),
           '#weight' => 100,
-          '#states' => array(
-            'invisible' => array(
-              ':input[name="' . $instance->getFieldDefinition()->getName() . '[0][value][subscribe]"]' => array('checked' => FALSE),
-            ),
-          ),
-        );
+          '#states' => [
+            'invisible' => [
+              ':input[name="' . $instance->getFieldDefinition()->getName() . '[0][value][subscribe]"]' => ['checked' => FALSE],
+            ],
+          ],
+        ];
       }
 
       if ($is_default_value_widget) {
-        $element['interest_groups']['#states']['invisible'] = array(
-          ':input[name="settings[show_interest_groups]"]' => array('checked' => FALSE),
-        );
+        $element['interest_groups']['#states']['invisible'] = [
+          ':input[name="settings[show_interest_groups]"]' => ['checked' => FALSE],
+        ];
       }
 
       $groups_default = $instance->getInterestGroups();
 
       if ($groups_default == NULL) {
-        $groups_default = array();
+        $groups_default = [];
       }
 
       if (!empty($mc_list->intgroups)) {
@@ -122,17 +122,17 @@
     if ($build_info['callback_object'] instanceof EntityFormInterface &&  $build_info['callback_object']->getOperation() == 'edit') {
 
       // The field is set from an edited via the UI.
-      $element['allow_unsubscribe'] = array(
+      $element['allow_unsubscribe'] = [
         '#type' => 'value',
         '#value' => TRUE,
-      );
+      ];
     }
     else {
       // The field is NOT set from an edit.
-      $element['allow_unsubscribe'] = array(
+      $element['allow_unsubscribe'] = [
         '#type' => 'value',
         '#value' => FALSE,
-      );
+      ];
     }
 
     return $element;
diff --git a/modules/mailchimp_lists/src/Tests/MailchimpListsSubscriptionTest.php b/modules/mailchimp_lists/src/Tests/MailchimpListsSubscriptionTest.php
index 567bfbf..88c9013 100644
--- a/modules/mailchimp_lists/src/Tests/MailchimpListsSubscriptionTest.php
+++ b/modules/mailchimp_lists/src/Tests/MailchimpListsSubscriptionTest.php
@@ -14,7 +14,7 @@
    *
    * @var array
    */
-  public static $modules = array('mailchimp', 'mailchimp_lists', 'mailchimp_test');
+  public static $modules = ['mailchimp', 'mailchimp_lists', 'mailchimp_test'];
 
   /**
    * Tests retrieval of member info for a list and email address.
@@ -48,19 +48,19 @@
     $list_id = '57afe96172';
     $email = 'test@example.org';
     $interest_category_id = 'a1e9f4b7f6';
-    $interest_ids = array(
+    $interest_ids = [
       '9143cf3bd1',
       '3a2a927344',
-    );
-    $merge_vars = array(
+    ];
+    $merge_vars = [
       'EMAIL' => $email,
-    );
+    ];
 
-    $interests = array();
-    $interests[$interest_category_id] = array(
+    $interests = [];
+    $interests[$interest_category_id] = [
       $interest_ids[0] => 1,
       $interest_ids[1] => 0,
-    );
+    ];
 
     $member_info = mailchimp_subscribe($list_id, $email, $merge_vars, $interests);
 
diff --git a/modules/mailchimp_lists/src/Tests/MailchimpListsTest.php b/modules/mailchimp_lists/src/Tests/MailchimpListsTest.php
index 5ed35f5..df27a2a 100644
--- a/modules/mailchimp_lists/src/Tests/MailchimpListsTest.php
+++ b/modules/mailchimp_lists/src/Tests/MailchimpListsTest.php
@@ -14,7 +14,7 @@
    *
    * @var array
    */
-  public static $modules = array('mailchimp', 'mailchimp_lists', 'mailchimp_test');
+  public static $modules = ['mailchimp', 'mailchimp_lists', 'mailchimp_test'];
 
   /**
    * Tests that a list can be loaded.
@@ -32,10 +32,10 @@
    * Tests retrieval of a specific set of lists.
    */
   function testMultiListRetrieval() {
-    $list_ids = array(
+    $list_ids = [
       '57afe96172',
       'f4b7b26b2e',
-    );
+    ];
 
     $lists = mailchimp_get_lists($list_ids);
 
@@ -52,9 +52,9 @@
    * Tests retrieval of mergevars for a set of lists.
    */
   function testGetMergevars() {
-    $list_ids = array(
+    $list_ids = [
       '57afe96172',
-    );
+    ];
 
     $mergevars = mailchimp_get_mergevars($list_ids);
 
diff --git a/modules/mailchimp_lists/src/Tests/MailchimpListsWebhookTest.php b/modules/mailchimp_lists/src/Tests/MailchimpListsWebhookTest.php
index 54204de..d147977 100644
--- a/modules/mailchimp_lists/src/Tests/MailchimpListsWebhookTest.php
+++ b/modules/mailchimp_lists/src/Tests/MailchimpListsWebhookTest.php
@@ -14,7 +14,7 @@
    *
    * @var array
    */
-  public static $modules = array('mailchimp', 'mailchimp_lists', 'mailchimp_test');
+  public static $modules = ['mailchimp', 'mailchimp_lists', 'mailchimp_test'];
 
   /**
    * Tests retrieval of webhooks for a list.
@@ -39,14 +39,14 @@
   public function testAddWebhook() {
     $list_id = '57afe96172';
     $url = 'http://example.org/web-hook-new';
-    $events = array(
+    $events = [
       'subscribe' => TRUE,
-    );
-    $sources = array(
+    ];
+    $sources = [
       'user' => TRUE,
       'admin' => TRUE,
       'api' => FALSE,
-    );
+    ];
 
     $webhook_id = mailchimp_webhook_add($list_id, $url, $events, $sources);
 
diff --git a/modules/mailchimp_signup/mailchimp_signup.module b/modules/mailchimp_signup/mailchimp_signup.module
index 9c95760..78d6689 100644
--- a/modules/mailchimp_signup/mailchimp_signup.module
+++ b/modules/mailchimp_signup/mailchimp_signup.module
@@ -35,7 +35,7 @@
  * @return \Drupal\mailchimp_signup\Entity\MailchimpSignup[]
  *   Array of MailchimpSignup entities.
  */
-function mailchimp_signup_load_multiple($signup_ids = array(), $reset = FALSE) {
+function mailchimp_signup_load_multiple($signup_ids = [], $reset = FALSE) {
   if (empty($signup_ids)) {
     $signup_ids = NULL;
   }
diff --git a/modules/mailchimp_signup/src/Controller/MailchimpSignupController.php b/modules/mailchimp_signup/src/Controller/MailchimpSignupController.php
index 0fc92fe..3de035d 100644
--- a/modules/mailchimp_signup/src/Controller/MailchimpSignupController.php
+++ b/modules/mailchimp_signup/src/Controller/MailchimpSignupController.php
@@ -60,7 +60,7 @@
    *   Renderable array of page content.
    */
   public function page($signup_id) {
-    $content = array();
+    $content = [];
 
     $signup = mailchimp_signup_load($signup_id);
 
diff --git a/modules/mailchimp_signup/src/Controller/MailchimpSignupListBuilder.php b/modules/mailchimp_signup/src/Controller/MailchimpSignupListBuilder.php
index 8701918..258a06a 100644
--- a/modules/mailchimp_signup/src/Controller/MailchimpSignupListBuilder.php
+++ b/modules/mailchimp_signup/src/Controller/MailchimpSignupListBuilder.php
@@ -56,27 +56,27 @@
         $modes = $page_mode;
         break;
       case MAILCHIMP_SIGNUP_BOTH:
-        $modes = array(
+        $modes = [
           'block_link' => $block_mode,
-          'separator' => array(
+          'separator' => [
             '#markup' => ' and ',
-          ),
+          ],
           'page_link' => $page_mode
-        );
+        ];
         break;
     }
 
-    $list_labels = array();
+    $list_labels = [];
     foreach ($entity->mc_lists as $list_id) {
       if (!empty($list_id) && isset($mc_lists[$list_id])) {
-        $list_url = Url::fromUri('https://admin.mailchimp.com/lists/dashboard/overview?id=' . $mc_lists[$list_id]->id, array('attributes' => array('target' => '_blank')));
+        $list_url = Url::fromUri('https://admin.mailchimp.com/lists/dashboard/overview?id=' . $mc_lists[$list_id]->id, ['attributes' => ['target' => '_blank']]);
         $list_link = [
           '#title' => $this->t($mc_lists[$list_id]->name),
           '#type' => 'link',
           '#url' => $list_url,
         ];
         $list_labels[] = $list_link;
-        $list_labels[] = array('#markup' => ', ');
+        $list_labels[] = ['#markup' => ', '];
       }
     }
 
diff --git a/modules/mailchimp_signup/src/Form/MailchimpSignupDeleteForm.php b/modules/mailchimp_signup/src/Form/MailchimpSignupDeleteForm.php
index 499977f..1593c39 100644
--- a/modules/mailchimp_signup/src/Form/MailchimpSignupDeleteForm.php
+++ b/modules/mailchimp_signup/src/Form/MailchimpSignupDeleteForm.php
@@ -57,7 +57,7 @@
    * {@inheritdoc}
    */
   public function getQuestion() {
-    return $this->t('Are you sure you want to delete %name?', array('%name' => $this->entity->label()));
+    return $this->t('Are you sure you want to delete %name?', ['%name' => $this->entity->label()]);
   }
 
   /**
@@ -82,7 +82,7 @@
 
     $this->routerBuilder->setRebuildNeeded();
 
-    $this->messenger->addStatus($this->t('Signup Form %label has been deleted.', array('%label' => $this->entity->label())));
+    $this->messenger->addStatus($this->t('Signup Form %label has been deleted.', ['%label' => $this->entity->label()]));
 
     $form_state->setRedirectUrl($this->getCancelUrl());
   }
diff --git a/modules/mailchimp_signup/src/Form/MailchimpSignupForm.php b/modules/mailchimp_signup/src/Form/MailchimpSignupForm.php
index ddd450c..41c8e03 100644
--- a/modules/mailchimp_signup/src/Form/MailchimpSignupForm.php
+++ b/modules/mailchimp_signup/src/Form/MailchimpSignupForm.php
@@ -64,7 +64,7 @@
 
     $signup = $this->entity;
 
-    $form['title'] = array(
+    $form['title'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Title'),
       '#size' => 60,
@@ -72,188 +72,188 @@
       '#default_value' => $signup->title,
       '#description' => $this->t('The title for this signup form.'),
       '#required' => TRUE,
-    );
-    $form['id'] = array(
+    ];
+    $form['id'] = [
       '#type' => 'machine_name',
       '#default_value' => $signup->id,
       '#maxlength' => EntityTypeInterface::BUNDLE_MAX_LENGTH,
-      '#machine_name' => array(
-        'source' => array('title'),
+      '#machine_name' => [
+        'source' => ['title'],
         'exists' => 'mailchimp_signup_load',
-      ),
+      ],
       '#description' => $this->t('A unique machine-readable name for this audience. It must only contain lowercase letters, numbers, and underscores.'),
       '#disabled' => !$signup->isNew(),
-    );
+    ];
 
-    $form['description'] = array(
+    $form['description'] = [
       '#type' => 'textarea',
       '#title' => 'Description',
       '#default_value' => isset($signup->settings['description']) ? $signup->settings['description'] : '',
       '#rows' => 2,
       '#maxlength' => 500,
       '#description' => $this->t('This description will be shown on the signup form below the title. (500 characters or less)'),
-    );
-    $mode_defaults = array(
-      MAILCHIMP_SIGNUP_BLOCK => array(MAILCHIMP_SIGNUP_BLOCK),
-      MAILCHIMP_SIGNUP_PAGE => array(MAILCHIMP_SIGNUP_PAGE),
-      MAILCHIMP_SIGNUP_BOTH => array(MAILCHIMP_SIGNUP_BLOCK, MAILCHIMP_SIGNUP_PAGE),
-    );
-    $form['mode'] = array(
+    ];
+    $mode_defaults = [
+      MAILCHIMP_SIGNUP_BLOCK => [MAILCHIMP_SIGNUP_BLOCK],
+      MAILCHIMP_SIGNUP_PAGE => [MAILCHIMP_SIGNUP_PAGE],
+      MAILCHIMP_SIGNUP_BOTH => [MAILCHIMP_SIGNUP_BLOCK, MAILCHIMP_SIGNUP_PAGE],
+    ];
+    $form['mode'] = [
       '#type' => 'checkboxes',
       '#title' => 'Display Mode',
       '#required' => TRUE,
-      '#options' => array(
+      '#options' => [
         MAILCHIMP_SIGNUP_BLOCK => 'Block',
         MAILCHIMP_SIGNUP_PAGE => 'Page',
-      ),
-      '#default_value' => !empty($signup->mode) && is_numeric($signup->mode) ? $mode_defaults[$signup->mode] : array(),
-    );
+      ],
+      '#default_value' => !empty($signup->mode) && is_numeric($signup->mode) ? $mode_defaults[$signup->mode] : [],
+    ];
 
-    $form['settings'] = array(
+    $form['settings'] = [
       '#type' => 'details',
       '#title' => 'Settings',
       '#tree' => TRUE,
       '#open' => TRUE,
-    );
+    ];
 
-    $form['settings']['path'] = array(
+    $form['settings']['path'] = [
       '#type' => 'textfield',
       '#title' => 'Page URL',
       '#description' => $this->t('Path to the signup page. ie "newsletter/signup".'),
       '#default_value' => isset($signup->settings['path']) ? $signup->settings['path'] : NULL,
-      '#states' => array(
+      '#states' => [
         // Hide unless needed.
-        'visible' => array(
-          ':input[name="mode[' . MAILCHIMP_SIGNUP_PAGE . ']"]' => array('checked' => TRUE),
-        ),
-        'required' => array(
-          ':input[name="mode[' . MAILCHIMP_SIGNUP_PAGE . ']"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
+        'visible' => [
+          ':input[name="mode[' . MAILCHIMP_SIGNUP_PAGE . ']"]' => ['checked' => TRUE],
+        ],
+        'required' => [
+          ':input[name="mode[' . MAILCHIMP_SIGNUP_PAGE . ']"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
 
-    $form['settings']['submit_button'] = array(
+    $form['settings']['submit_button'] = [
       '#type' => 'textfield',
       '#title' => 'Submit Button Label',
       '#required' => 'TRUE',
       '#default_value' => isset($signup->settings['submit_button']) ? $signup->settings['submit_button'] : 'Submit',
-    );
+    ];
 
-    $form['settings']['confirmation_message'] = array(
+    $form['settings']['confirmation_message'] = [
       '#type' => 'textfield',
       '#title' => 'Confirmation Message',
       '#description' => 'This message will appear after a successful submission of this form. Leave blank for no message, but make sure you configure a destination in that case unless you really want to confuse your site visitors.',
       '#default_value' => isset($signup->settings['confirmation_message']) ? $signup->settings['confirmation_message'] : 'You have been successfully subscribed.',
-    );
+    ];
 
-    $form['settings']['destination'] = array(
+    $form['settings']['destination'] = [
       '#type' => 'textfield',
       '#title' => 'Form destination page',
       '#description' => 'Leave blank to stay on the form page.',
       '#default_value' => isset($signup->settings['destination']) ? $signup->settings['destination'] : NULL,
-    );
+    ];
 
-    $form['settings']['ajax_submit'] = array(
+    $form['settings']['ajax_submit'] = [
       '#type' => 'checkbox',
       '#title' => t('AJAX Form Submit Mode'),
       '#description' => t('Select if signup form submit should use AJAX instead of default page reload. Destination page will be ignored if checked.'),
       '#default_value' => isset($signup->settings['ajax_submit']) ? $signup->settings['ajax_submit'] : FALSE,
-    );
+    ];
 
-    $form['mc_lists_config'] = array(
+    $form['mc_lists_config'] = [
       '#type' => 'details',
       '#title' => $this->t('Mailchimp Audience Selection & Configuration'),
       '#open' => TRUE,
-    );
+    ];
     $lists = mailchimp_get_lists();
-    $options = array();
+    $options = [];
     foreach ($lists as $mc_list) {
       $options[$mc_list->id] = $mc_list->name;
     }
-    $mc_admin_url = Link::fromTextAndUrl('Mailchimp', Url::fromUri('https://admin.mailchimp.com', array('attributes' => array('target' => '_blank'))));
-    $form['mc_lists_config']['mc_lists'] = array(
+    $mc_admin_url = Link::fromTextAndUrl('Mailchimp', Url::fromUri('https://admin.mailchimp.com', ['attributes' => ['target' => '_blank']]));
+    $form['mc_lists_config']['mc_lists'] = [
       '#type' => 'checkboxes',
       '#title' => $this->t('Mailchimp Audiences'),
       '#description' => $this->t('Select which audiences to show on your signup form. You can create additional audiences at @Mailchimp.',
-        array('@Mailchimp' => $mc_admin_url->toString())),
+        ['@Mailchimp' => $mc_admin_url->toString()]),
       '#options' => $options,
-      '#default_value' => is_array($signup->mc_lists) ? $signup->mc_lists : array(),
+      '#default_value' => is_array($signup->mc_lists) ? $signup->mc_lists : [],
       '#required' => TRUE,
-      '#ajax' => array(
+      '#ajax' => [
         'callback' => '::mergefields_callback',
         'wrapper' => 'mergefields-wrapper',
         'method' => 'replace',
         'effect' => 'fade',
-        'progress' => array(
+        'progress' => [
           'type' => 'throbber',
           'message' => $this->t('Retrieving merge fields for this audience.'),
-        ),
-      ),
-    );
+        ],
+      ],
+    ];
 
-    $form['mc_lists_config']['mergefields'] = array(
+    $form['mc_lists_config']['mergefields'] = [
       '#prefix' => '<div id="mergefields-wrapper">',
       '#suffix' => '</div>',
-    );
+    ];
 
     // Show merge fields if changing list/audience field or editing existing list/audience.
     if ($form_state->getValue('mc_lists') || !$signup->isNew()) {
-      $form['mc_lists_config']['mergefields'] = array(
+      $form['mc_lists_config']['mergefields'] = [
         '#type' => 'fieldset',
         '#title' => $this->t('Merge Field Display'),
         '#description' => $this->t('Select the merge fields to show on registration forms. Required fields are automatically displayed.'),
         '#id' => 'mergefields-wrapper',
         '#tree' => TRUE,
         '#weight' => 20,
-      );
+      ];
 
       $mc_lists = $form_state->getValue('mc_lists') ? $form_state->getValue('mc_lists') : $signup->mc_lists;
 
       $mergevar_options = $this->getMergevarOptions($mc_lists);
 
       foreach ($mergevar_options as $mergevar) {
-        $form['mc_lists_config']['mergefields'][$mergevar->tag] = array(
+        $form['mc_lists_config']['mergefields'][$mergevar->tag] = [
           '#type' => 'checkbox',
           '#title' => Html::escape($mergevar->name),
           '#default_value' => isset($signup->settings['mergefields'][$mergevar->tag]) ? !empty($signup->settings['mergefields'][$mergevar->tag]) : TRUE,
           '#required' => $mergevar->required,
           '#disabled' => $mergevar->required,
-        );
+        ];
       }
     }
 
-    $form['subscription_settings'] = array(
+    $form['subscription_settings'] = [
       '#type' => 'details',
       '#title' => $this->t('Subscription Settings'),
       '#open' => TRUE,
-    );
+    ];
 
-    $form['subscription_settings']['doublein'] = array(
+    $form['subscription_settings']['doublein'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Require subscribers to Double Opt-in'),
       '#description' => $this->t('New subscribers will be sent a link with an email they must follow to confirm their subscription.'),
       '#default_value' => isset($signup->settings['doublein']) ? $signup->settings['doublein'] : FALSE,
-    );
+    ];
 
-    $form['subscription_settings']['include_interest_groups'] = array(
+    $form['subscription_settings']['include_interest_groups'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Include interest groups on subscription form.'),
       '#default_value' => isset($signup->settings['include_interest_groups']) ? $signup->settings['include_interest_groups'] : FALSE,
       '#description' => $this->t('If set, subscribers will be able to select applicable interest groups on the signup form.'),
-    );
+    ];
 
-    $form['subscription_settings']['safe_interest_groups'] = array(
+    $form['subscription_settings']['safe_interest_groups'] = [
       '#type' => 'checkbox',
       '#title' => $this->t("Don't opt-out of interest groups: only opt-in."),
       '#default_value' => isset($signup->settings['safe_interest_groups']) ? $signup->settings['safe_interest_groups'] : FALSE,
       '#description' => $this->t('This is useful for "additive" form behavior, so a user adding a new interest will not have other interests removed from their Mailchimp subscription just because they failed to check the box again.'),
-      '#states' => array(
+      '#states' => [
         // Hide unless needed.
-        'visible' => array(
-          ':input[name="include_interest_groups"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
+        'visible' => [
+          ':input[name="include_interest_groups"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
 
     $form['subscription_settings']['configure_groups'] = [
       '#type' => 'checkbox',
@@ -285,41 +285,41 @@
       ],
     ];
     
-    $form['subscription_settings']['gdpr_consent'] = array(
+    $form['subscription_settings']['gdpr_consent'] = [
       '#type' => 'checkbox',
       '#title' => t('Add a GDPR consent checkbox'),
       '#description' => t('Add a GDPR consent checkbox to the signup form that syncs with the Mailchimp marketing permission field.'),
       '#default_value' => isset($signup->settings['gdpr_consent']) ? $signup->settings['gdpr_consent'] : FALSE,
-    );
+    ];
  
-    $form['subscription_settings']['gdpr_checkbox_label'] = array(
+    $form['subscription_settings']['gdpr_checkbox_label'] = [
       '#type' => 'textfield',
       '#title' => t('Consent checkbox label'),
       '#description' => t('The label to display on the GDPR consent checkbox, for example "I agree to the privacy policy". This should coincide with what you have in Mailchimp!'),
       '#default_value' => isset($signup->settings['gdpr_checkbox_label']) ? $signup->settings['gdpr_checkbox_label'] : NULL,
-      '#states' => array(
+      '#states' => [
         // Hide unless needed.
-        'visible' => array(
-          ':input[name="gdpr_consent"]' => array('checked' => TRUE),
-        ),
-        'required' => array(
-          ':input[name="gdpr_consent"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
+        'visible' => [
+          ':input[name="gdpr_consent"]' => ['checked' => TRUE],
+        ],
+        'required' => [
+          ':input[name="gdpr_consent"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
 
-    $form['subscription_settings']['gdpr_consent_required'] = array(
+    $form['subscription_settings']['gdpr_consent_required'] = [
       '#type' => 'checkbox',
       '#title' => t('GDPR consent required'),
       '#description' => t('Make the GDPR consent checkbox a required field.'),
       '#default_value' => isset($signup->settings['gdpr_consent_required']) ? $signup->settings['gdpr_consent_required'] : FALSE,
-      '#states' => array(
+      '#states' => [
         // Hide unless needed.
-        'visible' => array(
-          ':input[name="gdpr_consent"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
+        'visible' => [
+          ':input[name="gdpr_consent"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
 
     // An empty array as a default value for all of the interest groups.
     $groups = [];
@@ -486,7 +486,7 @@
 
   private function getMergevarOptions(array $mc_lists) {
     $mergevar_settings = mailchimp_get_mergevars(array_filter($mc_lists));
-    $mergevar_options = array();
+    $mergevar_options = [];
     foreach ($mergevar_settings as $list_mergevars) {
       foreach ($list_mergevars as $mergevar) {
         if (isset($mergevar->public) && $mergevar->public) {
diff --git a/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php b/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php
index a3ab3d6..1e41fac 100644
--- a/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php
+++ b/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php
@@ -76,14 +76,14 @@
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    $form = array();
+    $form = [];
     $settings = $this->signup->settings;
 
-    $form['#attributes'] = array('class' => array('mailchimp-signup-subscribe-form'));
+    $form['#attributes'] = ['class' => ['mailchimp-signup-subscribe-form']];
 
-    $form['description'] = array(
+    $form['description'] = [
       '#markup' => $this->signup->description,
-    );
+    ];
 
     // If the form is configured to submit via AJAX, add an empty container
     // element. This element is going to be replaced with the returned AJAX
@@ -95,7 +95,7 @@
       ];
     }
 
-    $form['mailchimp_lists'] = array('#tree' => TRUE);
+    $form['mailchimp_lists'] = ['#tree' => TRUE];
 
     $lists = mailchimp_get_lists($this->signup->mc_lists);
 
@@ -107,7 +107,7 @@
       ]];
     }
 
-    $list = array();
+    $list = [];
     if ($lists_count > 1) {
       // Default behavior.
       // The only difference here is that we've moved the default
@@ -134,30 +134,30 @@
           }
         }
 
-        $form['mailchimp_lists'][$wrapper_key] = array(
+        $form['mailchimp_lists'][$wrapper_key] = [
           '#prefix' => '<div id="mailchimp-newsletter-' . $list->id . '" class="mailchimp-newsletter-wrapper">',
           '#suffix' => '</div>',
-        );
+        ];
 
-        $form['mailchimp_lists'][$wrapper_key]['subscribe'] = array(
+        $form['mailchimp_lists'][$wrapper_key]['subscribe'] = [
           '#type' => 'checkbox',
           '#title' => $list->name,
           '#return_value' => $list->id,
           '#default_value' => $subscribe_to_list,
           '#access' => $show_lists_and_groups
-        );
+        ];
 
         if ($this->signup->settings['include_interest_groups'] && isset($list->intgroups)) {
-          $form['mailchimp_lists'][$wrapper_key]['interest_groups'] = array(
+          $form['mailchimp_lists'][$wrapper_key]['interest_groups'] = [
             '#type' => 'fieldset',
             '#access' => $show_lists_and_groups,
-            '#title' => $this->t('Interest Groups for %label', array('%label' => $list->name)),
-            '#states' => array(
-              'invisible' => array(
-                ':input[name="mailchimp_lists[' . $wrapper_key . '][subscribe]"]' => array('checked' => FALSE),
-              ),
-            ),
-          );
+            '#title' => $this->t('Interest Groups for %label', ['%label' => $list->name]),
+            '#states' => [
+              'invisible' => [
+                ':input[name="mailchimp_lists[' . $wrapper_key . '][subscribe]"]' => ['checked' => FALSE],
+              ],
+            ],
+          ];
 
           // Create the form elements for all interest groups
           // and select the ones needed.
@@ -172,12 +172,12 @@
 
           // Include the GDPR consent checkbox if necessary
           if ($this->signup->settings['gdpr_consent']) {
-             $form['mailchimp_lists'][$wrapper_key]['gdpr_consent'] = array(
+             $form['mailchimp_lists'][$wrapper_key]['gdpr_consent'] = [
                '#type' => 'checkbox',
                '#default_value' => FALSE,
                '#title' => $this->signup->settings['gdpr_checkbox_label'],
                '#required' => isset($this->signup->settings['gdpr_consent_required']) ? $this->signup->settings['gdpr_consent_required'] : FALSE,
-             );
+             ];
           }
         }
       }
@@ -214,21 +214,21 @@
 
       // Include the GDPR consent checkbox if necessary
       if ($this->signup->settings['gdpr_consent']) {
-         $form['mailchimp_lists']['gdpr_consent'] = array(
+         $form['mailchimp_lists']['gdpr_consent'] = [
            '#type' => 'checkbox',
            '#default_value' => FALSE,
            '#title' => $this->signup->settings['gdpr_checkbox_label'],
            '#required' => isset($this->signup->settings['gdpr_consent_required']) ? $this->signup->settings['gdpr_consent_required'] : FALSE,
-         );
+         ];
       }
     }
 
     $mergevars_wrapper_id = isset($list->id) ? $list->id : '';
-    $form['mergevars'] = array(
+    $form['mergevars'] = [
       '#prefix' => '<div id="mailchimp-newsletter-' . $mergevars_wrapper_id . '-mergefields" class="mailchimp-newsletter-mergefields">',
       '#suffix' => '</div>',
       '#tree' => TRUE,
-    );
+    ];
 
     foreach ($this->signup->settings['mergefields'] as $tag => $mergevar_str) {
       if (!empty($mergevar_str)) {
@@ -301,7 +301,7 @@
 
     $list_details = mailchimp_get_lists($this->signup->mc_lists);
 
-    $subscribe_lists = array();
+    $subscribe_lists = [];
 
     // Filter out blank fields so we don't erase values on the Mailchimp side.
     $mergevars = array_filter($form_state->getValue('mergevars'));
@@ -312,11 +312,11 @@
 
     // If we only have one list we won't have checkbox values to investigate.
     if (count(array_filter($this->signup->mc_lists)) == 1) {
-      $subscribe_lists[0] = array(
+      $subscribe_lists[0] = [
         'subscribe' => reset($this->signup->mc_lists),
         'interest_groups' => isset($mailchimp_lists['interest_groups']) ? $mailchimp_lists['interest_groups'] : NULL,
         'gdpr_consent' => isset($mailchimp_lists['gdpr_consent']) ? $mailchimp_lists['gdpr_consent'] : NULL,
-      );
+      ];
     }
     else {
       // We can look at the checkbox values now.
@@ -327,17 +327,17 @@
       }
     }
 
-    $successes = array();
+    $successes = [];
 
     // Loop through the selected lists and try to subscribe.
     foreach ($subscribe_lists as $list_choices) {
       $list_id = $list_choices['subscribe'];
 
-      $interests = isset($list_choices['interest_groups']) ? $list_choices['interest_groups'] : array();
+      $interests = isset($list_choices['interest_groups']) ? $list_choices['interest_groups'] : [];
       if (isset($this->signup->settings['safe_interest_groups']) && $this->signup->settings['safe_interest_groups']) {
         $current_status = mailchimp_get_memberinfo($list_id, $email);
         if (isset($current_status->interests)) {
-          $current_interests = array();
+          $current_interests = [];
           foreach ($current_status->interests as $id => $selected) {
             if ($selected) {
               $current_interests[$id] = $id;
@@ -349,9 +349,9 @@
       $result = mailchimp_subscribe($list_id, $email, $mergevars, $interests, $this->signup->settings['doublein'], 'html', NULL, $list_choices['gdpr_consent']);
 
       if (empty($result)) {
-        $this->messenger->addWarning($this->t('There was a problem with your newsletter signup to %list.', array(
+        $this->messenger->addWarning($this->t('There was a problem with your newsletter signup to %list.', [
           '%list' => $list_details[$list_id]->name,
-        )));
+        ]));
       }
       else {
         $successes[] = $list_details[$list_id]->name;
diff --git a/modules/mailchimp_signup/src/Plugin/Derivative/MailchimpSignupSubscribeBlock.php b/modules/mailchimp_signup/src/Plugin/Derivative/MailchimpSignupSubscribeBlock.php
index 0edbd90..9c2cc63 100644
--- a/modules/mailchimp_signup/src/Plugin/Derivative/MailchimpSignupSubscribeBlock.php
+++ b/modules/mailchimp_signup/src/Plugin/Derivative/MailchimpSignupSubscribeBlock.php
@@ -22,7 +22,7 @@
       if (intval($signup->mode) == MAILCHIMP_SIGNUP_BLOCK || intval($signup->mode) == MAILCHIMP_SIGNUP_BOTH) {
 
         $this->derivatives[$signup->id] = $base_plugin_definition;
-        $this->derivatives[$signup->id]['admin_label'] = t('Mailchimp Subscription Form: @name', array('@name' => $signup->label()));
+        $this->derivatives[$signup->id]['admin_label'] = t('Mailchimp Subscription Form: @name', ['@name' => $signup->label()]);
       }
     }
 
diff --git a/modules/mailchimp_signup/src/Routing/MailchimpSignupRoutes.php b/modules/mailchimp_signup/src/Routing/MailchimpSignupRoutes.php
index be9c554..74b5909 100644
--- a/modules/mailchimp_signup/src/Routing/MailchimpSignupRoutes.php
+++ b/modules/mailchimp_signup/src/Routing/MailchimpSignupRoutes.php
@@ -13,7 +13,7 @@
    * {@inheritdoc}
    */
   public function routes() {
-    $routes = array();
+    $routes = [];
 
     $signups = mailchimp_signup_load_multiple();
 
@@ -24,15 +24,15 @@
           // Route Path.
           '/' . $signup->settings['path'],
           // Route defaults.
-          array(
+          [
             '_controller' => '\Drupal\mailchimp_signup\Controller\MailchimpSignupController::page',
             '_title' => $signup->title,
             'signup_id' => $signup->id,
-          ),
+          ],
           // Route requirements.
-          array(
+          [
             '_permission'  => 'access mailchimp signup pages',
-          )
+          ]
         );
       }
     }
diff --git a/src/Controller/MailchimpWebhookController.php b/src/Controller/MailchimpWebhookController.php
index 33044d3..1b6eea7 100644
--- a/src/Controller/MailchimpWebhookController.php
+++ b/src/Controller/MailchimpWebhookController.php
@@ -89,11 +89,11 @@
       }
 
       // Allow other modules to act on a webhook.
-      $this->moduleHandler->invokeAll('mailchimp_process_webhook', array($type, $data));
+      $this->moduleHandler->invokeAll('mailchimp_process_webhook', [$type, $data]);
 
       // Log event.
-      $this->logger->info('Webhook type {type} has been processed.', array(
-        'type' => $type));
+      $this->logger->info('Webhook type {type} has been processed.', [
+        'type' => $type]);
 
       $return = 1;
     }
diff --git a/src/Form/MailchimpAdminSettingsForm.php b/src/Form/MailchimpAdminSettingsForm.php
index d8e992a..f1faa47 100644
--- a/src/Form/MailchimpAdminSettingsForm.php
+++ b/src/Form/MailchimpAdminSettingsForm.php
@@ -30,29 +30,29 @@
   public function buildForm(array $form, FormStateInterface $form_state) {
     $config = $this->config('mailchimp.settings');
 
-    $mc_api_url = Url::fromUri('http://admin.mailchimp.com/account/api', array('attributes' => array('target' => '_blank')));
-    $form['api_key'] = array(
+    $mc_api_url = Url::fromUri('http://admin.mailchimp.com/account/api', ['attributes' => ['target' => '_blank']]);
+    $form['api_key'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Mailchimp API Key'),
       '#required' => TRUE,
       '#default_value' => $config->get('api_key'),
-      '#description' => $this->t('The API key for your Mailchimp account. Get or generate a valid API key at your @apilink.', array('@apilink' => Link::fromTextAndUrl($this->t('Mailchimp API Dashboard'), $mc_api_url)->toString())),
-    );
+      '#description' => $this->t('The API key for your Mailchimp account. Get or generate a valid API key at your @apilink.', ['@apilink' => Link::fromTextAndUrl($this->t('Mailchimp API Dashboard'), $mc_api_url)->toString()]),
+    ];
 
-    $form['connected_sites'] = array(
+    $form['connected_sites'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Connected sites'),
-    );
+    ];
 
     $mc_connected_sites_url = Url::fromUri('https://kb.mailchimp.com/integrations/connected-sites/about-connected-sites')->toString();
-    $form['connected_sites']['enable_connected'] = array(
+    $form['connected_sites']['enable_connected'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Enable connected site'),
-      '#description' => $this->t('Connects this website to Mailchimp by automatically embedding Mailchimp\'s <a href=":link" target="_blank">Connected Sites</a> JavaScript code.', array(
+      '#description' => $this->t('Connects this website to Mailchimp by automatically embedding Mailchimp\'s <a href=":link" target="_blank">Connected Sites</a> JavaScript code.', [
         ':link' => $mc_connected_sites_url,
-      )),
+      ]),
       '#default_value' => $config->get('enable_connected'),
-    );
+    ];
 
     /* @var \Mailchimp\MailchimpConnectedSites $mc_connected */
     try {
@@ -65,65 +65,65 @@
       // Ignore errors due to invalid keys.
     }
 
-    $connected_sites_options = array();
+    $connected_sites_options = [];
     if (!empty($connected_sites) && !empty($connected_sites->sites)) {
       foreach ($connected_sites->sites as $site) {
         $connected_sites_options[$site->foreign_id] = $site->domain;
       }
     }
 
-    $form['connected_sites']['config'] = array(
+    $form['connected_sites']['config'] = [
       '#type' => 'container',
-      '#states' => array(
-        'invisible' => array(
-          ':input[name="enable_connected"]' => array('checked' => FALSE),
-        ),
-      ),
-    );
+      '#states' => [
+        'invisible' => [
+          ':input[name="enable_connected"]' => ['checked' => FALSE],
+        ],
+      ],
+    ];
 
     if (!empty($connected_sites_options)) {
       // If the Mailchimp account contains connected sites, allow the user to
       // choose one here.
-      $form['connected_sites']['config']['connected_id'] = array(
+      $form['connected_sites']['config']['connected_id'] = [
         '#type' => 'radios',
         '#options' => $connected_sites_options,
         '#default_value' => $config->get('connected_id'),
         '#prefix' => $this->t('<p><b>Choose a connected site from your Mailchimp account.</b></p>'),
-      );
+      ];
 
       // Allow the user to configure which paths to embed JavaScript on.
-      $form['connected_sites']['config']['connected_paths'] = array(
+      $form['connected_sites']['config']['connected_paths'] = [
         '#type' => 'textarea',
         '#default_value' => $config->get('connected_paths'),
         '#prefix' => $this->t("<p><b>Configure paths to embed Mailchimp's JavaScript code on.</b></p>"),
         '#description' => $this->t('Specify pages using their paths. Enter one path per line. <front> is the front page. If you have created a pop-up subscription form in Mailchimp, it will appear on paths defined here.'),
-      );
+      ];
     }
     else {
       // If the Mailchimp account does not contain any connected sites, gently
       // encourage the user to create one.
-      $form['connected_sites']['sites']['info'] = array(
+      $form['connected_sites']['sites']['info'] = [
         '#type' => 'markup',
-        '#markup' => $this->t('You will need to connect this site to Mailchimp first! <a href=":link" target="_blank">Check out the documentation here</a>.', array(
+        '#markup' => $this->t('You will need to connect this site to Mailchimp first! <a href=":link" target="_blank">Check out the documentation here</a>.', [
           ':link' => $mc_connected_sites_url,
-        )),
-      );
+        ]),
+      ];
     }
 
-    $form['batch'] = array(
+    $form['batch'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Batch processing'),
-    );
+    ];
 
-    $form['batch']['cron'] = array(
+    $form['batch']['cron'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Use batch processing.'),
       '#description' => $this->t('Puts all Mailchimp subscription operations into the cron queue. (Includes subscribe, update, and unsubscribe operations.) <i>Note: May cause confusion if caches are cleared, as requested changes will appear to have failed until cron is run.</i>'),
       '#default_value' => $config->get('cron'),
-    );
-    $form['batch']['batch_limit'] = array(
+    ];
+    $form['batch']['batch_limit'] = [
       '#type' => 'select',
-      '#options' => array(
+      '#options' => [
         '1' => '1',
         '10' => '10',
         '25' => '25',
@@ -138,22 +138,22 @@
         '5000' => '5000',
         '7500' => '7500',
         '10000' => '10000',
-      ),
+      ],
       '#title' => $this->t('Batch limit'),
       '#description' => $this->t('Maximum number of entities to process in a single cron run. Mailchimp suggest keeping this at 5000 or below. <i>This value is also used for batch Merge Variable updates on the Fields tab (part of mailchimp_lists).</i>'),
       '#default_value' => $config->get('batch_limit'),
-    );
+    ];
 
     global $base_url;
     $current_webhook_hash = $config->get('webhook_hash');
 
-    $form['webhook_hash'] = array(
+    $form['webhook_hash'] = [
       '#type' => 'textfield',
       '#title' => t('Webhook Hash'),
       '#default_value' => $current_webhook_hash ? $current_webhook_hash : md5(uniqid(mt_rand(), true)),
       '#description' => t('Hash to validate incoming webhooks. Whatever you put here should be appended to the URL you provide Mailchimp.'),
       '#suffix' => '<strong>Your webhook URL:</strong> ' . $base_url . '/mailchimp/webhook/[hash]',
-    );
+    ];
 
 
     return parent::buildForm($form, $form_state);
diff --git a/tests/modules/mailchimp_test/src/DrupalMailchimp.php b/tests/modules/mailchimp_test/src/DrupalMailchimp.php
index 93c37fb..efabb1a 100644
--- a/tests/modules/mailchimp_test/src/DrupalMailchimp.php
+++ b/tests/modules/mailchimp_test/src/DrupalMailchimp.php
@@ -4,7 +4,7 @@
 
 class DrupalMailchimp {
 
-  public function __construct($apikey = NULL, $opts = array()) {
+  public function __construct($apikey = NULL, $opts = []) {
 
   }
 
diff --git a/tests/modules/mailchimp_test/src/MailchimpConfigOverrider.php b/tests/modules/mailchimp_test/src/MailchimpConfigOverrider.php
index 06f577a..5b0ecfd 100644
--- a/tests/modules/mailchimp_test/src/MailchimpConfigOverrider.php
+++ b/tests/modules/mailchimp_test/src/MailchimpConfigOverrider.php
@@ -18,14 +18,14 @@
    * {@inheritdoc}
    */
   public function loadOverrides($names) {
-    $overrides = array(
-      'mailchimp.settings' => array(
+    $overrides = [
+      'mailchimp.settings' => [
         'api_key' => 'MAILCHIMP_TEST_API_KEY',
         'cron' => FALSE,
         'batch_limit' => 100,
         'test_mode' => TRUE,
-      ),
-    );
+      ],
+    ];
 
     return $overrides;
   }
