diff --git a/html_formatter.module b/html_formatter.module
index cc0fd57..da73536 100644
--- a/html_formatter.module
+++ b/html_formatter.module
@@ -27,13 +27,13 @@ function html_formatter_help($route_name, RouteMatchInterface $route_match) {
  * Implements hook_theme().
  */
 function html_formatter_theme() {
-  return array(
-    'html_formatter' => array(
-      'variables' => array(
+  return [
+    'html_formatter' => [
+      'variables' => [
         'value' => NULL,
         'tag' => NULL,
-        'attributes' => array(),
-      ),
-    ),
-  );
+        'attributes' => [],
+      ],
+    ],
+  ];
 }
diff --git a/src/Plugin/Field/FieldFormatter/HtmlFieldFormatter.php b/src/Plugin/Field/FieldFormatter/HtmlFieldFormatter.php
index 4a0c9e4..08e1adc 100644
--- a/src/Plugin/Field/FieldFormatter/HtmlFieldFormatter.php
+++ b/src/Plugin/Field/FieldFormatter/HtmlFieldFormatter.php
@@ -112,7 +112,7 @@ class HtmlFieldFormatter extends FormatterBase implements ContainerFactoryPlugin
         '#theme' => 'html_formatter',
         '#value' => $value,
         '#tag' => $this->getSetting('tag'),
-        '#attributes' => array('class' => array($this->getSetting('class'))),
+        '#attributes' => ['class' => [$this->getSetting('class')]],
       ];
     }
 
diff --git a/src/Plugin/HtmlFormatterTrait.php b/src/Plugin/HtmlFormatterTrait.php
index 625ed36..24bdea6 100644
--- a/src/Plugin/HtmlFormatterTrait.php
+++ b/src/Plugin/HtmlFormatterTrait.php
@@ -60,11 +60,11 @@ trait HtmlFormatterTrait {
     $summary = [];
 
     if (!empty($settings['tag'])) {
-      $summary[] = $this->t('Rendered with HTML tag: @tag', array('@tag' => $settings['tag']));
+      $summary[] = $this->t('Rendered with HTML tag: @tag', ['@tag' => $settings['tag']]);
     }
 
     if (!empty($settings['class'])) {
-      $summary[] = $this->t('With class: @class', array('@class' => $settings['class']));
+      $summary[] = $this->t('With class: @class', ['@class' => $settings['class']]);
     }
 
     if (!empty($settings['link'])) {
