diff --git a/relation_endpoint/src/Plugin/Field/FieldFormatter/RelationEndpointFormatter.php b/relation_endpoint/src/Plugin/Field/FieldFormatter/RelationEndpointFormatter.php
index c9de4df..54ed8f9 100644
--- a/relation_endpoint/src/Plugin/Field/FieldFormatter/RelationEndpointFormatter.php
+++ b/relation_endpoint/src/Plugin/Field/FieldFormatter/RelationEndpointFormatter.php
@@ -30,25 +30,25 @@ class RelationEndpointFormatter extends FormatterBase {
   /**
    * {@inheritdoc}
    */
-  public function viewElements(FieldItemListInterface $items) {
-    $rows = array();
+  public function viewElements(FieldItemListInterface $items, $langcode) {
+    $rows = [];
 
-    $header = array(
-      array('data' => t('Entity type')),
-      array('data' => t('Entity ID')),
-      array('data' => t('Label')),
-    );
+    $header = [
+      ['data' => t('Entity type')],
+      ['data' => t('Entity ID')],
+      ['data' => t('Label')],
+    ];
 
     foreach ($items as $item) {
-      $t = array('@entity_type' => $item->entity_type, '@entity_id' => $item->entity_id);
+      $t = ['@entity_type' => $item->entity_type, '@entity_id' => $item->entity_id];
 
       try {
         if ($entity = entity_load($item->entity_type, $item->entity_id)) {
           $label = $entity->label();
-          $label_cell['data'] = array(
+          $label_cell['data'] = [
             '#type' => 'link',
             '#title' => (!empty($label) && strlen($label) > 0) ? $label : t('Untitled', $t),
-          ) + $entity->urlInfo()->toRenderArray();
+          ] + $entity->urlInfo()->toRenderArray();
         }
         else {
           $label_cell = t('Deleted');
@@ -61,11 +61,11 @@ public function viewElements(FieldItemListInterface $items) {
       $rows[] = array($item->entity_type, $item->entity_id, $label_cell);
     }
 
-    return array(
+    return [
       '#theme' => 'table',
       '#header' => $header,
       '#rows' => $rows,
-    );
+    ];
   }
 
 }
diff --git a/relation_endpoint/src/Plugin/Field/FieldFormatter/RelationEndpointFullFormatter.php b/relation_endpoint/src/Plugin/Field/FieldFormatter/RelationEndpointFullFormatter.php
index a4bb8cd..4a1a95a 100644
--- a/relation_endpoint/src/Plugin/Field/FieldFormatter/RelationEndpointFullFormatter.php
+++ b/relation_endpoint/src/Plugin/Field/FieldFormatter/RelationEndpointFullFormatter.php
@@ -27,9 +27,8 @@ class RelationEndpointFullFormatter extends FormatterBase {
   /**
    * {@inheritdoc}
    */
-  public function viewElements(FieldItemListInterface $items) {
-    $build = array();
-    $entities = array();
+  public function viewElements(FieldItemListInterface $items, $langcode) {
+    $build = [];
 
     foreach ($items as $delta => $item) {
       if ($entity = entity_load($item->entity_type, $item->entity_id)) {

