diff --git a/includes/mailchimp.drush.inc b/includes/mailchimp.drush.inc
index 42fa257..6a4efef 100644
--- a/includes/mailchimp.drush.inc
+++ b/includes/mailchimp.drush.inc
@@ -9,23 +9,22 @@
  * 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;
 }
 
 /**
  * Callback function to run cron.
- * 
  * @int null $temp_batchsize
  */
 function _mailchimp_cron_batch($temp_batchsize = NULL) {
diff --git a/modules/mailchimp_campaign/mailchimp_campaign.module b/modules/mailchimp_campaign/mailchimp_campaign.module
index 14b260a..8d364ab 100644
--- a/modules/mailchimp_campaign/mailchimp_campaign.module
+++ b/modules/mailchimp_campaign/mailchimp_campaign.module
@@ -1,10 +1,11 @@
 <?php
+
 /**
  * @file
  * Module file for mailchimp_campaign.
  */
 
-use \Drupal\mailchimp_campaign\Entity\MailchimpCampaign;
+use Drupal\mailchimp_campaign\Entity\MailchimpCampaign;
 use Drupal\Core\Cache\CacheBackendInterface;
 
 /**
@@ -15,7 +16,7 @@ function mailchimp_campaign_entity_storage_load(array $entities, $entity_type) {
     return;
   }
 
-  $ids = array();
+  $ids = [];
   if (!empty($entities)) {
     /* @var $campaign \Drupal\mailchimp_campaign\Entity\MailchimpCampaign */
     foreach ($entities as $campaign) {
@@ -42,17 +43,17 @@ function mailchimp_campaign_entity_storage_load(array $entities, $entity_type) {
  * 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' => array()],
+    ],
+    'mailchimp_campaign_mclinks' => [
+      'variables' => ['data' => NULL],
+    ],
+    'mailchimp_campaign_actions' => [
+      'variables' => ['campaign' => NULL],
+    ],
+  ];
 }
 
 /**
@@ -69,7 +70,7 @@ function mailchimp_campaign_theme($existing, $type, $theme, $path) {
  *   New or existing campaign ID.
  */
 function mailchimp_campaign_save_campaign($template, $recipients, $settings, $template_id, $campaign_id = NULL) {
-  // Allow alter of template and options used in campaign
+  // Allow alter of template and options used in campaign.
   \Drupal::moduleHandler()->alter('mailchimp_campaign', $recipients, $template, $campaign_id);
 
   // Convert template to content by running through formatter.
@@ -77,9 +78,9 @@ function mailchimp_campaign_save_campaign($template, $recipients, $settings, $te
     $content = mailchimp_campaign_render_template($template);
   }
   else {
-    $content = array(
+    $content = [
       'sections' => mailchimp_campaign_render_template($template),
-    );
+    ];
   }
 
   // Test for valid list segment, if selected.
@@ -90,15 +91,15 @@ function mailchimp_campaign_save_campaign($template, $recipients, $settings, $te
   }
 
   // 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'])) {
+    ];
+  } elseif (isset($content['html'])) {
     // Use HTML as campaign content.
     $content_parameters['html'] = $content['html'];
   }
@@ -125,8 +126,8 @@ function mailchimp_campaign_save_campaign($template, $recipients, $settings, $te
     }
     catch (Exception $e) {
       drupal_set_message($e->getMessage(), 'error');
-      \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;
     }
 
@@ -149,17 +150,17 @@ function mailchimp_campaign_save_campaign($template, $recipients, $settings, $te
       drupal_set_message($e->getMessage(), 'error');
       \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_set_message(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;
@@ -189,11 +190,11 @@ function mailchimp_campaign_send_campaign(MailchimpCampaign $campaign) {
 
     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');
 
@@ -206,9 +207,9 @@ function mailchimp_campaign_send_campaign(MailchimpCampaign $campaign) {
   catch (Exception $e) {
     drupal_set_message($e->getMessage(), 'error');
     \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;
 }
@@ -235,8 +236,9 @@ function mailchimp_campaign_delete_campaign(MailchimpCampaign $campaign) {
 
   catch (Exception $e) {
     drupal_set_message($e->getMessage(), 'error');
-    \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;
   }
 }
@@ -254,7 +256,7 @@ function mailchimp_campaign_list_templates($reset = FALSE) {
   $cache = \Drupal::cache('mailchimp');
   $cached_templates = $cache->get('templates');
 
-  $all_templates = array();
+  $all_templates = [];
 
   // Return cached lists.
   if (!$reset && !empty($cached_templates)) {
@@ -264,17 +266,17 @@ function mailchimp_campaign_list_templates($reset = FALSE) {
   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;
@@ -316,7 +318,7 @@ function mailchimp_campaign_get_template($template_id, $reset = FALSE) {
         /* @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);
         }
       }
@@ -338,7 +340,7 @@ function mailchimp_campaign_get_template($template_id, $reset = FALSE) {
  *   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'])) {
@@ -364,7 +366,7 @@ function mailchimp_campaign_get_campaigns($mc_campaign_ids, $reset = FALSE) {
   $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)
@@ -396,8 +398,9 @@ function mailchimp_campaign_get_campaigns($mc_campaign_ids, $reset = FALSE) {
 
     catch (Exception $e) {
       drupal_set_message($e->getMessage(), 'error');
-      \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;
     }
@@ -423,20 +426,20 @@ function mailchimp_campaign_get_list_segments($list_id, $type) {
   /* @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_set_message($e->getMessage(), 'error');
-    \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;
   }
@@ -460,12 +463,13 @@ function mailchimp_test_list_segment($list_id, $list_segment_id) {
   $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_set_message($e->getMessage(), 'error');
-    \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;
   }
@@ -476,7 +480,7 @@ function mailchimp_test_list_segment($list_id, $list_segment_id) {
 /**
  * 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 4405e07..ecff607 100644
--- a/modules/mailchimp_campaign/src/Controller/MailchimpCampaignController.php
+++ b/modules/mailchimp_campaign/src/Controller/MailchimpCampaignController.php
@@ -20,13 +20,21 @@ class MailchimpCampaignController extends ControllerBase {
    * {@inheritdoc}
    */
   public function overview() {
-    $content = array();
+    $content = [];
 
-    $content['campaigns_table'] = array(
+    $content['campaigns_table'] = [
       '#type' => 'table',
-      '#header' => array(t('Title'), t('Subject'), t('Status'), t('MailChimp List'), t('MailChimp Template'), t('Created'), t('Actions')),
+      '#header' => [
+       $this->t('Title'),
+       $this->t('Subject'),
+       $this->t('Status'),
+       $this->t('MailChimp List'),
+       $this->t('MailChimp Template'),
+       $this->t('Created'),
+       $this->t('Actions')
+      ],
       '#empty' => '',
-    );
+    ];
 
     $campaigns = mailchimp_campaign_load_multiple();
     $templates = mailchimp_campaign_list_templates();
@@ -36,54 +44,54 @@ class MailchimpCampaignController extends ControllerBase {
       $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(t("Send"), $send_url)->toString();
+        $send_link = Link::fromTextAndUrl($this->t("Send"), $send_url)->toString();
       }
       // "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 = t("Sent");
+        $send_link = $this->t("Sent");
       }
       else {
-        $send_link = t("Sent");
+        $send_link = $this->t("Sent");
       }
 
 
-      $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.
@@ -95,25 +103,25 @@ class MailchimpCampaignController extends ControllerBase {
           }
         }
         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' => '-- template ' .
-                Url::fromRoute($campaign->mc_data->settings->template_id, $template_url, array('attributes' => array('target' => '_blank')))->toString()
+                Url::fromRoute($campaign->mc_data->settings->template_id, $template_url, ['attributes' => ['target' => '_blank']])->toString()
                 . ' not found --',
-          );
+          ];
         }
       }
-      $content['campaigns_table'][$campaign_id]['created'] = array(
+      $content['campaigns_table'][$campaign_id]['created'] = [
         '#markup' => \Drupal::service('date.formatter')->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),
-      );
+      ];
     }
 
     return $content;
@@ -160,9 +168,10 @@ class MailchimpCampaignController extends ControllerBase {
     } catch (Exception $e) {
       drupal_set_message($e->getMessage(), 'error');
       \Drupal::logger('mailchimp_campaign')
-        ->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)) {
@@ -171,70 +180,70 @@ class MailchimpCampaignController extends ControllerBase {
       $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' => $series->recipients_click,
-        );
+        ];
       }
 
