diff --git a/smtp.module b/smtp.module
index 2e69241..258a878 100644
--- a/smtp.module
+++ b/smtp.module
@@ -31,11 +31,11 @@ function smtp_help($route_name, RouteMatchInterface $route_match) {
  * Implements hook_menu().
  */
 function smtp_menu() {
-  $items['admin/config/system/smtp'] = array(
+  $items['admin/config/system/smtp'] = [
     'title' => 'SMTP Authentication Support',
     'description' => 'Allow for site emails to be sent through an SMTP server of your choice.',
     'route_name' => 'smtp.config',
-  );
+  ];
   return $items;
 }
 
@@ -53,12 +53,12 @@ function smtp_mail($key, &$message, $params) {
  * Implementation of hook_queue_info().
  */
 function smtp_queue_info() {
-  $queues['smtp_send_queue'] = array(
+  $queues['smtp_send_queue'] = [
     'worker callback' => 'smtp_send_queue_runner',
-    'cron' => array(
+    'cron' => [
       'time' => 60, // This is the max run time per cron run in seconds.
-    ),
-  );
+    ],
+  ];
   return $queues;
 }
 
@@ -82,11 +82,11 @@ function _smtp_mailer_send($variables) {
   $logger = \Drupal::logger('smtp');
 
   // Let the people know what is going on.
-  $logger->info('Sending mail to: @to', array('@to' => $to));
+  $logger->info('Sending mail to: @to', ['@to' => $to]);
 
   // Try to send e-mail. If it fails, set watchdog entry.
   if (!$mailer->Send()) {
-    $logger->error('Error sending e-mail from @from to @to: @error_message', array('@from' => $from, '@to' => $to, '@error_message' => $mailer->ErrorInfo));
+    $logger->error('Error sending e-mail from @from to @to: @error_message', ['@from' => $from, '@to' => $to, '@error_message' => $mailer->ErrorInfo]);
     return FALSE;
   }
 
diff --git a/src/Form/SMTPConfigForm.php b/src/Form/SMTPConfigForm.php
index c8c2f4c..fa5dac7 100644
--- a/src/Form/SMTPConfigForm.php
+++ b/src/Form/SMTPConfigForm.php
@@ -32,159 +32,159 @@ class SMTPConfigForm extends ConfigFormBase {
     }
     drupal_set_message(t('Disabled fields are overridden in site-specific configuration file.'), 'warning');
 
-    $form['onoff'] = array(
+    $form['onoff'] = [
       '#type'  => 'details',
       '#title' => t('Install options'),
       '#open' => TRUE,
-    );
-    $form['onoff']['smtp_on'] = array(
+    ];
+    $form['onoff']['smtp_on'] = [
       '#type' => 'radios',
       '#title' => t('Turn this module on or off'),
       '#default_value' => $config->get('smtp_on') ? 'on' : 'off',
-      '#options' => array('on' => t('On'), 'off' => t('Off')),
+      '#options' => ['on' => t('On'), 'off' => t('Off')],
       '#description' => t('To uninstall this module you must turn it off here first.'),
       '#disabled' => $this->isOverridden('smtp_on'),
-    );
-    $form['server'] = array(
+    ];
+    $form['server'] = [
       '#type'  => 'details',
       '#title' => t('SMTP server settings'),
       '#open' => TRUE,
-    );
-    $form['server']['smtp_host'] = array(
+    ];
+    $form['server']['smtp_host'] = [
       '#type' => 'textfield',
       '#title' => t('SMTP server'),
       '#default_value' => $config->get('smtp_host'),
       '#description' => t('The address of your outgoing SMTP server.'),
       '#disabled' => $this->isOverridden('smtp_host'),
-    );
-    $form['server']['smtp_hostbackup'] = array(
+    ];
+    $form['server']['smtp_hostbackup'] = [
       '#type' => 'textfield',
       '#title' => t('SMTP backup server'),
       '#default_value' => $config->get('smtp_hostbackup'),
       '#description' => t('The address of your outgoing SMTP backup server. If the primary server can\'t be found this one will be tried. This is optional.'),
       '#disabled' => $this->isOverridden('smtp_hostbackup'),
-    );
-    $form['server']['smtp_port'] = array(
+    ];
+    $form['server']['smtp_port'] = [
       '#type' => 'number',
       '#title' => t('SMTP port'),
       '#size' => 6,
       '#maxlength' => 6,
       '#default_value' => $config->get('smtp_port'),
-      '#description' => t('The default SMTP port is 25, if that is being blocked try 80. Gmail uses 465. See :url for more information on configuring for use with Gmail.', array(':url' => 'http://gmail.google.com/support/bin/answer.py?answer=13287')),
+      '#description' => t('The default SMTP port is 25, if that is being blocked try 80. Gmail uses 465. See :url for more information on configuring for use with Gmail.', [':url' => 'http://gmail.google.com/support/bin/answer.py?answer=13287']),
       '#disabled' => $this->isOverridden('smtp_port'),
-    );
+    ];
     // Only display the option if openssl is installed.
     if (function_exists('openssl_open')) {
-      $encryption_options = array(
+      $encryption_options = [
         'standard' => t('No'),
         'ssl' => t('Use SSL'),
         'tls' => t('Use TLS'),
-      );
+      ];
       $encryption_description = t('This allows connection to an SMTP server that requires SSL encryption such as Gmail.');
     }
     // If openssl is not installed, use normal protocol.
     else {
       $config->set('smtp_protocol', 'standard');
-      $encryption_options = array('standard' => t('No'));
-      $encryption_description = t('Your PHP installation does not have SSL enabled. See the :url page on php.net for more information. Gmail requires SSL.', array(':url' => 'http://php.net/openssl'));
+      $encryption_options = ['standard' => t('No')];
+      $encryption_description = t('Your PHP installation does not have SSL enabled. See the :url page on php.net for more information. Gmail requires SSL.', [':url' => 'http://php.net/openssl']);
     }
-    $form['server']['smtp_protocol'] = array(
+    $form['server']['smtp_protocol'] = [
       '#type' => 'select',
       '#title' => t('Use encrypted protocol'),
       '#default_value' => $config->get('smtp_protocol'),
       '#options' => $encryption_options,
       '#description' => $encryption_description,
       '#disabled' => $this->isOverridden('smtp_protocol'),
-    );
+    ];
 
-    $form['auth'] = array(
+    $form['auth'] = [
       '#type' => 'details',
       '#title' => t('SMTP Authentication'),
       '#description' => t('Leave blank if your SMTP server does not require authentication.'),
       '#open' => TRUE,
-    );
-    $form['auth']['smtp_username'] = array(
+    ];
+    $form['auth']['smtp_username'] = [
       '#type' => 'textfield',
       '#title' => t('Username'),
       '#default_value' => $config->get('smtp_username'),
       '#description' => t('SMTP Username.'),
       '#disabled' => $this->isOverridden('smtp_username'),
-    );
-    $form['auth']['smtp_password'] = array(
+    ];
+    $form['auth']['smtp_password'] = [
       '#type' => 'password',
       '#title' => t('Password'),
       '#default_value' => $config->get('smtp_password'),
       '#description' => t('SMTP password. If you have already entered your password before, you should leave this field blank, unless you want to change the stored password. Please note that this password will be stored as plain-text inside Drupal\'s core configuration variables.'),
       '#disabled' => $this->isOverridden('smtp_password'),
-    );
+    ];
 
-    $form['email_options'] = array(
+    $form['email_options'] = [
       '#type'  => 'details',
       '#title' => t('E-mail options'),
       '#open' => TRUE,
-    );
-    $form['email_options']['smtp_from'] = array(
+    ];
+    $form['email_options']['smtp_from'] = [
       '#type' => 'textfield',
       '#title' => t('E-mail from address'),
       '#default_value' => $config->get('smtp_from'),
       '#description' => t('The e-mail address that all e-mails will be from.'),
       '#disabled' => $this->isOverridden('smtp_from'),
-    );
-    $form['email_options']['smtp_fromname'] = array(
+    ];
+    $form['email_options']['smtp_fromname'] = [
       '#type' => 'textfield',
       '#title' => t('E-mail from name'),
       '#default_value' => $config->get('smtp_fromname'),
       '#description' => t('The name that all e-mails will be from. If left blank will use a default of: @name',
           ['@name' => $this->configFactory->get('system.site')->get('name')]),
       '#disabled' => $this->isOverridden('smtp_fromname'),
-    );
-    $form['email_options']['smtp_allowhtml'] = array(
+    ];
+    $form['email_options']['smtp_allowhtml'] = [
       '#type' => 'checkbox',
       '#title' => t('Allow to send e-mails formatted as HTML'),
       '#default_value' => $config->get('smtp_allowhtml'),
       '#description' => t('Checking this box will allow HTML formatted e-mails to be sent with the SMTP protocol.'),
       '#disabled' => $this->isOverridden('smtp_allowhtml'),
-    );
+    ];
 
-    $form['client'] = array(
+    $form['client'] = [
       '#type'  => 'details',
       '#title' => t('SMTP client settings'),
       '#open' => TRUE,
-    );
-    $form['client']['smtp_client_hostname'] = array(
+    ];
+    $form['client']['smtp_client_hostname'] = [
       '#type' => 'textfield',
       '#title' => t('Hostname'),
       '#default_value' => $config->get('smtp_client_hostname'),
-      '#description' => t('The hostname to use in the Message-Id and Received headers, and as the default HELO string. Leave blank for using %server_name.', array('%server_name' => isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost.localdomain')),
+      '#description' => t('The hostname to use in the Message-Id and Received headers, and as the default HELO string. Leave blank for using %server_name.', ['%server_name' => isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost.localdomain']),
       '#disabled' => $this->isOverridden('smtp_client_hostname'),
-    );
-    $form['client']['smtp_client_helo'] = array(
+    ];
+    $form['client']['smtp_client_helo'] = [
       '#type' => 'textfield',
       '#title' => t('HELO'),
       '#default_value' => $config->get('smtp_client_helo'),
       '#description' => t('The SMTP HELO/EHLO of the message. Defaults to hostname (see above).'),
       '#disabled' => $this->isOverridden('smtp_client_helo'),
-    );
+    ];
 
-    $form['email_test'] = array(
+    $form['email_test'] = [
       '#type' => 'details',
       '#title' => t('Send test e-mail'),
       '#open' => TRUE,
-    );
-    $form['email_test']['smtp_test_address'] = array(
+    ];
+    $form['email_test']['smtp_test_address'] = [
       '#type' => 'textfield',
       '#title' => t('E-mail address to send a test e-mail to'),
       '#default_value' => '',
       '#description' => t('Type in an address to have a test e-mail sent there.'),
-    );
+    ];
 
-    $form['smtp_debugging'] = array(
+    $form['smtp_debugging'] = [
       '#type' => 'checkbox',
       '#title' => t('Enable debugging'),
       '#default_value' => $config->get('smtp_debugging'),
       '#description' => t('Checking this box will print SMTP messages from the server for every e-mail that is sent.'),
       '#disabled' => $this->isOverridden('smtp_debugging'),
-    );
+    ];
 
     return parent::buildForm($form, $form_state);
   }
@@ -290,7 +290,7 @@ class SMTPConfigForm extends ConfigFormBase {
     // If an address was given, send a test e-mail message.
     if ($test_address = $values['smtp_test_address']) {
       $params['subject'] = t('Drupal SMTP test e-mail');
-      $params['body'] = array(t('If you receive this message it means your site is capable of using SMTP to send e-mail.'));
+      $params['body'] = [t('If you receive this message it means your site is capable of using SMTP to send e-mail.')];
       $account = \Drupal::currentUser();
       // If module is off, send the test message with SMTP by temporarily overriding.
       if (!$config->get('smtp_on')) {
diff --git a/src/Plugin/Mail/SMTPMailSystem.php b/src/Plugin/Mail/SMTPMailSystem.php
index 6d5302a..7450add 100644
--- a/src/Plugin/Mail/SMTPMailSystem.php
+++ b/src/Plugin/Mail/SMTPMailSystem.php
@@ -215,8 +215,8 @@ class SMTPMailSystem implements MailInterface, ContainerFactoryPluginInterface {
             break;
             default:
               // Everything else is unsuppored by PHPMailer.
-              drupal_set_message(t('The %header of your message is not supported by PHPMailer and will be sent as text/plain instead.', array('%header' => "Content-Type: $value")), 'error');
-              $this->logger->error(t('The %header of your message is not supported by PHPMailer and will be sent as text/plain instead.', array('%header' => "Content-Type: $value")));
+              drupal_set_message(t('The %header of your message is not supported by PHPMailer and will be sent as text/plain instead.', ['%header' => "Content-Type: $value"]), 'error');
+              $this->logger->error(t('The %header of your message is not supported by PHPMailer and will be sent as text/plain instead.', ['%header' => "Content-Type: $value"]));
 
               // Force the Content-Type to be text/plain.
               $mailer->IsHTML(FALSE);
@@ -489,13 +489,13 @@ class SMTPMailSystem implements MailInterface, ContainerFactoryPluginInterface {
     $mailer->Port = $this->smtpConfig->get('smtp_port');
     $mailer->Mailer = 'smtp';
 
-    $mailerArr = array(
+    $mailerArr = [
       'mailer' => $mailer,
       'to' => $to,
       'from' => $from,
-    );
+    ];
     if ($this->smtpConfig->get('smtp_queue')) {
-      $this->logger->info(t('Queue sending mail to: @to', array('@to' => $to)));
+      $this->logger->info(t('Queue sending mail to: @to', ['@to' => $to]));
       smtp_send_queue($mailerArr);
     }
     else {
@@ -519,7 +519,7 @@ class SMTPMailSystem implements MailInterface, ContainerFactoryPluginInterface {
    *   An array containing the resulting mime parts
    */
   protected function _boundary_split($input, $boundary) {
-    $parts       = array();
+    $parts       = [];
     $bs_possible = substr($boundary, 2, -2);
     $bs_check    = '\"' . $bs_possible . '\"';
 
@@ -550,7 +550,7 @@ class SMTPMailSystem implements MailInterface, ContainerFactoryPluginInterface {
     $part_array = explode("\n", $input);
 
     // will strip these headers according to RFC2045
-    $headers_to_strip = array( 'Content-Type', 'Content-Transfer-Encoding', 'Content-ID', 'Content-Disposition');
+    $headers_to_strip = ['Content-Type', 'Content-Transfer-Encoding', 'Content-ID', 'Content-Disposition'];
     $pattern = '/^(' . implode('|', $headers_to_strip) . '):/';
 
     while (count($part_array) > 0) {
@@ -621,11 +621,11 @@ class SMTPMailSystem implements MailInterface, ContainerFactoryPluginInterface {
    *  An array containing a name and an email address.
    */
   protected function _get_components($input) {
-    $components = array(
+    $components = [
       'input' => $input,
       'name' => '',
       'email' => '',
-    );
+    ];
 
     // If the input is a valid email address in its entirety, then there is
     // nothing to do, just return that.
