diff --git a/extlink.module b/extlink.module
index fd35327..3764428 100644
--- a/extlink.module
+++ b/extlink.module
@@ -39,7 +39,7 @@ function extlink_page_attachments(array &$attachments) {
   $config = \Drupal::config('extlink.settings');
   $attachments['#attached']['library'][] = 'extlink/drupal.extlink';
 
-  $attachments['#attached']['drupalSettings']['data']['extlink'] = array(
+  $attachments['#attached']['drupalSettings']['data']['extlink'] = [
     'extTarget'      => $config->get('extlink_target', 0),
     'extNofollow'      => $config->get('extlink_nofollow', 0),
     'extClass'       => $config->get('extlink_class', 'ext'),
@@ -54,5 +54,5 @@ function extlink_page_attachments(array &$attachments) {
     'extAlertText'   => $config->get('extlink_alert_text', t('This link will take you to an external web site. We are not responsible for their content.')),
     'mailtoClass'    => $config->get('extlink_mailto_class', 'mailto'),
     'mailtoLabel'    => Html::escape($config->get('extlink_mailto_label', t('(link sends e-mail)'))),
-  );
+  ];
 }
diff --git a/src/Form/ExtlinkAdminSettingsForm.php b/src/Form/ExtlinkAdminSettingsForm.php
index 60bd246..2e10ec9 100644
--- a/src/Form/ExtlinkAdminSettingsForm.php
+++ b/src/Form/ExtlinkAdminSettingsForm.php
@@ -24,146 +24,146 @@ class ExtlinkAdminSettingsForm extends ConfigFormBase {
     $config = \Drupal::config('extlink.settings');
     $renderer = \Drupal::service('renderer');
 
-    $form['extlink_class'] = array(
+    $form['extlink_class'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Place an icon next to external links.'),
       '#return_value' => 'ext',
       '#default_value' => $config->get('extlink_class'),
       '#description' => $this->t('Places an <span class="ext"> </span>&nbsp; icon next to external links.'),
-    );
+    ];
 
-    $form['extlink_mailto_class'] = array(
+    $form['extlink_mailto_class'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Place an icon next to mailto links'),
       '#return_value' => 'mailto',
       '#default_value' => $config->get('extlink_mailto_class'),
       '#description' => $this->t('Places an <span class="mailto"> </span>&nbsp; icon next to mailto links.'),
-    );
+    ];
 
-    $form['extlink_img_class'] = array(
+    $form['extlink_img_class'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Place an icon next to image links'),
       '#return_value' => TRUE,
       '#default_value' => $config->get('extlink_img_class', FALSE),
       '#description' => $this->t('If checked, images wrapped in an anchor tag will be treated as external links.'),
-    );
+    ];
 
-    $form['extlink_subdomains'] = array(
+    $form['extlink_subdomains'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Exclude links with the same primary domain.'),
       '#default_value' => $config->get('extlink_subdomains'),
       '#description' => $this->t("For example, a link from 'www.example.com' to the subdomain of 'my.example.com' would be excluded."),
-    );
+    ];
 
-    $form['extlink_target'] = array(
+    $form['extlink_target'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Open external links in a new window'),
       '#return_value' => '_blank',
       '#default_value' => $config->get('extlink_target'),
-    );
+    ];
 
-    $form['extlink_nofollow'] = array(
+    $form['extlink_nofollow'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Tag external links as "no follow"'),
       '#return_value' => '_blank',
       '#default_value' => $config->get('extlink_nofollow'),
-    );
+    ];
 
-    $form['extlink_alert'] = array(
+    $form['extlink_alert'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Display a pop-up warning when any external link is clicked.'),
       '#return_value' => '_blank',
       '#default_value' => $config->get('extlink_alert'),
-    );
+    ];
 
-    $form['extlink_alert_text'] = array(
+    $form['extlink_alert_text'] = [
       '#type' => 'textarea',
       '#title' => $this->t('Text to display in the pop-up warning box.'),
       '#rows' => 3,
       '#default_value' => $config->get('extlink_alert_text'),
       '#description' => $this->t('Text to display in the pop-up external link warning box.'),
       '#wysiwyg' => FALSE,
-      '#states' => array(
+      '#states' => [
         // Only show this field when user opts to display a pop-up warning.
-        'visible' => array(
-          ':input[name="extlink_alert"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
+        'visible' => [
+          ':input[name="extlink_alert"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
 
-    $patterns = array(
+    $patterns = [
       '#theme' => 'item_list',
-      '#items' => array(
-        array('#markup' => '<code>(example\.com)</code> ' . $this->t('Matches example.com.')),
-        array('#markup' => '<code>(example\.com)|(example\.net)</code> ' . $this->t('Multiple patterns can be strung together by using a pipe. Matches example.com OR example.net.')),
-        array('#markup' => '<code>(links/goto/[0-9]+/[0-9]+)</code> ' . $this->t('Matches links that go through the <a href="http://drupal.org/project/links">Links module</a> redirect.')),
-      ),
-    );
-
-    $wildcards = array(
+      '#items' => [
+        ['#markup' => '<code>(example\.com)</code> ' . $this->t('Matches example.com.')],
+        ['#markup' => '<code>(example\.com)|(example\.net)</code> ' . $this->t('Multiple patterns can be strung together by using a pipe. Matches example.com OR example.net.')],
+        ['#markup' => '<code>(links/goto/[0-9]+/[0-9]+)</code> ' . $this->t('Matches links that go through the <a href="http://drupal.org/project/links">Links module</a> redirect.')],
+      ],
+    ];
+
+    $wildcards = [
       '#theme' => 'item_list',
-      '#items' => array(
-        array('#markup' => '<code>.</code> ' . $this->t('Matches any character.')),
-        array('#markup' => '<code>?</code> ' . $this->t('The previous character or set is optional.')),
-        array('#markup' => '<code>\d</code> ' . $this->t('Matches any digit (0-9).')),
-        array('#markup' => '<code>[a-z]</code> ' . $this->t('Brackets may be used to match a custom set of characters. This matches any alphabetic letter.')),
-      ),
-    );
-
-    $form['patterns'] = array(
+      '#items' => [
+        ['#markup' => '<code>.</code> ' . $this->t('Matches any character.')],
+        ['#markup' => '<code>?</code> ' . $this->t('The previous character or set is optional.')],
+        ['#markup' => '<code>\d</code> ' . $this->t('Matches any digit (0-9).')],
+        ['#markup' => '<code>[a-z]</code> ' . $this->t('Brackets may be used to match a custom set of characters. This matches any alphabetic letter.')],
+      ],
+    ];
+
+    $form['patterns'] = [
       '#type' => 'details',
       '#title' => $this->t('Pattern matching'),
       '#description' =>
-      '<p>' . $this->t('External links uses patterns (regular expressions) to match the "href" property of links.') . '</p>' .
-      $this->t('Here are some common patterns.') .
-      $renderer->render($patterns) .
-      $this->t('Common special characters:') .
-      $renderer->render($wildcards) .
-      '<p>' . $this->t('All special characters (<code>@characters</code>) must also be escaped with backslashes. Patterns are not case-sensitive. Any <a href="http://www.javascriptkit.com/javatutors/redev2.shtml">pattern supported by JavaScript</a> may be used.', array('@characters' => '^ $ . ? ( ) | * +')) . '</p>',
+        '<p>' . $this->t('External links uses patterns (regular expressions) to match the "href" property of links.') . '</p>' .
+        $this->t('Here are some common patterns.') .
+        $renderer->render($patterns) .
+        $this->t('Common special characters:') .
+        $renderer->render($wildcards) .
+        '<p>' . $this->t('All special characters (<code>@characters</code>) must also be escaped with backslashes. Patterns are not case-sensitive. Any <a href="http://www.javascriptkit.com/javatutors/redev2.shtml">pattern supported by JavaScript</a> may be used.', ['@characters' => '^ $ . ? ( ) | * +']) . '</p>',
       '#open' => FALSE,
-    );
+    ];
 
-    $form['patterns']['extlink_exclude'] = array(
+    $form['patterns']['extlink_exclude'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Exclude links matching the pattern'),
       '#maxlength' => NULL,
       '#default_value' => $config->get('extlink_exclude'),
       '#description' => $this->t('Enter a regular expression for links that you wish to exclude from being considered external.'),
-    );
+    ];
 
-    $form['patterns']['extlink_include'] = array(
+    $form['patterns']['extlink_include'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Include links matching the pattern'),
       '#maxlength' => NULL,
       '#default_value' => $config->get('extlink_include'),
       '#description' => $this->t('Enter a regular expression for internal links that you wish to be considered external.'),
-    );
+    ];
 
-    $form['css_matching'] = array(
+    $form['css_matching'] = [
       '#tree' => FALSE,
       '#type' => 'fieldset',
       '#title' => $this->t('CSS Matching'),
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
       '#description' =>
-      '<p>' . $this->t('Use CSS selectors to exclude entirely or only look inside explicitly specified classes and IDs for external links.  These will be passed straight to jQuery for matching.') . '</p>',
-    );
+        '<p>' . $this->t('Use CSS selectors to exclude entirely or only look inside explicitly specified classes and IDs for external links.  These will be passed straight to jQuery for matching.') . '</p>',
+    ];
 
-    $form['css_matching']['extlink_css_exclude'] = array(
+    $form['css_matching']['extlink_css_exclude'] = [
       '#type' => 'textarea',
       '#title' => $this->t('Exclude links inside these CSS selectors'),
       '#maxlength' => NULL,
       '#default_value' => $config->get('extlink_css_exclude', ''),
       '#description' => $this->t('Enter a comma-separated list of CSS selectors (ie "#block-block-2 .content, ul.menu")'),
-    );
+    ];
 
-    $form['css_matching']['extlink_css_explicit'] = array(
+    $form['css_matching']['extlink_css_explicit'] = [
       '#type' => 'textarea',
       '#title' => $this->t('Only look for links inside these CSS selectors'),
       '#maxlength' => NULL,
       '#default_value' => $config->get('extlink_css_explicit', ''),
       '#description' => $this->t('Enter a comma-separated list of CSS selectors (ie "#block-block-2 .content, ul.menu")'),
-    );
+    ];
     return parent::buildForm($form, $form_state);
   }
 
diff --git a/src/Tests/ExtlinkTestBase.php b/src/Tests/ExtlinkTestBase.php
index 9524e1a..a2ea7ab 100644
--- a/src/Tests/ExtlinkTestBase.php
+++ b/src/Tests/ExtlinkTestBase.php
@@ -11,7 +11,7 @@ use Drupal\simpletest\WebTestBase;
  */
 abstract class ExtlinkTestBase extends WebTestBase {
 
-  public static $modules = array('extlink');
+  public static $modules = ['extlink'];
 
   /**
    * User with various administrative permissions.
@@ -39,7 +39,7 @@ abstract class ExtlinkTestBase extends WebTestBase {
     // Enable any module that you will need in your tests.
     parent::setUp();
     // Create a normal user.
-    $permissions = array();
+    $permissions = [];
     $this->normalUser = $this->drupalCreateUser($permissions);
 
     // Create an admin user.
@@ -52,10 +52,10 @@ abstract class ExtlinkTestBase extends WebTestBase {
    * Get the nodes value.
    */
   protected function getNodeFormValues() {
-    $edit = array(
+    $edit = [
       'title' => 'node_title ' . $this->randomName(32),
       'body[' . LANGUAGE_NONE . '][0][value]' => 'node_body ' . $this->randomName(256) . ' <a href="http://google.com">Google!</a>',
-    );
+    ];
     return $edit;
   }
 