-      $content['charts'] = array(
-        '#prefix' => '<h2>' . t('Hourly stats for the first 24 hours of the campaign') . '</h2>',
+      $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(t('Key'), t('Value')),
+        '#header' => [$this->t('Key'), $this->t('Value')],
         '#empty' => '',
-        '#prefix' => '<h2>' . t('Other campaign metrics') . '</h2>',
-      );
+        '#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 = \Drupal::service('date.formatter')->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;
@@ -258,7 +267,7 @@ class MailchimpCampaignController extends ControllerBase {
 
     $entity_ids = $query->execute();
 
-    $entities = array();
+    $entities = [];
 
     if (!empty($entity_ids)) {
       $entities_data = entity_load_multiple($entity_type, $entity_ids);
@@ -268,10 +277,10 @@ class MailchimpCampaignController extends ControllerBase {
         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 7374455..f31e18c 100644
--- a/modules/mailchimp_campaign/src/Entity/MailchimpCampaign.php
+++ b/modules/mailchimp_campaign/src/Entity/MailchimpCampaign.php
@@ -89,7 +89,7 @@ class MailchimpCampaign extends ContentEntityBase implements MailchimpCampaignIn
    * 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')
diff --git a/modules/mailchimp_campaign/src/Entity/MailchimpCampaignViewBuilder.php b/modules/mailchimp_campaign/src/Entity/MailchimpCampaignViewBuilder.php
index 345d7c3..0abb111 100644
--- a/modules/mailchimp_campaign/src/Entity/MailchimpCampaignViewBuilder.php
+++ b/modules/mailchimp_campaign/src/Entity/MailchimpCampaignViewBuilder.php
@@ -46,9 +46,11 @@ class MailchimpCampaignViewBuilder extends EntityViewBuilder {
       }
     }
 
-    $list_url = Url::fromUri('https://admin.mailchimp.com/lists/dashboard/overview?id=' . $entity->list->id, 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, array(
-      'attributes' => array('target' => '_blank')));
+      'attributes' => ['target' => '_blank']));
     $send_time = 'N/A';
 
     if (isset($entity->mc_data->send_time) && $entity->mc_data->send_time) {
@@ -56,61 +58,61 @@ class MailchimpCampaignViewBuilder extends EntityViewBuilder {
         ->format(strtotime($entity->mc_data->send_time), 'custom', 'F j, Y - g:ia');
     }
 
-    $fields = array(
-      'title' => array(
-        'label' => t('Title'),
+    $fields = [
+      'title' => [
+        'label' => $this->t('Title'),
         'value' => $entity->mc_data->settings->title,
-      ),
+      ],
 
-      'subject' => array(
-        'label' => t('Subject'),
+      'subject' => [
+        'label' => $this->t('Subject'),
         'value' => $entity->mc_data->settings->subject_line,
-      ),
-      'list' => array(
-        'label' => t('MailChimp List'),
+      ],
+      'list' => [
+        'label' => $this->t('MailChimp List'),
         'value' => Link::fromTextAndUrl($entity->list->name, $list_url)->toString(),
-      ),
-      'list_segment' => array(
+      ],
+      'list_segment' => [
         'label' => t('List Segment'),
         'value' => $list_segment_name,
-      ),
-      'from_email' => array(
-        'label' => t('From Email'),
+      ],
+      'from_email' => [
+        'label' => $this->t('From Email'),
         'value' => $entity->mc_data->settings->reply_to,
-      ),
-      'from_name' => array(
-        'label' => t('From Name'),
+      ],
+      'from_name' => [
+        'label' => $this->t('From Name'),
         'value' => $entity->mc_data->settings->from_name,
-      ),
-      'template' => array(
-        'label' => t('Template'),
+      ],
+      'template' => [
+        'label' => $this->t('Template'),
         'value' => $mc_template_name,
-      ),
-      'type' => array(
-        'label' => t('List type'),
+      ],
+      'type' => [
+        'label' => $this->t('List type'),
         'value' => $entity->mc_data->type,
-      ),
-      'status' => array(
-        'label' => t('Status'),
+      ],
+      'status' => [
+        'label' => $this->t('Status'),
         'value' => $entity->mc_data->status,
-      ),
-      'emails_sent' => array(
-        'label' => t('Emails sent'),
+      ],
+      'emails_sent' => [
+        'label' => $this->t('Emails sent'),
         'value' => $entity->mc_data->emails_sent,
-      ),
-      'send_time' => array(
-        'label' => t('Send time'),
+      ],
+      'send_time' => [
+        'label' => $this->t('Send time'),
         'value' => $send_time,
-      ),
-      'content' => array(
-        'label' => t('Rendered template HTML (!archive)',
-          array(
+      ],
+      'content' => [
+        'label' => $this->t('Rendered template HTML (!archive)',
+          [
             '!archive' => Link::fromTextAndUrl('View MailChimp archive', $archive_url)->toString(),
-            )
+            ]
           ),
         'value' => $rendered,
-      ),
-    );
+      ],
+    ];
 
     foreach ($fields as $key => $field) {
       $build[$key] = array(
@@ -133,7 +135,7 @@ class MailchimpCampaignViewBuilder extends EntityViewBuilder {
    *   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 c2382dc..e673e57 100644
--- a/modules/mailchimp_campaign/src/Form/MailchimpCampaignDeleteForm.php
+++ b/modules/mailchimp_campaign/src/Form/MailchimpCampaignDeleteForm.php
@@ -18,7 +18,7 @@ class MailchimpCampaignDeleteForm extends EntityConfirmFormBase {
    */
   public function getQuestion() {
     return $this->t('Are you sure you want to delete %name?',
-      array('%name' => $this->entity->label()));
+      ['%name' => $this->entity->label()]);
   }
 
   /**
@@ -47,7 +47,7 @@ class MailchimpCampaignDeleteForm extends EntityConfirmFormBase {
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
     if (mailchimp_campaign_delete_campaign($this->entity)) {
-      drupal_set_message($this->t('MailChimp Campaign %label has been deleted.', array('%label' => $this->entity->label())));
+      drupal_set_message($this->t('MailChimp Campaign %label has been deleted.', ['%label' => $this->entity->label()]));
     }
 
     $form_state->setRedirectUrl($this->getCancelUrl());
@@ -65,4 +65,5 @@ class MailchimpCampaignDeleteForm extends EntityConfirmFormBase {
   public function afterBuild(array $element, FormStateInterface $form_state) {
     return $element;
   }
+
 }
diff --git a/modules/mailchimp_campaign/src/Form/MailchimpCampaignForm.php b/modules/mailchimp_campaign/src/Form/MailchimpCampaignForm.php
index 565199a..dd2279a 100644
--- a/modules/mailchimp_campaign/src/Form/MailchimpCampaignForm.php
+++ b/modules/mailchimp_campaign/src/Form/MailchimpCampaignForm.php
@@ -52,31 +52,31 @@ class MailchimpCampaignForm extends ContentEntityForm {
 
     $form_state->set('campaign', $campaign);
 
-    $form['title'] = array(
+    $form['title'] = [
       '#type' => 'textfield',
-      '#title' => t('Title'),
+      '#title' => $this->t('Title'),
       '#description' => 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' => t('Subject'),
+      '#title' => $this->t('Subject'),
       '#required' => TRUE,
       '#default_value' => (!empty($campaign->mc_data)) ? $campaign->mc_data->settings->subject_line : '',
-    );
+    ];
     $mailchimp_lists = mailchimp_get_lists();
-    $form['list_id'] = array(
+    $form['list_id'] = [
       '#type' => 'select',
-      '#title' => t('List'),
+      '#title' => $this->t('List'),
       '#description' => t('Select the list 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');
@@ -88,16 +88,16 @@ class MailchimpCampaignForm extends ContentEntityForm {
       }
     }
 
-    $list_segments = array();
+    $list_segments = [];
     if (isset($list_id)) {
       $list_segments = mailchimp_campaign_get_list_segments($list_id, 'saved');
     }
 
-    $form['list_segment_id'] = array(
+    $form['list_segment_id'] = [
       '#type' => 'select',
-      '#title' => t('List Segment'),
-      '#description' => t('Select the list segment this campaign should be sent to.'),
-    );
+      '#title' => $this->t('List Segment'),
+      '#description' => $this->t('Select the list segment 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 : '';
@@ -106,48 +106,48 @@ class MailchimpCampaignForm extends ContentEntityForm {
     $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' => t('From Email'),
-      '#description' => t('the From: email address for your campaign message.'),
+      '#title' => $this->t('From Email'),
+      '#description' => $this->t('the From: email address for your campaign message.'),
       '#default_value' => (!empty($campaign->mc_data)) ? $campaign->mc_data->settings->reply_to : $site_config->get('mail'),
       '#size' => 40,
       '#maxlength' => 255,
       '#required' => TRUE,
-    );
-    $form['from_name'] = array(
+    ];
+    $form['from_name'] = [
       '#type' => 'textfield',
-      '#title' => t('From Name'),
-      '#description' => t('the From: name for your campaign message (not an email address)'),
+      '#title' => $this->t('From Name'),
+      '#description' => $this->t('the From: name for your campaign message (not an email address)'),
       '#default_value' => (!empty($campaign->mc_data)) ? $campaign->mc_data->settings->from_name : $site_config->get('name'),
       '#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' => t('Template'),
-      '#description' => 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.'),
+      '#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' => t('Content sections'),
-      '#description' => t('The HTML content or, if a template is selected, the content for each section.'),
+      '#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'))) {
@@ -164,7 +164,7 @@ class MailchimpCampaignForm extends ContentEntityForm {
       $merge_vars = $merge_vars_list[$list_id];
     }
     else {
-      $merge_vars = array();
+      $merge_vars = [];
     }
 
     $campaign_template = $campaign->getTemplate();
@@ -189,17 +189,17 @@ class MailchimpCampaignForm extends ContentEntityForm {
           $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'];
@@ -215,19 +215,19 @@ class MailchimpCampaignForm extends ContentEntityForm {
     else {
       $section = 'html';
 
-      $form['content']['html_wrapper'] = array(
+      $form['content']['html_wrapper'] = [
         '#type' => 'details',
-        '#title' => t('Content'),
+        '#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' => t('Content'),
-        '#description' => t('The HTML content of the 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'];
@@ -241,14 +241,14 @@ class MailchimpCampaignForm extends ContentEntityForm {
 
     // Message preview:
     if (!empty($form_state->getValue('mailchimp_campaign_campaign_preview'))) {
-      $form['preview_wrapper'] = array(
-        '#title' => t('Campaign content preview'),
+      $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;
@@ -262,11 +262,11 @@ class MailchimpCampaignForm extends ContentEntityForm {
 
     $actions['submit']['#value'] = t('Save as draft');
 
-    $actions['preview'] = array(
+    $actions['preview'] = [
       '#type' => 'submit',
-      '#value' => t('Preview content'),
-      '#submit' => array('::submitForm', '::preview'),
-    );
+      '#value' => $this->t('Preview content'),
+      '#submit' => ['::submitForm', '::preview'],
+    ];
 
     return $actions;
   }
@@ -277,22 +277,22 @@ class MailchimpCampaignForm extends ContentEntityForm {
   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'],
-    );
+    ];
 
     $template_content = $this->parseTemplateContent($form_state->getValue('content'));
 
@@ -414,7 +414,7 @@ class MailchimpCampaignForm extends ContentEntityForm {
    *   Associative array of item IDs to name.
    */
   private function buildOptionList($list, $no_selection_label = '-- Select --', $labels = array()) {
-    $options = array();
+    $options = [];
     if ($no_selection_label) {
       $options[''] = $no_selection_label;
     }
@@ -446,9 +446,9 @@ class MailchimpCampaignForm extends ContentEntityForm {
    *   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.
@@ -470,7 +470,7 @@ class MailchimpCampaignForm extends ContentEntityForm {
    *   Associative array of view mode IDs to name.
    */
   private function buildEntityViewModeOptionList($entity_type) {
-    $options = array();
+    $options = [];
 
     $view_modes = \Drupal::service('entity_display.repository')->getViewModes($entity_type);
 
@@ -493,85 +493,85 @@ class MailchimpCampaignForm extends ContentEntityForm {
    *   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' => t('Insert site content'),
-      '#description' => 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.'),
+      '#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' => t('Entity Type'),
+      '#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' => t('Entity Title'),
+        '#title' => $this->t('Entity Title'),
         // 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' => t('View Mode'),
+        '#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);">' . t('Insert entity token') . '</a>',
-      '#states' => array(
-        'invisible' => array(
-          ':input[name="content[' . $section . '_wrapper][entity_import][entity_type]"]' => array('value' => ''),
-        ),
-      ),
-    );
-
-    $form['entity_import']['entity_import_tag'] = array(
+      '#markup' => '<a id="' . $section . '-add-entity-token-link" class="add-entity-token-link" href="javascript:void(0);">' . $this->t('Insert entity token') . '</a>',
+      '#states' => [
+        'invisible' => [
+          ':input[name="content[' . $section . '_wrapper][entity_import][entity_type]"]' => ['value' => ''],
+        ],
+      ],
+    ];
+
+    $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;
   }
@@ -588,7 +588,7 @@ class MailchimpCampaignForm extends ContentEntityForm {
   private function getEntitiesForContentImport() {
     $entity_info = \Drupal::entityTypeManager()->getDefinitions();
 
-    $filtered_entities = array();
+    $filtered_entities = [];
 
     foreach ($entity_info as $key => $entity) {
       $entity_keys = $entity->getKeys();
@@ -608,7 +608,9 @@ class MailchimpCampaignForm extends ContentEntityForm {
    *
    * @param array $merge_vars
    *   Array of MailChimp merge vars for the current list.
+   *
    * @see mailchimp_get_mergevars
+   *
    * @param string $list_name
    *   The name of the current list.
    *
@@ -616,31 +618,31 @@ class MailchimpCampaignForm extends ContentEntityForm {
    *   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(
-          'merge-vars-wrapper'
-        ),
-      ),
-    );
+      '#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' => t(
+      '#description' => $this->t(
         'Insert merge variables from the %list_name list or one of the @standard_link.',
-        array(
+        [
           '%list_name' => $list_name,
           '@standard_link' => Link::fromTextAndUrl(t('standard MailChimp merge variables'), $merge_vars_url)->toString(),
-        )
+        ]
       ),
-    );
+    ];
 
     return $form;
   }
@@ -649,36 +651,38 @@ class MailchimpCampaignForm extends ContentEntityForm {
    * Builds a HTML string used to render merge vars on the campaign form.
    *
    * @param array $merge_vars
-   *   Array of merge vars. @see mailchimp_lists_get_merge_vars
+   *   Array of merge vars.
+   *
+   * @see mailchimp_lists_get_merge_vars
    *
    * @return string
    *   HTML string containing formatted merge vars.
    */
   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>',
-          );
+          ];
         }
       }
 
       return render($element);
     }
     else {
-      return t('No custom merge vars exist for the current list.');
+      return $this->t('No custom merge vars exist for the current list.');
     }
   }
 
@@ -692,7 +696,7 @@ class MailchimpCampaignForm extends ContentEntityForm {
    *   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 75318b1..f308e3a 100644
--- a/modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php
+++ b/modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php
@@ -18,7 +18,7 @@ class MailchimpCampaignSendForm extends EntityConfirmFormBase {
    */
   public function getQuestion() {
     return $this->t('Are you sure you want to send %name?',
-      array('%name' => $this->entity->label()));
+      ['%name' => $this->entity->label()]);
   }
 
   /**
@@ -66,4 +66,5 @@ class MailchimpCampaignSendForm extends EntityConfirmFormBase {
   public function afterBuild(array $element, FormStateInterface $form_state) {
     return $element;
   }
+
 }
diff --git a/modules/mailchimp_campaign/src/MailchimpCampaignAccessControlHandler.php b/modules/mailchimp_campaign/src/MailchimpCampaignAccessControlHandler.php
index 9470bc2..dc4b0b1 100644
--- a/modules/mailchimp_campaign/src/MailchimpCampaignAccessControlHandler.php
+++ b/modules/mailchimp_campaign/src/MailchimpCampaignAccessControlHandler.php
@@ -5,7 +5,6 @@ namespace Drupal\mailchimp_campaign;
 use Drupal\Core\Access\AccessResult;
 use Drupal\Core\Entity\EntityAccessControlHandler;
 use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\Session\AccountInterface;
 
 /**
@@ -25,8 +24,11 @@ class MailchimpCampaignAccessControlHandler extends EntityAccessControlHandler {
       case 'delete':
         return ($status == MAILCHIMP_STATUS_SENT) ? AccessResult::forbidden() : AccessResult::allowed();
         break;
+
       case 'stats':
         return ($status == MAILCHIMP_STATUS_SENT) ? AccessResult::allowed() : AccessResult::forbidden();
+        break;
+
       default:
         return parent::access($entity, $operation, $account, $return_as_object);
     }
diff --git a/modules/mailchimp_campaign/src/MailchimpCampaignInterface.php b/modules/mailchimp_campaign/src/MailchimpCampaignInterface.php
index 6ca7914..154a732 100644
--- a/modules/mailchimp_campaign/src/MailchimpCampaignInterface.php
+++ b/modules/mailchimp_campaign/src/MailchimpCampaignInterface.php
@@ -10,5 +10,4 @@ use Drupal\Core\Entity\ContentEntityInterface;
  * @ingroup mailchimp_campaign
  */
 interface MailchimpCampaignInterface extends ContentEntityInterface {
-  
 }
diff --git a/modules/mailchimp_campaign/src/MailchimpCampaignUninstallValidator.php b/modules/mailchimp_campaign/src/MailchimpCampaignUninstallValidator.php
index 3643516..984620b 100644
--- a/modules/mailchimp_campaign/src/MailchimpCampaignUninstallValidator.php
+++ b/modules/mailchimp_campaign/src/MailchimpCampaignUninstallValidator.php
@@ -22,7 +22,6 @@ class MailChimpCampaignUninstallValidator extends FilterUninstallValidator {
 
   /**
    * Deletes config.
-   *
    */
   protected function removeFilterConfig() {
     $mailchimp_campaign_filter = \Drupal::configFactory()->getEditable('filter.format.mailchimp_campaign');
@@ -31,4 +30,4 @@ class MailChimpCampaignUninstallValidator extends FilterUninstallValidator {
     drupal_flush_all_caches();
   }
 
-}
\ No newline at end of file
+}
diff --git a/modules/mailchimp_campaign/src/Plugin/Filter/FilterMailchimpCampaign.php b/modules/mailchimp_campaign/src/Plugin/Filter/FilterMailchimpCampaign.php
index 42865f9..2418919 100644
--- a/modules/mailchimp_campaign/src/Plugin/Filter/FilterMailchimpCampaign.php
+++ b/modules/mailchimp_campaign/src/Plugin/Filter/FilterMailchimpCampaign.php
@@ -25,7 +25,7 @@ class FilterMailchimpCampaign extends FilterBase {
 
     // 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 @@ class FilterMailchimpCampaign extends FilterBase {
   /**
    * 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) {
@@ -46,9 +46,11 @@ class FilterMailchimpCampaign extends FilterBase {
         case 1:
           $entity_type = $match;
           break;
+
         case 2:
           $entity_id = $match;
           break;
+
         case 3:
           $view_mode = $match;
           break;
@@ -75,7 +77,7 @@ class FilterMailchimpCampaign extends FilterBase {
    */
   public function tips($long = FALSE) {
     $tip = 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 +88,7 @@ class FilterMailchimpCampaign extends FilterBase {
    */
   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..4434e36 100644
--- a/modules/mailchimp_campaign/src/Tests/MailchimpCampaignTest.php
+++ b/modules/mailchimp_campaign/src/Tests/MailchimpCampaignTest.php
@@ -14,7 +14,10 @@ class MailchimpCampaignTest extends MailchimpCampaignTestBase {
    *
    * @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 59a69ec..f575dc4 100644
--- a/modules/mailchimp_lists/mailchimp_lists.module
+++ b/modules/mailchimp_lists/mailchimp_lists.module
@@ -36,7 +36,7 @@ function mailchimp_lists_entity_delete($entity) {
   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);
     }
   }
 }
@@ -155,13 +155,13 @@ function mailchimp_lists_process_subscribe_form_choices($choices, MailchimpLists
 
   if ($function) {
     if ($function == 'remove') {
-      $mergevars = array();
+      $mergevars = [];
     }
     else {
       $mergevars = _mailchimp_lists_mergevars_populate($settings['merge_fields'], $entity, $entity->getEntityType());
     }
 
-    $interests = isset($choices['interest_groups']) ? $choices['interest_groups'] : array();
+    $interests = isset($choices['interest_groups']) ? $choices['interest_groups'] : [];
 
     switch ($function) {
       case 'add':
@@ -204,7 +204,6 @@ function _mailchimp_lists_subscription_has_changed(MailchimpListsSubscription $i
     $original = $entity->original;
 
     // First compare Interest Group settings.
-
     if ($settings['show_interest_groups']) {
       $field_name = $instance->getFieldDefinition()->getName();
 
@@ -234,7 +233,6 @@ function _mailchimp_lists_subscription_has_changed(MailchimpListsSubscription $i
     }
 
     // Compare merge field settings.
-
     foreach ($settings['merge_fields'] as $property) {
       $elements = explode(':', $property);
 
@@ -274,7 +272,7 @@ function _mailchimp_lists_subscription_has_changed(MailchimpListsSubscription $i
         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) {
@@ -296,7 +294,7 @@ function _mailchimp_lists_subscription_has_changed(MailchimpListsSubscription $i
  * Helper function to complete a mailchimp-api-ready mergevars array.
  */
 function _mailchimp_lists_mergevars_populate($merge_fields, EntityInterface $entity, $entity_type) {
-  $mergevars = array();
+  $mergevars = [];
 
   foreach ($merge_fields as $label => $property) {
     if (!empty($property) && strlen($property)) {
@@ -339,28 +337,28 @@ function mailchimp_lists_update_member_merge_values($entity_type, $bundle_name,
   $merge_fields = $field->getSetting('merge_fields');
 
   // Assemble a list of current subscription statuses so we don't alter them.
-  // Because of cacheing we don't want to use the standard checks. Expiring the
+  // Because of caching 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);
 }
@@ -370,16 +368,16 @@ function mailchimp_lists_update_member_merge_values($entity_type, $bundle_name,
  */
 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');
 
@@ -393,7 +391,7 @@ function mailchimp_lists_get_subscribers(FieldConfig $field, &$context) {
       $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'];
   }
 }
@@ -417,7 +415,7 @@ function mailchimp_lists_populate_member_batch($entity_type, $bundle_name, $fiel
 
     if ($context['sandbox']['max']) {
       $context['sandbox']['entity_ids'] = array_keys($query_results);
-      $context['results']['update_queue'] = array();
+      $context['results']['update_queue'] = [];
     }
   }
 
@@ -430,12 +428,12 @@ function mailchimp_lists_populate_member_batch($entity_type, $bundle_name, $fiel
       $merge_vars = _mailchimp_lists_mergevars_populate($mergefields, $entity, $entity_type);
 
       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']++;
@@ -488,10 +486,10 @@ function mailchimp_lists_execute_mergevar_batch_update($list_id, &$context) {
     $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'];
@@ -505,17 +503,17 @@ function mailchimp_lists_populate_member_batch_complete($success, $results, $ope
   if ($success) {
     if ($results['errors']) {
       drupal_set_message(t('Update errors occurred: merge variables updated on %count records, errors occurred on %errors records.',
-        array(
+        [
           '%count' => $results['updates'],
           '%errors' => $results['errors'],
-        )
+        ]
       ), 'warning');
     }
     else {
       drupal_set_message(t('Merge variables updated on %count records.',
-        array(
+        [
           '%count' => $results['updates'],
-        )
+        ]
       ), 'status');
     }
   }
@@ -531,14 +529,14 @@ function mailchimp_lists_populate_member_batch_complete($success, $results, $ope
  *   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',
-  );
+  ];
 }
 
 /**
@@ -551,7 +549,7 @@ function mailchimp_lists_default_webhook_events() {
  *   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 fb49a20..9c0daa3 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 list'),
-    '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 List Subscription Field'),
         'description' => t('Subscription Field connected to the desired Mailchimp List.'),
         '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 ce70a05..99c4f7e 100644
--- a/modules/mailchimp_lists/src/Controller/MailchimpFieldsController.php
+++ b/modules/mailchimp_lists/src/Controller/MailchimpFieldsController.php
@@ -15,10 +15,10 @@ class MailchimpFieldsController extends ControllerBase {
    * {@inheritdoc}
    */
   public function overview() {
-    $content = array();
+    $content = [];
 
-    $content['description'] = array(
-      '#markup' => t('This displays a list of all Mailchimp Subscription Fields
+    $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
         screen and use the Field UI.
@@ -31,13 +31,18 @@ class MailchimpFieldsController extends ControllerBase {
         MailChimp subscribers for each field configuration using the \'Batch Update\'
         option on this table. The MailChimp Subscription Field is provided by the
         Mailchimp Lists (mailchimp_lists) module.')
-    );
+    ];
 
-    $content['fields_table'] = array(
+    $content['fields_table'] = [
       '#type' => 'table',
-      '#header' => array(t('Entity Type'), t('Bundle'), t('Field'), t('Batch Update'),),
+      '#header' => [
+       $this->t('Entity Type'),
+       $this->t('Bundle'),
+       $this->t('Field'),
+       $this->t('Batch Update'),
+       ],
       '#empty' => '',
-    );
+    ];
 
     $field_map = \Drupal::entityManager()->getFieldMap();
 
@@ -46,25 +51,25 @@ class MailchimpFieldsController extends ControllerBase {
       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(
-              '#markup' => Link::fromTextAndUrl(t('Update Mailchimp Mergevar Values'), $batch_update_url)->toString(),
-            );
+            ];
+            $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 e9f112c..fa9496d 100644
--- a/modules/mailchimp_lists/src/Controller/MailchimpListsController.php
+++ b/modules/mailchimp_lists/src/Controller/MailchimpListsController.php
@@ -16,54 +16,58 @@ class MailchimpListsController extends ControllerBase {
    * {@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 = t('You don\'t have any lists configured in your
+    $lists_empty_message = $this->t('You don\'t have any lists 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 lists, then
       come back here and click "Refresh lists from MailChimp"',
-      array('@link' => Link::fromTextAndUrl(t('MailChimp'), $lists_admin_url)->toString()));
+      ['@link' => Link::fromTextAndUrl(t('MailChimp'), $lists_admin_url)->toString()]);
 
-    $content['lists_table'] = array(
+    $content['lists_table'] = [
       '#type' => 'table',
-      '#header' => array(t('Name'), t('Members'), 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 lists from Mailchimp',
       '#type' => 'link',
       '#url' => $refresh_url
-    );
+    ];
 
     return $content;
   }
diff --git a/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php b/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php
index 8dfbb5b..4e16ce6 100644
--- a/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php
+++ b/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php
@@ -55,7 +55,7 @@ class MailchimpListsClearCacheForm extends ConfirmFormBase {
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-    mailchimp_get_lists(array(), TRUE);
+    mailchimp_get_lists([], TRUE);
     drupal_set_message(t('MailChimp lists cache cleared.'));
   }
 
diff --git a/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php b/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php
index e0b8ff8..a227136 100644
--- a/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php
+++ b/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php
@@ -65,7 +65,7 @@ class MailchimpListsSubscribeForm extends FormBase {
    * {@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 @@ class MailchimpListsSubscribeForm extends FormBase {
 
     $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 @@ class MailchimpListsSubscribeForm extends FormBase {
     // 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'] : t('Interest Groups'),
+          '#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' => t('Save'),
-    );
+      '#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 0f785f9..706a8d1 100644
--- a/modules/mailchimp_lists/src/Form/MailchimpListsWebhookSettingsForm.php
+++ b/modules/mailchimp_lists/src/Form/MailchimpListsWebhookSettingsForm.php
@@ -37,21 +37,22 @@ class MailchimpListsWebhookSettingsForm extends ConfigFormBase {
     $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' => t('Enabled webhook events for the @name list',
-        array(
+      '#title' => $this->t('Enabled webhook events for the @name list',
+        [
           '@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);
@@ -74,7 +75,7 @@ class MailchimpListsWebhookSettingsForm extends ConfigFormBase {
 
     $webhook_events = $form_state->getValue('webhook_events');
 
-    $events = array();
+    $events = [];
     foreach ($webhook_events as $webhook_id => $enable) {
       $events[$webhook_id] = ($enable === 1);
     }
@@ -112,16 +113,16 @@ class MailchimpListsWebhookSettingsForm extends ConfigFormBase {
 
     if ($result) {
       drupal_set_message(t('Webhooks for list "%name" have been updated.',
-        array(
+        [
           '%name' => $list->name,
-        )
+        ]
       ));
     }
     else {
       drupal_set_message(t('Unable to update webhooks for list "%name".',
-        array(
+        [
           '%name' => $list->name,
-        )
+        ]
       ), 'warning');
     }
 
diff --git a/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php b/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php
index c7ead23..7af0cb8 100644
--- a/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php
+++ b/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php
@@ -23,9 +23,9 @@ class MailchimpListsFieldSubscribeFormatter extends FormatterBase {
    * {@inheritdoc}
    */
   public static function defaultSettings() {
-    $settings = array(
+    $settings = [
       'show_interest_groups' => FALSE,
-    );
+    ];
 
     return $settings;
   }
@@ -39,13 +39,13 @@ class MailchimpListsFieldSubscribeFormatter extends FormatterBase {
     $field_settings = $this->getFieldSettings();
     $settings = $this->getSettings();
 
-    $form['show_interest_groups'] = array(
+    $form['show_interest_groups'] = [
       '#title' => t('Show Interest Groups'),
       '#type' => 'checkbox',
       '#description' => $field_settings['show_interest_groups'] ? t('Check to display interest group membership details.') : 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 @@ class MailchimpListsFieldSubscribeFormatter extends FormatterBase {
     $field_settings = $this->getFieldSettings();
     $settings = $this->getSettings();
 
-    $summary = array();
+    $summary = [];
 
     if ($field_settings['show_interest_groups'] && $settings['show_interest_groups']) {
       $summary[] = t('Display Interest Groups');
@@ -73,7 +73,7 @@ class MailchimpListsFieldSubscribeFormatter extends FormatterBase {
    * {@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 f66bd19..d9b402a 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 @@ class MailchimpListsSubscribeDefaultFormatter extends FormatterBase {
    * {@inheritdoc}
    */
   public static function defaultSettings() {
-    $settings = array(
+    $settings = [
       'show_interest_groups' => FALSE,
-    );
+    ];
 
     return $settings;
   }
@@ -39,13 +39,13 @@ class MailchimpListsSubscribeDefaultFormatter extends FormatterBase {
     $field_settings = $this->getFieldSettings();
     $settings = $this->getSettings();
 
-    $form['show_interest_groups'] = array(
+    $form['show_interest_groups'] = [
       '#title' => t('Show Interest Groups'),
       '#type' => 'checkbox',
       '#description' => $field_settings['show_interest_groups'] ? t('Check to display interest group membership details.') : 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 @@ class MailchimpListsSubscribeDefaultFormatter extends FormatterBase {
     $field_settings = $this->getFieldSettings();
     $settings = $this->getSettings();
 
-    $summary = array();
+    $summary = [];
 
     if ($field_settings['show_interest_groups'] && $settings['show_interest_groups']) {
       $summary[] = t('Display Interest Groups');
@@ -73,11 +73,11 @@ class MailchimpListsSubscribeDefaultFormatter extends FormatterBase {
    * {@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,32 +86,33 @@ class MailchimpListsSubscribeDefaultFormatter extends FormatterBase {
 
       if ($email) {
         if (mailchimp_is_subscribed($field_settings['mc_list_id'], $email)) {
-          $status = t('Subscribed to %list', array('%list' => $mc_list->name));
+          $status = t('Subscribed to %list', ['%list' => $mc_list->name]);
         }
         else {
-          $status = t('Not subscribed to %list', array('%list' => $mc_list->name));
+          $status = t('Not subscribed to %list', ['%list' => $mc_list->name]);
         }
       }
       else {
         $status = t('Invalid email configuration.');
       }
-      $elements[$delta]['status'] = array(
+      $elements[$delta]['status'] = [
         '#markup' => $status,
-        '#description' => t('@mc_list_description', array(
+        '#description' => 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' => t('Interest Groups'),
             '#weight' => 100,
-          );
+          ];
 
           foreach ($mc_list->intgroups as $interest_group) {
             $items = array();
@@ -122,12 +123,12 @@ class MailchimpListsSubscribeDefaultFormatter extends FormatterBase {
             }
 
             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',
-              );
+              ];
             }
           }
         }
@@ -137,4 +138,5 @@ class MailchimpListsSubscribeDefaultFormatter extends FormatterBase {
 
     return $elements;
   }
+
 }
diff --git a/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php b/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php
index 856644a..597e067 100644
--- a/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php
+++ b/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php
@@ -28,45 +28,45 @@ class MailchimpListsSubscription extends FieldItemBase {
    * {@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 [
       'show_interest_groups' => 0,
       'interest_groups_label' => '',
       'merge_fields' => array(),
       '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,
-    );
+    ];
   }
 
   /**
@@ -91,14 +91,14 @@ class MailchimpListsSubscription extends FieldItemBase {
     $element = parent::storageSettingsForm($form, $form_state, $has_data);
 
     $lists = mailchimp_get_lists();
-    $options = array('' => 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);
     }
@@ -120,31 +120,31 @@ class MailchimpListsSubscription extends FieldItemBase {
     }
 
     $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' => t('MailChimp List'),
+      '#title' => $this->t('MailChimp List'),
       '#multiple' => FALSE,
-      '#description' => t('Available MailChimp lists which are not already
+      '#description' => $this->t('Available MailChimp lists which are not already
         attached to Mailchimp Subscription Fields. If there are no options,
         make sure you have created a list at @MailChimp first, then @cacheclear.',
-        array(
+        [
           '@MailChimp' => Link::fromTextAndUrl('MailChimp', $mailchimp_url)->toString(),
           '@cacheclear' => Link::fromTextAndUrl('clear your list 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.',
+      '#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' => $this->getSetting('double_opt_in'),
       '#disabled' => $has_data,
-    );
+    ];
 
     return $element;
   }
@@ -163,32 +163,32 @@ class MailchimpListsSubscription extends FieldItemBase {
     $this->definition;
     $instance_settings = $this->definition->getSettings();
 
-    $element['show_interest_groups'] = array(
-      '#title' => "Enable Interest Groups",
+    $element['show_interest_groups'] = [
+      '#title' => $this->t("Enable Interest Groups"),
       '#type' => "checkbox",
       '#default_value' => $instance_settings['show_interest_groups'],
-    );
-    $element['interest_groups_label'] = array(
-      '#title' => "Interest Groups Label",
+    ];
+    $element['interest_groups_label'] = [
+      '#title' => $this->t("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' => t('Merge Fields'),
-      '#description' => t('Multi-value fields will only sync their first value to Mailchimp, as Mailchimp does not support multi-value fields.'),
+      '#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(
-      '#title' => "Unsubscribe on deletion",
+    $element['unsubscribe_on_delete'] = [
+      '#title' => $this->t("Unsubscribe on deletion"),
       '#type' => "checkbox",
-      '#description' => t('Unsubscribe entities from this list when they are deleted.'),
+      '#description' => $this->t('Unsubscribe entities from this list 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();
 
@@ -203,21 +203,21 @@ class MailchimpListsSubscription extends FieldItemBase {
 
     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') {
-          $element['merge_fields'][$mergevar->tag]['#description'] = t('Any entity with an empty or invalid email address field value will simply be ignored by the Mailchimp subscription system. <em>This is why the Email field is the only required merge field which can sync to non-required fields.</em>');
+          $element['merge_fields'][$mergevar->tag]['#description'] = $this->t('Any entity with an empty or invalid email address field value will simply be ignored by the Mailchimp subscription system. <em>This is why the Email field is the only required merge field which can sync to non-required fields.</em>');
         }
       }
       else {
         $element['merge_fields'][$mergevar->tag]['#options'] = $required_fields;
-        $element['merge_fields'][$mergevar->tag]['#description'] = t("Only 'required' and 'calculated' fields are allowed to be synced with Mailchimp 'required' merge fields.");
+        $element['merge_fields'][$mergevar->tag]['#description'] = $this->t("Only 'required' and 'calculated' fields are allowed to be synced with Mailchimp 'required' merge fields.");
       }
     }
     return $element;
@@ -289,7 +289,7 @@ class MailchimpListsSubscription extends FieldItemBase {
    *   List of properties that can be used as an #options list.
    */
   private function getFieldmapOptions($entity_type, $entity_bundle = NULL, $required = FALSE, $prefix = NULL, $tree = NULL) {
-    $options = array();
+    $options = [];
     if (!$prefix) {
       $options[''] = t('-- Select --');
     }
@@ -335,4 +335,5 @@ class MailchimpListsSubscription extends FieldItemBase {
     }
     return $options;
   }
+
 }
diff --git a/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php b/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php
index 9045fc9..4266bd7 100644
--- a/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php
+++ b/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php
@@ -40,45 +40,45 @@ class MailchimpListsSelectWidget extends WidgetBase {
       }
     }
 
-    $element += array(
+    $element += [
       '#title' => Html::escape($element['#title']),
       '#type' => 'fieldset',
-    );
+    ];
 
-    $element['subscribe'] = array(
-      '#title' => t('Subscribe'),
+    $element['subscribe'] = [
+      '#title' => $this->t('Subscribe'),
       '#type' => 'checkbox',
       '#default_value' => ($subscribe_default)? TRUE : $this->fieldDefinition->isRequired(),
       '#required' => $this->fieldDefinition->isRequired(),
       '#disabled' => $this->fieldDefinition->isRequired(),
-    );
+    ];
 
     $form_id = $form_state->getFormObject()->getFormId();
 
     if ($this->fieldDefinition->getSetting('show_interest_groups') || ($form_id == 'field_config_edit_form')) {
       $mc_list = mailchimp_get_list($instance->getFieldDefinition()->getSetting('mc_list_id'));
 
-      $element['interest_groups'] = array(
+      $element['interest_groups'] = [
         '#type' => 'fieldset',
         '#title' => Html::escape($instance->getFieldDefinition()->getSetting('interest_groups_title')),
         '#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 ($form_id == 'field_config_edit_form') {
-        $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)) {
@@ -86,7 +86,7 @@ class MailchimpListsSelectWidget extends WidgetBase {
       }
     }
 
-    return array('value' => $element);
+    return ['value' => $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 @@ class MailchimpListsSubscriptionTest extends MailchimpListsTestBase {
    *
    * @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 @@ class MailchimpListsSubscriptionTest extends MailchimpListsTestBase {
     $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..8ae198e 100644
--- a/modules/mailchimp_lists/src/Tests/MailchimpListsTest.php
+++ b/modules/mailchimp_lists/src/Tests/MailchimpListsTest.php
@@ -14,7 +14,11 @@ class MailchimpListsTest extends MailchimpListsTestBase {
    *
    * @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 +36,10 @@ class MailchimpListsTest extends MailchimpListsTestBase {
    * 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 +56,9 @@ class MailchimpListsTest extends MailchimpListsTestBase {
    * 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..563bc59 100644
--- a/modules/mailchimp_lists/src/Tests/MailchimpListsWebhookTest.php
+++ b/modules/mailchimp_lists/src/Tests/MailchimpListsWebhookTest.php
@@ -14,7 +14,7 @@ class MailchimpListsWebhookTest extends MailchimpListsTestBase {
    *
    * @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.
@@ -42,11 +42,11 @@ class MailchimpListsWebhookTest extends MailchimpListsTestBase {
     $events = array(
       '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 3527deb..afc2962 100644
--- a/modules/mailchimp_signup/mailchimp_signup.module
+++ b/modules/mailchimp_signup/mailchimp_signup.module
@@ -5,7 +5,7 @@
  * Creates signup forms integrated with MailChimp.
  */
 
-use \Drupal\mailchimp_signup\Entity\MailchimpSignup;
+use Drupal\mailchimp_signup\Entity\MailchimpSignup;
 
 define('MAILCHIMP_SIGNUP_BLOCK', 1);
 define('MAILCHIMP_SIGNUP_PAGE', 2);
@@ -35,7 +35,7 @@ function mailchimp_signup_load($signup_id) {
  * @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 bf9b0e8..76756af 100644
--- a/modules/mailchimp_signup/src/Controller/MailchimpSignupController.php
+++ b/modules/mailchimp_signup/src/Controller/MailchimpSignupController.php
@@ -20,7 +20,7 @@ class MailchimpSignupController extends ControllerBase {
    *   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 02c99d4..54e3290 100644
--- a/modules/mailchimp_signup/src/Controller/MailchimpSignupListBuilder.php
+++ b/modules/mailchimp_signup/src/Controller/MailchimpSignupListBuilder.php
@@ -37,13 +37,13 @@ class MailchimpSignupListBuilder extends ConfigEntityListBuilder {
     $block_mode = [
       '#title' => $this->t('Block'),
       '#type' => 'link',
-      '#url' => $block_url
+      '#url' => $block_url,
     ];
 
     $page_mode = [
       '#title' => $this->t('Page'),
       '#type' => 'link',
-      '#url' => $page_url
+      '#url' => $page_url,
     ];
 
     $modes = NULL;
@@ -53,31 +53,33 @@ class MailchimpSignupListBuilder extends ConfigEntityListBuilder {
       case MAILCHIMP_SIGNUP_BLOCK:
         $modes = $block_mode;
         break;
+
       case MAILCHIMP_SIGNUP_PAGE:
         $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 0258312..93bdbe6 100644
--- a/modules/mailchimp_signup/src/Form/MailchimpSignupDeleteForm.php
+++ b/modules/mailchimp_signup/src/Form/MailchimpSignupDeleteForm.php
@@ -17,7 +17,7 @@ class MailchimpSignupDeleteForm extends EntityConfirmFormBase {
    * {@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()]);
   }
 
   /**
@@ -42,8 +42,9 @@ class MailchimpSignupDeleteForm extends EntityConfirmFormBase {
 
     \Drupal::service('router.builder')->setRebuildNeeded();
 
-    drupal_set_message($this->t('Signup Form %label has been deleted.', array('%label' => $this->entity->label())));
+    drupal_set_message($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 182cdd7..dbf7d80 100644
--- a/modules/mailchimp_signup/src/Form/MailchimpSignupForm.php
+++ b/modules/mailchimp_signup/src/Form/MailchimpSignupForm.php
@@ -43,7 +43,7 @@ class MailchimpSignupForm extends EntityForm {
 
     $signup = $this->entity;
 
-    $form['title'] = array(
+    $form['title'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Title'),
       '#size' => 35,
@@ -51,181 +51,181 @@ class MailchimpSignupForm extends EntityForm {
       '#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' => t('A unique machine-readable name for this list. It must only contain lowercase letters, numbers, and underscores.'),
+      ],
+      '#description' => $this->t('A unique machine-readable name for this list. 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' => t('This description will be shown on the signup form below the title. (500 characters or less)'),
-    );
-    $mode_defaults = array(
+      '#description' => $this->t('This description will be shown on the signup form below the title. (500 characters or less)'),
+    ];
+    $mode_defaults = [
       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(
+    ];
+    $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) ? $mode_defaults[$signup->mode] : array(),
-    );
+      ],
+      '#default_value' => !empty($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' => t('Path to the signup page. ie "newsletter/signup".'),
+      '#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),
-        ),
-      ),
-    );
-
-    $form['settings']['submit_button'] = array(
+        'visible' => [
+          ':input[name="mode[' . MAILCHIMP_SIGNUP_PAGE . ']"]' => ['checked' => TRUE],
+        ],
+        'required' => [
+          ':input[name="mode[' . MAILCHIMP_SIGNUP_PAGE . ']"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
+
+    $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['mc_lists_config'] = array(
+    $form['mc_lists_config'] = [
       '#type' => 'details',
-      '#title' => t('MailChimp List Selection & Configuration'),
+      '#title' => $this->t('MailChimp List 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' => t('MailChimp Lists'),
-      '#description' => t('Select which lists to show on your signup form. You can create additional lists at @MailChimp.',
-        array('@MailChimp' => $mc_admin_url->toString())),
+      '#title' => $this->t('MailChimp Lists'),
+      '#description' => $this->t('Select which lists to show on your signup form. You can create additional lists at @MailChimp.',
+        ['@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' => t('Retrieving merge fields for this list.'),
-        ),
-      ),
-    );
+          'message' => $this->t('Retrieving merge fields for this list.'),
+        ],
+      ],
+    ];
 
-    $form['mc_lists_config']['mergefields'] = array(
+    $form['mc_lists_config']['mergefields'] = [
       '#prefix' => '<div id="mergefields-wrapper">',
       '#suffix' => '</div>',
-    );
+    ];
 
     // Show merge fields if changing list field or editing existing list.
     if ($form_state->getValue('mc_lists') || !$signup->isNew()) {
-      $form['mc_lists_config']['mergefields'] = array(
+      $form['mc_lists_config']['mergefields'] = [
         '#type' => 'fieldset',
-        '#title' => t('Merge Field Display'),
-        '#description' => t('Select the merge fields to show on registration forms. Required fields are automatically displayed.'),
+        '#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' => t('Subscription Settings'),
+      '#title' => $this->t('Subscription Settings'),
       '#open' => TRUE,
-    );
+    ];
 
-    $form['subscription_settings']['doublein'] = array(
+    $form['subscription_settings']['doublein'] = [
       '#type' => 'checkbox',
-      '#title' => t('Require subscribers to Double Opt-in'),
-      '#description' => t('New subscribers will be sent a link with an email they must follow to confirm their subscription.'),
+      '#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' => t('Include interest groups on subscription form.'),
+      '#title' => $this->t('Include interest groups on subscription form.'),
       '#default_value' => isset($signup->settings['include_interest_groups']) ? $signup->settings['include_interest_groups'] : FALSE,
-      '#description' => t('If set, subscribers will be able to select applicable interest groups on the signup form.'),
-    );
+      '#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' => t("Don't opt-out of interest groups: only opt-in."),
+      '#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' => 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(
+      '#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' => [
         // Hide unless needed.
-        'visible' => array(
-          ':input[name="include_interest_groups"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
+        'visible' => [
+          ':input[name="include_interest_groups"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
 
     return $form;
   }
@@ -289,7 +289,7 @@ class MailchimpSignupForm extends EntityForm {
 
   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 ($mergevar->public) {
diff --git a/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php b/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php
index 2a5b756..c2db91d 100644
--- a/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php
+++ b/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php
@@ -53,15 +53,15 @@ class MailchimpSignupPageForm extends FormBase {
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    $form = array();
+    $form = [];
 
-    $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,
-    );
+    ];
 
-    $form['mailchimp_lists'] = array('#tree' => TRUE);
+    $form['mailchimp_lists'] = ['#tree' => TRUE];
 
     $lists = mailchimp_get_lists($this->signup->mc_lists);
 
@@ -71,34 +71,34 @@ class MailchimpSignupPageForm extends FormBase {
       drupal_set_message('The subscription service is currently unavailable. Please try again later.', 'warning');
     }
 
-    $list = array();
+    $list = [];
     if ($lists_count > 1) {
       foreach ($lists as $list) {
         // Wrap in a div:
         $wrapper_key = 'mailchimp_' . $list->id;
 
-        $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' => 0,
-        );
+        ];
 
         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',
-            '#title' => 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],
+              ],
+            ],
+          ];
           $form['mailchimp_lists'][$wrapper_key]['interest_groups'] += mailchimp_interest_groups_form_elements($list);
         }
       }
@@ -112,11 +112,11 @@ class MailchimpSignupPageForm extends FormBase {
     }
 
     $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)) {
@@ -128,12 +128,12 @@ class MailchimpSignupPageForm extends FormBase {
       }
     }
 
-    $form['submit'] = array(
+    $form['submit'] = [
       '#type' => 'submit',
       '#weight' => 10,
       '#value' => $this->signup->settings['submit_button'],
       '#disabled' => (empty($lists)),
-    );
+    ];
 
     return $form;
   }
@@ -147,7 +147,6 @@ class MailchimpSignupPageForm extends FormBase {
 
     // For forms that allow subscribing to multiple lists
     // ensure at least one list has been selected.
-
     // Get the enabled lists for this form.
     $enabled_lists = array_filter($signup->mc_lists);
     if (count($enabled_lists) > 1) {
@@ -164,7 +163,7 @@ class MailchimpSignupPageForm extends FormBase {
         return;
       }
 
-      $form_state->setErrorByName('mailchimp_lists', t("Please select at least one list to subscribe to."));
+      $form_state->setErrorByName('mailchimp_lists', $this->t("Please select at least one list to subscribe to."));
     }
   }
 
@@ -176,7 +175,7 @@ class MailchimpSignupPageForm extends FormBase {
 
     $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'));
@@ -187,10 +186,10 @@ class MailchimpSignupPageForm extends FormBase {
 
     // 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,
-      );
+      ];
     }
     else {
       // We can look at the checkbox values now.
@@ -201,17 +200,17 @@ class MailchimpSignupPageForm extends FormBase {
       }
     }
 
-    $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 ($current_status) {
-          $current_interests = array();
+          $current_interests = [];
           foreach ($current_status->interests as $id => $selected) {
             if ($selected) {
               $current_interests[$id] = $id;
@@ -223,9 +222,9 @@ class MailchimpSignupPageForm extends FormBase {
       $result = mailchimp_subscribe($list_id, $email, $mergevars, $interests, $this->signup->settings['doublein']);
 
       if (empty($result)) {
-        drupal_set_message(t('There was a problem with your newsletter signup to %list.', array(
+        drupal_set_message(t('There was a problem with your newsletter signup to %list.', [
           '%list' => $list_details[$list_id]->name,
-        )), 'warning');
+        ]), 'warning');
       }
       else {
         $successes[] = $list_details[$list_id]->name;
diff --git a/modules/mailchimp_signup/src/MailchimpSignupInterface.php b/modules/mailchimp_signup/src/MailchimpSignupInterface.php
index 0dbc357..d0886c7 100644
--- a/modules/mailchimp_signup/src/MailchimpSignupInterface.php
+++ b/modules/mailchimp_signup/src/MailchimpSignupInterface.php
@@ -10,5 +10,4 @@ use Drupal\Core\Config\Entity\ConfigEntityInterface;
  * @ingroup mailchimp_signup
  */
 interface MailchimpSignupInterface extends ConfigEntityInterface {
-  
 }
diff --git a/modules/mailchimp_signup/src/Plugin/Derivative/MailchimpSignupSubscribeBlock.php b/modules/mailchimp_signup/src/Plugin/Derivative/MailchimpSignupSubscribeBlock.php
index 60cf1e5..8e6e0af 100644
--- a/modules/mailchimp_signup/src/Plugin/Derivative/MailchimpSignupSubscribeBlock.php
+++ b/modules/mailchimp_signup/src/Plugin/Derivative/MailchimpSignupSubscribeBlock.php
@@ -22,7 +22,7 @@ class MailchimpSignupSubscribeBlock extends DeriverBase {
       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 8da1531..40e7300 100644
--- a/modules/mailchimp_signup/src/Routing/MailchimpSignupRoutes.php
+++ b/modules/mailchimp_signup/src/Routing/MailchimpSignupRoutes.php
@@ -13,7 +13,7 @@ class MailchimpSignupRoutes {
    * {@inheritdoc}
    */
   public function routes() {
-    $routes = array();
+    $routes = [];
 
     $signups = mailchimp_signup_load_multiple();
 
@@ -24,15 +24,15 @@ class MailchimpSignupRoutes {
           // 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/Form/MailchimpAdminSettingsForm.php b/src/Form/MailchimpAdminSettingsForm.php
index 65a47ff..b44a975 100644
--- a/src/Form/MailchimpAdminSettingsForm.php
+++ b/src/Form/MailchimpAdminSettingsForm.php
@@ -32,16 +32,16 @@ class MailchimpAdminSettingsForm extends ConfigFormBase {
     $mc_api_url = Url::fromUri('http://admin.mailchimp.com/account/api', array('attributes' => array('target' => '_blank')));
     $form['api_key'] = array(
       '#type' => 'textfield',
-      '#title' => t('Mailchimp API Key'),
+      '#title' => $this->t('Mailchimp API Key'),
       '#required' => TRUE,
       '#default_value' => $config->get('api_key'),
-      '#description' => t('The API key for your MailChimp account. Get or generate a valid API key at your @apilink.',
+      '#description' => $this->t('The API key for your MailChimp account. Get or generate a valid API key at your @apilink.',
         array('@apilink' => Link::fromTextAndUrl(t('MailChimp API Dashboard'), $mc_api_url)))->toString(),
     );
     $form['cron'] = array(
       '#type' => 'checkbox',
       '#title' => t('Use batch processing.'),
-      '#description' => 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>'),
+      '#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_limit'] = array(
@@ -62,8 +62,8 @@ class MailchimpAdminSettingsForm extends ConfigFormBase {
         '7500' => '7500',
         '10000' => '10000',
       ),
-      '#title' => t('Batch limit'),
-      '#description' => 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>'),
+      '#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'),
     );
 
