diff --git a/invite.install b/invite.install
index 4f408e5..dbe588a 100644
--- a/invite.install
+++ b/invite.install
@@ -11,12 +11,12 @@ use Drupal\Core\Url;
  * Implements hook_install().
  */
 function invite_install() {
-  drupal_set_message(t('Thank you for installing the <a href="@url_invite" target="blank">Invite</a> project.', array(
+  drupal_set_message(t('Thank you for installing the <a href="@url_invite" target="blank">Invite</a> project.', [
     '@url_invite' => 'https://www.drupal.org/project/invite',
-  )));
+  ]));
 
-  drupal_set_message(t('You can configure the <a href="@url_invite" target="blank">Invite</a> project on the <a href="@url">settings page</a>.', array(
+  drupal_set_message(t('You can configure the <a href="@url_invite" target="blank">Invite</a> project on the <a href="@url">settings page</a>.', [
     '@url_invite' => 'https://www.drupal.org/project/invite',
     '@url' => Url::fromRoute('invite.invite_config')->toString(),
-  )));
+  ]));
 }
diff --git a/modules/invite_by_email/invite_by_email.module b/modules/invite_by_email/invite_by_email.module
index b801f79..029b5e7 100644
--- a/modules/invite_by_email/invite_by_email.module
+++ b/modules/invite_by_email/invite_by_email.module
@@ -15,76 +15,76 @@ function invite_by_email_form_alter(&$form, FormStateInterface $form_state, $for
     $invite_type = $form_state->getFormObject()->getEntity();
     $data = unserialize($invite_type->getData());
 
-    $invite_by_email_settings = !empty($data) ? $data : array(
+    $invite_by_email_settings = !empty($data) ? $data : [
       'use_default' => TRUE,
       'subject_editable' => '',
       'html_email' => '',
       'mail_subject' => '',
       'mail_template' => '',
-    );
+    ];
 
-    $form['invite_by_email'] = array(
+    $form['invite_by_email'] = [
       '#type' => 'fieldset',
       '#title' => t('Invite by e-mail message settings'),
       '#tree' => TRUE,
-      '#attributes' => array(
-        'class' => array(
+      '#attributes' => [
+        'class' => [
           'invite-by-email-wrapper',
-        ),
-      ),
-      '#states' => array(
-        'invisible' => array(
-          ':input[name="send_method[invite_by_email]"]' => array('checked' => FALSE),
-        ),
-      ),
-    );
+        ],
+      ],
+      '#states' => [
+        'invisible' => [
+          ':input[name="send_method[invite_by_email]"]' => ['checked' => FALSE],
+        ],
+      ],
+    ];
 
-    $form['invite_by_email']['use_default'] = array(
+    $form['invite_by_email']['use_default'] = [
       '#type' => 'checkbox',
       '#title' => t('Use default settings'),
       '#default_value' => $invite_by_email_settings['use_default'],
-      '#states' => array(
-        'invisible' => array(
-          ':input[name="invite_by_email"]' => array('!value' => 'invite_by_email'),
-        ),
-      ),
-    );
+      '#states' => [
+        'invisible' => [
+          ':input[name="invite_by_email"]' => ['!value' => 'invite_by_email'],
+        ],
+      ],
+    ];
 
-    $form['invite_by_email']['subject_editable'] = array(
+    $form['invite_by_email']['subject_editable'] = [
       '#type' => 'checkbox',
       '#title' => t('Editable subject'),
       '#description' => t('Choose whether users should be able to customize the subject.'),
       '#default_value' => $invite_by_email_settings['subject_editable'],
-      '#states' => array(
-        'invisible' => array(
-          ':input[name="invite_by_email[use_default]"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
+      '#states' => [
+        'invisible' => [
+          ':input[name="invite_by_email[use_default]"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
 
-    $form['invite_by_email']['html_email'] = array(
+    $form['invite_by_email']['html_email'] = [
       '#type' => 'checkbox',
       '#title' => t('HTML email'),
       '#description' => t('Send HTML emails. WARNING: This option has security implications! Give to trusted users only.'),
       '#default_value' => $invite_by_email_settings['html_email'],
-      '#states' => array(
-        'invisible' => array(
-          ':input[name="invite_by_email[use_default]"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
+      '#states' => [
+        'invisible' => [
+          ':input[name="invite_by_email[use_default]"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
 
-    $form['invite_by_email']['help'] = array(
+    $form['invite_by_email']['help'] = [
       '#type' => 'container',
-      'help' => array(
-        '#markup' => t('You may update the default subject and body for all invites on the <a href="@fields_path">fields edit page</a>.', array('@fields_path' => '/admin/structure/invite/settings/fields')),
-      ),
-      '#states' => array(
-        'invisible' => array(
-          ':input[name="invite_by_email[use_default]"]' => array('checked' => TRUE),
-        ),
-      ),
-    );
+      'help' => [
+        '#markup' => t('You may update the default subject and body for all invites on the <a href="@fields_path">fields edit page</a>.', ['@fields_path' => '/admin/structure/invite/settings/fields']),
+      ],
+      '#states' => [
+        'invisible' => [
+          ':input[name="invite_by_email[use_default]"]' => ['checked' => TRUE],
+        ],
+      ],
+    ];
 
     // Put our submit in top of list to ensure, that values will be added to
     // 'data'.
@@ -108,9 +108,9 @@ function invite_by_email_form_invite_type_form_submit(&$form, FormStateInterface
  * Implements hook_theme().
  */
 function invite_by_email_theme($existing, $type, $theme, $path) {
-  return array(
-    'invite_by_email' => array(
-      'variables' => array('body' => NULL),
-    ),
-  );
+  return [
+    'invite_by_email' => [
+      'variables' => ['body' => NULL],
+    ],
+  ];
 }
diff --git a/modules/invite_by_email/invite_by_email.tokens.inc b/modules/invite_by_email/invite_by_email.tokens.inc
index b771f70..e2ff66c 100644
--- a/modules/invite_by_email/invite_by_email.tokens.inc
+++ b/modules/invite_by_email/invite_by_email.tokens.inc
@@ -12,23 +12,23 @@ use \Drupal\Core\Link;
  * Implements hook_token_info().
  */
 function invite_by_email_token_info() {
-  $info = array();
-  $info['types']['invite'] = array(
+  $info = [];
+  $info['types']['invite'] = [
     'name' => t('Invite'),
     'description' => ('Invite by email tokens.'),
-  );
+  ];
 
-  $info['tokens']['invite']['inviter:name'] = array(
+  $info['tokens']['invite']['inviter:name'] = [
     'name' => t('Inviter name'),
     'description' => t('Name of the invitation creator.'),
     'dynamic' => TRUE,
-  );
+  ];
 
-  $info['tokens']['invite']['invite-accept-link'] = array(
+  $info['tokens']['invite']['invite-accept-link'] = [
     'name' => t('Accept link'),
     'description' => t('Link to accept the invitation.'),
     'dynamic' => TRUE,
-  );
+  ];
 
   return $info;
 }
@@ -37,7 +37,7 @@ function invite_by_email_token_info() {
  * Implements hook_tokens().
  */
 function invite_by_email_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) {
-  $replacements = array();
+  $replacements = [];
   if ($type == 'invite') {
 
     foreach ($tokens as $name => $original) {
@@ -47,7 +47,7 @@ function invite_by_email_tokens($type, $tokens, array $data, array $options, Bub
           break;
 
         case 'invite-accept-link':
-          $replacements[$original] = Link::createFromRoute('accept invite', 'invite.invite_accept_accept', array('invite' => $data['invite']->getRegCode()), array('absolute' => TRUE))->getUrl()->toString();
+          $replacements[$original] = Link::createFromRoute('accept invite', 'invite.invite_accept_accept', ['invite' => $data['invite']->getRegCode()], ['absolute' => TRUE])->getUrl()->toString();
           break;
 
         default:
diff --git a/modules/invite_link/src/Form/InviteLinkBlockForm.php b/modules/invite_link/src/Form/InviteLinkBlockForm.php
index 7ae67b0..da6315a 100644
--- a/modules/invite_link/src/Form/InviteLinkBlockForm.php
+++ b/modules/invite_link/src/Form/InviteLinkBlockForm.php
@@ -25,23 +25,23 @@ class InviteLinkBlockForm extends FormBase {
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
 
-    $form['create_invite'] = array(
+    $form['create_invite'] = [
       '#type' => 'button',
       '#value' => $this->t('Create invite'),
-      '#limit_validation_errors' => array(array('create_invite')),
+      '#limit_validation_errors' => [['create_invite']],
       '#executes_submit_callback' => TRUE,
-      '#ajax' => array(
+      '#ajax' => [
         'callback' => '::ajaxReplaceInviteContainer',
         'wrapper' => 'invite',
         'method' => 'replace',
-      ),
-    );
+      ],
+    ];
 
-    $form['invite_containter'] = array(
+    $form['invite_containter'] = [
       '#type' => 'container',
       '#prefix' => '<div id="invite">',
       '#suffix' => '</div>',
-    );
+    ];
 
     return $form;
   }
@@ -60,7 +60,7 @@ class InviteLinkBlockForm extends FormBase {
   public function submitForm(array &$form, FormStateInterface $form_state) {
     $invite_type = $form_state->getBuildInfo()['args'][0];
 
-    $invite = Invite::create(array('type' => $invite_type));
+    $invite = Invite::create(['type' => $invite_type]);
     $invite->setPlugin('invite_link');
     $invite->save();
 
diff --git a/src/Entity/Invite.php b/src/Entity/Invite.php
index 76f501b..70ca657 100644
--- a/src/Entity/Invite.php
+++ b/src/Entity/Invite.php
@@ -73,12 +73,12 @@ class Invite extends ContentEntityBase implements InviteInterface {
     do {
       $reg_code = user_password(10);
       $result = Database::getConnection()
-        ->query('SELECT reg_code FROM {invite} WHERE reg_code = :reg_code', array(':reg_code' => $reg_code))
+        ->query('SELECT reg_code FROM {invite} WHERE reg_code = :reg_code', [':reg_code' => $reg_code])
         ->fetchField();
 
     } while ($result !== FALSE);
 
-    $values += array(
+    $values += [
       'user_id' => \Drupal::currentUser()->id(),
       'created' => REQUEST_TIME,
       'expires' => REQUEST_TIME + \Drupal::config('invite.invite_config')->get('invite_expiration') * 24 * 60 * 60,
@@ -86,8 +86,8 @@ class Invite extends ContentEntityBase implements InviteInterface {
       'type' => !empty($values['type']) ? $values['type'] : '',
       'status' => 1,
       'reg_code' => $reg_code,
-      'data' => array(),
-    );
+      'data' => [],
+    ];
   }
 
   /**
@@ -223,39 +223,39 @@ class Invite extends ContentEntityBase implements InviteInterface {
     $fields['reg_code'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Registration Code'))
       ->setDescription(t('The invite registration code.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 10,
         'text_processing' => 0,
-      ))
+      ])
       ->setDefaultValue('')
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
     $fields['type'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Invite Type'))
       ->setDescription(t('The invite type.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 255,
         'text_processing' => 0,
-      ))
-      ->setDisplayOptions('view', array(
+      ])
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
@@ -267,21 +267,21 @@ class Invite extends ContentEntityBase implements InviteInterface {
       ->setSetting('handler', 'default')
       ->setDefaultValueCallback('Drupal\node\Entity\Node::getCurrentUserId')
       ->setTranslatable(TRUE)
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'hidden',
         'type' => 'author',
         'weight' => 0,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'entity_reference_autocomplete',
         'weight' => 5,
-        'settings' => array(
+        'settings' => [
           'match_operator' => 'CONTAINS',
           'size' => '60',
           'autocomplete_type' => 'tags',
           'placeholder' => '',
-        ),
-      ))
+        ],
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
@@ -292,21 +292,21 @@ class Invite extends ContentEntityBase implements InviteInterface {
       ->setSetting('target_type', 'user')
       ->setSetting('handler', 'default')
       ->setTranslatable(TRUE)
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'hidden',
         'type' => 'author',
         'weight' => 0,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'entity_reference_autocomplete',
         'weight' => 5,
-        'settings' => array(
+        'settings' => [
           'match_operator' => 'CONTAINS',
           'size' => '60',
           'autocomplete_type' => 'tags',
           'placeholder' => '',
-        ),
-      ))
+        ],
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
@@ -329,10 +329,10 @@ class Invite extends ContentEntityBase implements InviteInterface {
     $fields['status'] = BaseFieldDefinition::create('integer')
       ->setLabel(t('Expiration'))
       ->setDescription(t('Invitation status'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 11,
         'text_processing' => 0,
-      ));
+      ]);
 
     return $fields;
   }
diff --git a/src/Entity/InviteSender.php b/src/Entity/InviteSender.php
index d045b21..7ee2092 100644
--- a/src/Entity/InviteSender.php
+++ b/src/Entity/InviteSender.php
@@ -32,9 +32,9 @@ class InviteSender extends ConfigEntityBase implements InviteTypeInterface {
    */
   public static function preCreate(EntityStorageInterface $storage_controller, array &$values) {
     parent::preCreate($storage_controller, $values);
-    $values += array(
+    $values += [
       'user_id' => \Drupal::currentUser()->id(),
-    );
+    ];
   }
 
   /**
diff --git a/src/Entity/InviteViewsData.php b/src/Entity/InviteViewsData.php
index 4d404a2..fb8339f 100644
--- a/src/Entity/InviteViewsData.php
+++ b/src/Entity/InviteViewsData.php
@@ -16,11 +16,11 @@ class InviteViewsData extends EntityViewsData implements EntityViewsDataInterfac
   public function getViewsData() {
     $data = parent::getViewsData();
 
-    $data['invite']['table']['base'] = array(
+    $data['invite']['table']['base'] = [
       'field' => 'id',
       'title' => $this->t('Invite'),
       'help' => $this->t('The Invite ID.'),
-    );
+    ];
 
     return $data;
   }
diff --git a/src/Form/InviteConfig.php b/src/Form/InviteConfig.php
index ceebb93..d1d5724 100644
--- a/src/Form/InviteConfig.php
+++ b/src/Form/InviteConfig.php
@@ -37,22 +37,22 @@ class InviteConfig extends ConfigFormBase {
   public function buildForm(array $form, FormStateInterface $form_state) {
     $config = $this->config('invite.invite_config');
 
-    $form['invite_expiration'] = array(
+    $form['invite_expiration'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Invite Expiration'),
       '#description' => $this->t('Enter the number of days before the invitation expires.'),
       '#maxlength' => 6,
       '#size' => 6,
       '#default_value' => $config->get('invite_expiration'),
-    );
+    ];
 
-    $form['accept_redirect'] = array(
+    $form['accept_redirect'] = [
       '#type' => 'textfield',
       '#required' => FALSE,
       '#title' => t('Accept Redirect'),
       '#description' => t('The route the user will be redirected to when registering. Defaults to "user.register"'),
       '#default_value' => $config->get('accept_redirect'),
-    );
+    ];
 
     return parent::buildForm($form, $form_state);
   }
diff --git a/src/Form/InviteTypeDeleteForm.php b/src/Form/InviteTypeDeleteForm.php
index 4dbc1f5..a1e2476 100644
--- a/src/Form/InviteTypeDeleteForm.php
+++ b/src/Form/InviteTypeDeleteForm.php
@@ -15,7 +15,7 @@ class InviteTypeDeleteForm 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()]);
   }
 
   /**
diff --git a/src/Form/InviteTypeForm.php b/src/Form/InviteTypeForm.php
index a67231d..4e3b94e 100644
--- a/src/Form/InviteTypeForm.php
+++ b/src/Form/InviteTypeForm.php
@@ -50,7 +50,7 @@ class InviteTypeForm extends EntityForm {
    * Helper function to load the default send method for the invite type.
    */
   public function getDefaultSendMethods($invite_type) {
-    $defaults = array();
+    $defaults = [];
     foreach (explode('||', \Drupal::config('invite.invite_sender.' . $invite_type->getType())->get('sending_methods')) as $sending_method) {
       if ($sending_method != '0') {
         $defaults[$sending_method] = $sending_method;
@@ -78,34 +78,34 @@ class InviteTypeForm extends EntityForm {
     }
     $data = unserialize($entity->getData());
 
-    $form['label'] = array(
+    $form['label'] = [
       '#title' => t('Invite Type Label'),
       '#type' => 'textfield',
       '#default_value' => $entity->label(),
       '#description' => t('The human-readable name of this invite type. This name must be unique.'),
       '#required' => TRUE,
       '#size' => 30,
-    );
+    ];
 
-    $form['id'] = array(
+    $form['id'] = [
       '#type' => 'machine_name',
       '#default_value' => $entity->getType(),
       '#maxlength' => 255,
       '#disabled' => !$is_new,
-      '#machine_name' => array(
+      '#machine_name' => [
         'exists' => ['Drupal\invite\Entity\InviteType', 'load'],
-        'source' => array('label'),
-      ),
+        'source' => ['label'],
+      ],
       '#description' => t('A unique machine-readable name for this invite type. It must only contain lowercase letters, numbers, and underscores.'),
-    );
+    ];
 
-    $form['description'] = array(
+    $form['description'] = [
       '#type' => 'textarea',
       '#title' => t('Description'),
       '#description' => t('Description about the invite type.'),
       '#rows' => 5,
       '#default_value' => $entity->getDescription(),
-    );
+    ];
 
     $options[] = '- ' . $this->t('None') . ' -';
     foreach (user_roles() as $user_role) {
@@ -113,39 +113,39 @@ class InviteTypeForm extends EntityForm {
         $options[$user_role->id()] = $user_role->label();
       }
     }
-    $form['target_role'] = array(
+    $form['target_role'] = [
       '#type' => 'select',
       '#required' => FALSE,
       '#title' => t('Role'),
       '#description' => t('Please select a role to apply to the invitee (Optional).'),
       '#options' => $options,
       '#default_value' => $data['target_role'],
-    );
+    ];
 
     // List the available sending methods.
     $plugin_definitions = $this->pluginManager->getDefinitions();
     if (!empty($plugin_definitions)) {
-      $options = array();
+      $options = [];
       foreach ($plugin_definitions as $plugin_definition) {
         $options[$plugin_definition['provider']] = $plugin_definition['id'];
       }
-      $default_send_method = array();
+      $default_send_method = [];
       if (!$is_new) {
         $default_send_method = $this->getDefaultSendMethods($entity);
       }
-      $form['send_method'] = array(
+      $form['send_method'] = [
         '#type' => 'checkboxes',
         '#required' => TRUE,
         '#title' => t('Sending Method'),
         '#default_value' => $default_send_method,
         '#options' => $options,
-      );
+      ];
     }
     else {
-      $form['send_method'] = array(
+      $form['send_method'] = [
         '#type' => 'item',
         '#markup' => $this->t('Please enable a sending method module such as Invite by email.'),
-      );
+      ];
       $form['actions']['submit']['#disabled'] = TRUE;
 
     }
@@ -162,10 +162,10 @@ class InviteTypeForm extends EntityForm {
     $invite_sender = InviteSender::load($type);
     if (empty($invite_sender)) {
       $invite_sender = InviteSender::create(
-        array(
+        [
           'id' => $type,
           'sending_methods' => $send_methods,
-        )
+        ]
       );
     }
     else {
@@ -182,7 +182,7 @@ class InviteTypeForm extends EntityForm {
   public function submitForm(array &$form, FormStateInterface $form_state) {
     // Assemble data.
     $data_value = $form_state->getValue('data');
-    $data = !empty($data_value) ? $data_value : array();
+    $data = !empty($data_value) ? $data_value : [];
     $data['target_role'] = $form_state->getValue('target_role');
     $form_state->setValue('data', serialize($data));
     parent::submitForm($form, $form_state);
diff --git a/src/InvitePermissions.php b/src/InvitePermissions.php
index f9f5551..e1bdbd5 100644
--- a/src/InvitePermissions.php
+++ b/src/InvitePermissions.php
@@ -50,14 +50,14 @@ class InvitePermissions implements ContainerInjectionInterface {
     $invite_types = $this->entityManager->getStorage('invite_type')
       ->loadMultiple();
     foreach ($invite_types as $invite_type) {
-      $permissions['invite_type_' . $invite_type->getType()] = array(
-        'title' => $this->t('Create @label invites', array('@label' => $invite_type->label())),
-        'description' => array(
+      $permissions['invite_type_' . $invite_type->getType()] = [
+        'title' => $this->t('Create @label invites', ['@label' => $invite_type->label()]),
+        'description' => [
           '#prefix' => '<em>',
           '#markup' => $this->t('Warning: This permission could have security implications.'),
           '#suffix' => '</em>',
-        ),
-      );
+        ],
+      ];
     }
     return $permissions;
   }
diff --git a/src/Plugin/Derivative/InviteBlock.php b/src/Plugin/Derivative/InviteBlock.php
index 8a385de..3133851 100644
--- a/src/Plugin/Derivative/InviteBlock.php
+++ b/src/Plugin/Derivative/InviteBlock.php
@@ -24,7 +24,7 @@ class InviteBlock implements DeriverInterface {
    * Creates a block for each sending method that is enabled on invite_types.
    */
   public function getDerivativeDefinitions($base_plugin_definition) {
-    $derivatives = array();
+    $derivatives = [];
     foreach (InviteSender::loadMultiple(\Drupal::entityQuery('invite_sender')
       ->condition('sending_methods', $base_plugin_definition['provider'], 'CONTAINS')
       ->execute()) as $sending_method) {
