diff --git a/modules/anonymous_publishing_cl/src/Controller/AnonymousPublishingController.php b/modules/anonymous_publishing_cl/src/Controller/AnonymousPublishingController.php
index 6bc1a2a..a78167d 100644
--- a/modules/anonymous_publishing_cl/src/Controller/AnonymousPublishingController.php
+++ b/modules/anonymous_publishing_cl/src/Controller/AnonymousPublishingController.php
@@ -66,12 +66,12 @@ class AnonymousPublishingController extends ControllerBase {
       $now = date('Y-m-d');
       $auid = \Drupal::database()
         ->insert('anonymous_publishing_emails')
-        ->fields(array(
+        ->fields([
           'email' => $email,
           'ipaddress' => $ip,
           'firstseen' => $now,
           'lastseen' => $now,
-        ))
+        ])
         ->execute();
       $aliasopt = \Drupal::config('anonymous_publishing_cl.settings')->get('user_alias');
 
@@ -125,7 +125,7 @@ class AnonymousPublishingController extends ControllerBase {
         $node->save();
         drupal_set_message($vfymsg . ' ' . t('your content has been published and will appear on the site soon.'));
         if ($node->access('view')) {
-          return $this->redirect($node->toUrl()->getRouteName(), array('node' => $nid));
+          return $this->redirect($node->toUrl()->getRouteName(), ['node' => $nid]);
         }
       }
     }
diff --git a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminBlocked.php b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminBlocked.php
index 07c730e..175c467 100644
--- a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminBlocked.php
+++ b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminBlocked.php
@@ -49,47 +49,47 @@ class AnonymousPublishingClAdminBlocked extends FormBase {
   public function buildForm(array $form, FormStateInterface $form_state) {
 
     // Build an 'Update options' form.
-    $form['options'] = array(
+    $form['options'] = [
       '#type' => 'details',
       '#title' => $this->t('Update options'),
       '#open' => TRUE,
-      '#attributes' => array('class' => array('container-inline')),
-    );
+      '#attributes' => ['class' => ['container-inline']],
+    ];
 
-    $options = array(
+    $options = [
       'block' => $this->t("Block the email address"),
       'unblock' => $this->t("Unblock the email address"),
-    );
-    $form['options']['operation'] = array(
+    ];
+    $form['options']['operation'] = [
       '#type' => 'select',
       '#title' => $this->t('Action'),
       '#title_display' => 'invisible',
       '#options' => $options,
       '#default_value' => 'publish',
-    );
-    $form['options']['submit'] = array(
+    ];
+    $form['options']['submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Update'),
-    );
+    ];
 
     $form['apu_info'] = [
       '#markup' => t("<p>The table below shows the e-mail address used to verify, IP-address, generated alias, blocked status for all <em>verified</em> e-mail addresses. To block or unblock some email adresses, check each corresponding line's below and execute the desired action.</p><p>Note than an e-mail address is not listed here until it has been verified.  For yet unverified addresses, see the <em>unverified</em> tab.</p>")
     ];
 
-    $header = array(
-      'email' => array(
+    $header = [
+      'email' => [
         'data' => $this->t('Verification email'),
-      ),
-      'ip' => array(
+      ],
+      'ip' => [
         'data' => $this->t('IP-address'),
-      ),
-      'alias' => array(
+      ],
+      'alias' => [
         'data' => $this->t('Byline (if available)'),
-        'class' => array(RESPONSIVE_PRIORITY_MEDIUM),
-      ),
-    );
+        'class' => [RESPONSIVE_PRIORITY_MEDIUM],
+      ],
+    ];
 
-    $options = array();
+    $options = [];
 
     // Fetch all emails.
     $rows = $this->getAllBlockedContents();
@@ -97,33 +97,33 @@ class AnonymousPublishingClAdminBlocked extends FormBase {
     // Build the table.
     foreach ($rows as $row) {
 
-      $options[$row->auid] = array(
-        'email' => array(
-          'data' => array(
+      $options[$row->auid] = [
+        'email' => [
+          'data' => [
             '#markup' => Html::escape($row->email),
-          ),
-        ),
-        'ip' => array(
-          'data' => array(
+          ],
+        ],
+        'ip' => [
+          'data' => [
             '#markup' => $row->ipaddress,
-          ),
-        ),
-        'alias' => array(
-          'data' => array(
+          ],
+        ],
+        'alias' => [
+          'data' => [
             '#markup' => !empty($row->alias) ? Html::escape($row->alias) : $this->t('- none -'),
-          ),
-        ),
-      );
+          ],
+        ],
+      ];
     }
 
-    $form['items'] = array(
+    $form['items'] = [
       '#type' => 'tableselect',
       '#header' => $header,
       '#options' => $options,
       '#empty' => $this->t('There is no unverified content.'),
-    );
+    ];
 
-    $form['pager'] = array('#type' => 'pager');
+    $form['pager'] = ['#type' => 'pager'];
 
     return $form;
   }
@@ -132,7 +132,7 @@ class AnonymousPublishingClAdminBlocked extends FormBase {
    * {@inheritdoc}
    */
   public function validateForm(array &$form, FormStateInterface $form_state) {
-    $form_state->setValue('items', array_diff($form_state->getValue('items'), array(0)));
+    $form_state->setValue('items', array_diff($form_state->getValue('items'), [0]));
     // We can't execute any 'Update options' if no items were selected.
     if (count($form_state->getValue('items')) == 0) {
       $form_state->setErrorByName('', $this->t('Select one or more items to perform the update on.'));
@@ -155,7 +155,7 @@ class AnonymousPublishingClAdminBlocked extends FormBase {
       }
 
       $this->database->update('anonymous_publishing_emails')
-        ->fields('anonymous_publishing_emails', array('blocked' => $blocked))
+        ->fields('anonymous_publishing_emails', ['blocked' => $blocked])
         ->condition('auid', $id)
         ->execute();
 
diff --git a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminEmail.php b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminEmail.php
index 5657d49..8df205d 100644
--- a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminEmail.php
+++ b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminEmail.php
@@ -34,32 +34,32 @@ class AnonymousPublishingClAdminEmail extends ConfigFormBase {
   public function buildForm(array $form, FormStateInterface $form_state) {
     $settings = $this->config('anonymous_publishing_cl.mail');
 
-    $form['anonymous_publishing_usersec'] = array(
+    $form['anonymous_publishing_usersec'] = [
       '#type' => 'details',
       '#open' => TRUE,
       '#title' => 'User email notification',
       '#description' => t('<p>You may edit the following fields to customize the e-mail message sent to non-authenticated users when they create content. One of the first two fields are used for the subject field, the rest may go in the body.</p>')
-    );
+    ];
 
-    $form['anonymous_publishing_usersec']['email_subject_active'] = array(
+    $form['anonymous_publishing_usersec']['email_subject_active'] = [
       '#type' => 'textfield',
       '#title' => t('Subject (activate content):'),
       '#size' => 72,
       '#maxlength' => 180,
       '#default_value' => $settings->get('email_subject_active'),
       '#parents' => ['email_subject_active'],
-    );
+    ];
 
-    $form['anonymous_publishing_usersec']['email_subject_verify'] = array(
+    $form['anonymous_publishing_usersec']['email_subject_verify'] = [
       '#type' => 'textfield',
       '#title' => t('Subject (verify email):'),
       '#size' => 72,
       '#maxlength' => 180,
       '#default_value' => $settings->get('email_subject_verify'),
       '#parents' => ['email_subject_verify'],
-    );
+    ];
 
-    $form['anonymous_publishing_usersec']['email_introduction'] = array(
+    $form['anonymous_publishing_usersec']['email_introduction'] = [
       '#type' => 'textarea',
       '#title' => t('Introduction:'),
       '#default_value' => $settings->get('email_introduction'),
@@ -67,9 +67,9 @@ class AnonymousPublishingClAdminEmail extends ConfigFormBase {
       '#rows' => 4,
       '#resizable' => FALSE,
       '#parents' => ['email_introduction'],
-    );
+    ];
 
-    $form['anonymous_publishing_usersec']['email_activate'] = array(
+    $form['anonymous_publishing_usersec']['email_activate'] = [
       '#type' => 'textarea',
       '#title' => t('Text to include if auto-deletion is enabled:'),
       '#default_value' => $settings->get('email_activate'),
@@ -77,9 +77,9 @@ class AnonymousPublishingClAdminEmail extends ConfigFormBase {
       '#rows' => 1,
       '#resizable' => FALSE,
       '#parents' => ['email_activate'],
-    );
+    ];
 
-    $form['anonymous_publishing_usersec']['email_verify'] = array(
+    $form['anonymous_publishing_usersec']['email_verify'] = [
       '#type' => 'textarea',
       '#title' => t('Text to include when administrator approval is  mandatory:'),
       '#default_value' => $settings->get('email_verify'),
@@ -87,25 +87,25 @@ class AnonymousPublishingClAdminEmail extends ConfigFormBase {
       '#rows' => 2,
       '#resizable' => FALSE,
       '#parents' => ['email_verify'],
-    );
+    ];
 
-    $form['anonymous_publishing_modsec'] = array(
+    $form['anonymous_publishing_modsec'] = [
       '#type' => 'details',
       '#open' => TRUE,
       '#title' => 'Admin email notification',
       '#description' => t('<p>You may edit the following fields to customize the e-mail message sent to the administrator when non-authenticated users create content. The first field is the subject, the second is the body.</p>')
-    );
+    ];
 
-    $form['anonymous_publishing_modsec']['email_admin_subject'] = array(
+    $form['anonymous_publishing_modsec']['email_admin_subject'] = [
       '#type' => 'textfield',
       '#title' => t('Subject (admin):'),
       '#default_value' => $settings->get('email_admin_subject'),
       '#size' => 60,
       '#maxlength' => 180,
       '#parents' => ['email_admin_subject'],
-    );
+    ];
 
-    $form['anonymous_publishing_modsec']['email_admin_body'] = array(
+    $form['anonymous_publishing_modsec']['email_admin_body'] = [
       '#type' => 'textarea',
       '#title' => t('Body (admin):'),
       '#default_value' => $settings->get('email_admin_body'),
@@ -113,11 +113,11 @@ class AnonymousPublishingClAdminEmail extends ConfigFormBase {
       '#rows' => 2,
       '#resizable' => FALSE,
       '#parents' => ['email_admin_body'],
-    );
+    ];
 
-    $form['anonymous_publishing_vars'] = array(
+    $form['anonymous_publishing_vars'] = [
       '#markup' => t('<p>You may use the following tokens in the texts above: <code>@action, @autodelhours, @email, @site, @title, @verification_uri.</code></p>')
-    );
+    ];
 
     return parent::buildForm($form, $form_state);
   }
diff --git a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminModeration.php b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminModeration.php
index 2fb12f9..358b90f 100644
--- a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminModeration.php
+++ b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminModeration.php
@@ -56,55 +56,55 @@ class AnonymousPublishingClAdminModeration extends FormBase {
   public function buildForm(array $form, FormStateInterface $form_state) {
 
     // Build an 'Update options' form.
-    $form['options'] = array(
+    $form['options'] = [
       '#type' => 'details',
       '#title' => $this->t('Update options'),
       '#open' => TRUE,
-      '#attributes' => array('class' => array('container-inline')),
-    );
+      '#attributes' => ['class' => ['container-inline']],
+    ];
 
-    $options = array(
+    $options = [
       'publish' => $this->t('Publish the selected items'),
       'unpublish' => $this->t('Unpublish the selected items'),
-    );
-    $form['options']['operation'] = array(
+    ];
+    $form['options']['operation'] = [
       '#type' => 'select',
       '#title' => $this->t('Action'),
       '#title_display' => 'invisible',
       '#options' => $options,
       '#default_value' => 'publish',
-    );
-    $form['options']['submit'] = array(
+    ];
+    $form['options']['submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Update'),
-    );
+    ];
 
     $form['apm_info'] = [
       '#markup' => t('<p>The following table shows all nodes that have been verified by e-mail. You may publish or unpublish by selecting the corresponding line(s) and perform the update action.</p>')
     ];
 
-    $header = array(
-      'title' => array(
+    $header = [
+      'title' => [
         'data' => $this->t('Title'),
         'specifier' => 'title',
         'sort' => 'desc',
-      ),
-      'type' => array(
+      ],
+      'type' => [
         'data' => $this->t('Type'),
-        'class' => array(RESPONSIVE_PRIORITY_MEDIUM),
-      ),
-      'email' => array(
+        'class' => [RESPONSIVE_PRIORITY_MEDIUM],
+      ],
+      'email' => [
         'data' => $this->t('E-mail'),
-      ),
-      'published' => array(
+      ],
+      'published' => [
         'data' => $this->t('Published'),
         'sort' => 'desc',
         'specifier' => 'published',
-      ),
-    );
+      ],
+    ];
 
-    $options = array();
-    $hidden_values = array();
+    $options = [];
+    $hidden_values = [];
 
     // Fetch all nodes that has been verified.
     $results = $this->getAllContentsToModerate($header);
@@ -132,7 +132,7 @@ class AnonymousPublishingClAdminModeration extends FormBase {
         $node = Node::load($row->nid);
         if ($node) {
           $title = $node->getTitle();
-          $url = Url::fromUri($node->url('canonical', array('absolute' => TRUE)));
+          $url = Url::fromUri($node->url('canonical', ['absolute' => TRUE]));
           $status = $node->isPublished() ? $this->t('Published') : $this->t('Unpublished');
         }
         else {
@@ -145,55 +145,55 @@ class AnonymousPublishingClAdminModeration extends FormBase {
       }
 
       if ($url) {
-        $datatitle = array(
+        $datatitle = [
           '#type' => 'link',
           '#title' => Html::escape($title),
           '#url' => $url,
-        );
+        ];
       }
       else {
-        $datatitle = array(
+        $datatitle = [
           '#markup' => Html::escape($title),
-        );
+        ];
       }
 
-      $options[$id] = array(
-        'title' => array(
+      $options[$id] = [
+        'title' => [
           'data' => $datatitle,
-        ),
-        'type' => array(
-          'data' => array(
+        ],
+        'type' => [
+          'data' => [
             '#markup' => $this->t($type),
-          ),
-        ),
-        'email' => array(
-          'data' => array(
+          ],
+        ],
+        'email' => [
+          'data' => [
             '#markup' => $row->email
-          ),
-        ),
-        'published' => array(
-          'data' => array(
+          ],
+        ],
+        'published' => [
+          'data' => [
             '#markup' => $status
-          ),
-        ),
-      );
+          ],
+        ],
+      ];
 
       $hidden_values[$row->nid] = $type;
     }
 
-    $form['hidden_values'] = array(
+    $form['hidden_values'] = [
       '#type' => 'hidden',
       '#value' => serialize($hidden_values),
-    );
+    ];
 
-    $form['items'] = array(
+    $form['items'] = [
       '#type' => 'tableselect',
       '#header' => $header,
       '#options' => $options,
       '#empty' => $this->t('There is no verified content to moderate.'),
-    );
+    ];
 
-    $form['pager'] = array('#type' => 'pager');
+    $form['pager'] = ['#type' => 'pager'];
 
     return $form;
   }
@@ -202,7 +202,7 @@ class AnonymousPublishingClAdminModeration extends FormBase {
    * {@inheritdoc}
    */
   public function validateForm(array &$form, FormStateInterface $form_state) {
-    $form_state->setValue('items', array_diff($form_state->getValue('items'), array(0)));
+    $form_state->setValue('items', array_diff($form_state->getValue('items'), [0]));
     // We can't execute any 'Update options' if no items were selected.
     if (count($form_state->getValue('items')) == 0) {
       $form_state->setErrorByName('', $this->t('Select one or more items to perform the update on.'));
diff --git a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminPrivacy.php b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminPrivacy.php
index ff7e154..0407b9c 100644
--- a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminPrivacy.php
+++ b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminPrivacy.php
@@ -150,7 +150,7 @@ class AnonymousPublishingClAdminPrivacy extends FormBase {
 
         // For the rest, delete the IP (we need e-mail for whitelist).
         $this->database->update('anonymous_publishing')
-          ->fields(array('ip' => ''))
+          ->fields(['ip' => ''])
           ->execute();
 
         drupal_set_message(t('All information linking identifiers to published content have been purged.'));
diff --git a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminSettings.php b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminSettings.php
index b59890d..ded717d 100644
--- a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminSettings.php
+++ b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminSettings.php
@@ -94,16 +94,16 @@ class AnonymousPublishingClAdminSettings extends ConfigFormBase {
     $form['allowed_content_types'] = [
       '#type' => 'checkboxes',
       '#multiple' => TRUE,
-      '#title' => t('Content types @comments where anonymous publishing is managed by this submodule:', array(
+      '#title' => t('Content types @comments where anonymous publishing is managed by this submodule:', [
         '@comments' => $ctext
-      )),
+      ]),
       '#default_value' => $enabled_content_types,
       '#options' => $content_types,
       '#description' => t('Note: You also need to use node permissions to enable anonymous publishing for the anonymous user role if you want this role to be able to create content.'),
     ];
 
     $anonymous_publishing_cl_options = $settings->get('general_options');
-    $anonymous_publishing_cl_options_values = array();
+    $anonymous_publishing_cl_options_values = [];
     foreach ($anonymous_publishing_cl_options as $option => $value) {
       $anonymous_publishing_cl_options_values[$option] = $value ? $option : '';
     }
@@ -112,16 +112,16 @@ class AnonymousPublishingClAdminSettings extends ConfigFormBase {
       '#multiple' => TRUE,
       '#title' => t('Options:'),
       '#default_value' => $anonymous_publishing_cl_options_values,
-      '#options' => array(
+      '#options' => [
         'sactivate' => t('Allow self-activation.'),
         'sactstick' => t('Make self-activation sticky.'),
-        'sactcomm' => t('Skip comment approval (set on @link).', array(
+        'sactcomm' => t('Skip comment approval (set on @link).', [
           '@link' => Link::createFromRoute(t('Administration » People » Permissions'), 'user.admin_permissions')->toString(),
-        )),
+        ]),
         'modmail' => t('Send e-mail to administrator when anonymous content is created.'),
         'blockip' => t('Use IP-address for blocking.'),
         'aregist' => t('Allow registered e-mails to be used for anonymous posts.'),
-      ),
+      ],
       '#description' => t('Check the options you want to enable.'),
     ];
 
@@ -130,44 +130,44 @@ class AnonymousPublishingClAdminSettings extends ConfigFormBase {
       '#default_value' => $anonymous_user->hasPermission('skip comment approval'),
     ];
 
-    $form['verification_persistency'] = array(
+    $form['verification_persistency'] = [
       '#type' => 'radios',
       '#title' => t('Verification persistency:'),
-      '#options' => array(
+      '#options' => [
         'persist' => t('Make verification persistent.'),
         'ip_duration' => t('Verification persists as long as the same IP is used.'),
         'every_post' => t('Require verification for each posting.'),
-      ),
+      ],
       '#description' => t('This determines whether users need to re-verify.'),
       '#default_value' => $settings->get('verification_persistency'),
-    );
+    ];
 
     // NOTE: Period is set on privacy tab, -1 = Indefinitely.
     $period = $settings->get('retain_period');
     if (-1 == $period) {
-      $form['user_alias'] = array(
+      $form['user_alias'] = [
         '#type' => 'radios',
         '#title' => t('To whom should anonymous postings be attributed:'),
-        '#options' => array(
-          'anon' => t('Use "@anon" (the default alias for anonymous users).', array(
+        '#options' => [
+          'anon' => t('Use "@anon" (the default alias for anonymous users).', [
             '@anon' => \Drupal::config('user.settings')
               ->get('anonymous')
-          )),
+          ]),
           'alias' => t('Use an autogenerated persistent alias (format "user<em>N</em>").'),
           'byline' => t('Allow the anonymous publisher to set the byline.'),
-        ),
+        ],
         '#description' => t('This determines what string to use as byline for anonymous posts.'),
         '#default_value' => $settings->get('user_alias'),
-      );
+      ];
 
-      $form['byline_guidance'] = array(
+      $form['byline_guidance'] = [
         '#type' => 'textfield',
         '#title' => t('Guidelines for the byline:'),
         '#size' => 60,
         '#maxlength' => Email::EMAIL_MAX_LENGTH,
         '#default_value' => $settings->get('byline_guidance'),
         '#description' => t('If you want to provide guidance users who set their own byline, you can do it here.'),
-      );
+      ];
     }
     else {
       $form['user_alias'] = [
@@ -177,42 +177,42 @@ class AnonymousPublishingClAdminSettings extends ConfigFormBase {
 
     $default_mail = $settings->get('notification_email_destination') ? $settings->get('notification_email_destination') : $this->config('system.site')
       ->get('mail');
-    $form['notification_email_destination'] = array(
+    $form['notification_email_destination'] = [
       '#type' => 'email',
       '#title' => t("Administrator's e-mail address:"),
       '#size' => 60,
       '#maxlength' => Email::EMAIL_MAX_LENGTH,
       '#default_value' => $default_mail,
       '#description' => t('Address to use when the "Send e-mail to administrator…" option is checked.'),
-    );
+    ];
 
 
-    $form['email_weight'] = array(
+    $form['email_weight'] = [
       '#type' => 'number',
       '#title' => t('Verification e-mail address field weight:'),
       '#size' => 3,
       '#maxlength' => 3,
       '#default_value' => $settings->get('email_weight'),
       '#description' => t('Weight of verification e-mail address field on create content form.'),
-    );
+    ];
 
-    $form['autodelhours'] = array(
+    $form['autodelhours'] = [
       '#type' => 'number',
       '#title' => t('Number of hours to retain unverified anonymous posts before auto-deletions removes them:'),
       '#size' => 3,
       '#maxlength' => 3,
       '#default_value' => $settings->get('autodelhours'),
       '#description' => t('Non-verified content will be automatically deleted after this time. Type "-1" for no limit.'),
-    );
+    ];
 
-    $form['flood_limit'] = array(
+    $form['flood_limit'] = [
       '#type' => 'number',
       '#title' => t('Number of anonymous posts allowed from a single user e-mail/ip allowed within an hour:'),
       '#size' => 3,
       '#maxlength' => 2,
       '#default_value' => $settings->get('flood_limit'),
       '#description' => t('Type "-1" for no limit.'),
-    );
+    ];
     return parent::buildForm($form, $form_state);
   }
 
diff --git a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminSpam.php b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminSpam.php
index 4a5c949..240afbb 100644
--- a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminSpam.php
+++ b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminSpam.php
@@ -61,64 +61,64 @@ class AnonymousPublishingClAdminSpam extends FormBase {
 
     if (\Drupal::moduleHandler()->moduleExists('ban')) {
       // Build an 'Update options' form.
-      $form['options'] = array(
+      $form['options'] = [
         '#type' => 'details',
         '#title' => $this->t('Update options'),
         '#open' => TRUE,
-        '#attributes' => array('class' => array('container-inline')),
-      );
+        '#attributes' => ['class' => ['container-inline']],
+      ];
 
-      $options = array(
+      $options = [
         'block' => $this->t("Block the IP address"),
         'unblock' => $this->t("Unblock the IP address"),
-      );
-      $form['options']['operation'] = array(
+      ];
+      $form['options']['operation'] = [
         '#type' => 'select',
         '#title' => $this->t('Action'),
         '#title_display' => 'invisible',
         '#options' => $options,
         '#default_value' => 'publish',
-      );
-      $form['options']['submit'] = array(
+      ];
+      $form['options']['submit'] = [
         '#type' => 'submit',
         '#value' => $this->t('Update'),
-      );
+      ];
     } else {
-      $form['options'] = array(
+      $form['options'] = [
         '#markup' => '<p><b>' . $this->t("You can't ban IPs if you don't enable the BAN module.") . '</b></p>',
-      );
+      ];
     }
 
     $form['apu_info'] = [
       '#markup' => t("<p>The following table shows the IP-addresses and the average hits per day generated by the ten most aggressive spambots hitting the site. To move the bot's IP-address to Drupal's <code>{blocked_ips}</code> table, check the corresponding item line and Update using the proper action.</p><p>As an alternative to the Drupal <code>{blocked_ips}</code> table you may instead deny access to unwanted IP-addresses using the appropriate command in the web server access file.</p>")
     ];
 
-    $header = array(
-      'ip' => array(
+    $header = [
+      'ip' => [
         'data' => $this->t('IP-address'),
-      ),
-      'first' => array(
+      ],
+      'first' => [
         'data' => $this->t('First seen'),
-      ),
-      'last' => array(
+      ],
+      'last' => [
         'data' => $this->t('Last seeb'),
-      ),
-      'visits' => array(
+      ],
+      'visits' => [
         'data' => $this->t('Total hits'),
-      ),
-      'freq' => array(
+      ],
+      'freq' => [
         'data' => $this->t('Daily hits'),
-      ),
-      'status' => array(
+      ],
+      'status' => [
         'data' => $this->t('Status'),
-      ),
-      'blocked' => array(
+      ],
+      'blocked' => [
         'data' => $this->t('Banned'),
-      ),
-    );
+      ],
+    ];
 
-    $options = array();
-    $hidden_values = array();
+    $options = [];
+    $hidden_values = [];
 
     // Fetch first 10 bot reports.
     $rows = $this->getAllSpamContents();
@@ -129,61 +129,61 @@ class AnonymousPublishingClAdminSpam extends FormBase {
       $freq = $row->visits / ((REQUEST_TIME - $row->first) / 86400);
       $freq = min([$freq, $row->visits]);
 
-      $options[$row->id] = array(
-        'ip' => array(
-          'data' => array(
+      $options[$row->id] = [
+        'ip' => [
+          'data' => [
             '#markup' => $row->ip,
-          ),
-        ),
-        'first' => array(
-          'data' => array(
+          ],
+        ],
+        'first' => [
+          'data' => [
             '#markup' => $this->dateFormatter->formatInterval(REQUEST_TIME - $row->first, 1) . ' ' . t('ago'),
-          ),
-        ),
-        'last' => array(
-          'data' => array(
+          ],
+        ],
+        'last' => [
+          'data' => [
             '#markup' => $this->dateFormatter->formatInterval(REQUEST_TIME - $row->last, 1) . ' ' . t('ago'),
-          ),
-        ),
-        'visits' => array(
-          'data' => array(
+          ],
+        ],
+        'visits' => [
+          'data' => [
             '#markup' => $row->visits,
-          ),
-        ),
-        'freq' => array(
-          'data' => array(
+          ],
+        ],
+        'freq' => [
+          'data' => [
             '#markup' => round($freq),
-          ),
-        ),
-        'status' => array(
-          'data' => array(
+          ],
+        ],
+        'status' => [
+          'data' => [
             '#markup' => round($freq),
-          ),
-        ),
-        'blocked' => array(
-          'data' => array(
+          ],
+        ],
+        'blocked' => [
+          'data' => [
             '#markup' => isset($row->iid) ? $this->t('IP is banned') : $this->t('IP is not banned'),
-          ),
-        ),
-      );
+          ],
+        ],
+      ];
 
       $hidden_values[$row->id] = $row->ip;
 
     }
 
-    $form['hidden_values'] = array(
+    $form['hidden_values'] = [
       '#type' => 'hidden',
       '#value' => serialize($hidden_values),
-    );
+    ];
 
-    $form['items'] = array(
+    $form['items'] = [
       '#type' => 'tableselect',
       '#header' => $header,
       '#options' => $options,
       '#empty' => $this->t('There is no unverified content.'),
-    );
+    ];
 
-    $form['pager'] = array('#type' => 'pager');
+    $form['pager'] = ['#type' => 'pager'];
 
     return $form;
   }
@@ -192,7 +192,7 @@ class AnonymousPublishingClAdminSpam extends FormBase {
  * {@inheritdoc}
  */
   public function validateForm(array &$form, FormStateInterface $form_state) {
-    $form_state->setValue('items', array_diff($form_state->getValue('items'), array(0)));
+    $form_state->setValue('items', array_diff($form_state->getValue('items'), [0]));
     // We can't execute any 'Update options' if no items were selected.
     if (count($form_state->getValue('items')) == 0) {
       $form_state->setErrorByName('', $this->t('Select one or more items to perform the update on.'));
@@ -218,7 +218,7 @@ class AnonymousPublishingClAdminSpam extends FormBase {
           ->fetchAssoc();
         if (FALSE == $existp) {
           $this->database->insert('ban_ip')
-            ->fields(array('ip'), array($hidden[$id]))
+            ->fields(['ip'], [$hidden[$id]])
             ->execute();
         }
       }
diff --git a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminUnverified.php b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminUnverified.php
index 6d6fed8..088a1cf 100644
--- a/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminUnverified.php
+++ b/modules/anonymous_publishing_cl/src/Form/AnonymousPublishingClAdminUnverified.php
@@ -53,57 +53,57 @@ class AnonymousPublishingClAdminUnverified extends FormBase {
   public function buildForm(array $form, FormStateInterface $form_state) {
 
     // Build an 'Update options' form.
-    $form['options'] = array(
+    $form['options'] = [
       '#type' => 'details',
       '#title' => $this->t('Update options'),
       '#open' => TRUE,
-      '#attributes' => array(
-        'class' => array('container-inline')
-      ),
-    );
+      '#attributes' => [
+        'class' => ['container-inline']
+      ],
+    ];
 
-    $options = array(
+    $options = [
       'ban' => $this->t("Delete item and ban it's IP"),
-    );
-    $form['options']['operation'] = array(
+    ];
+    $form['options']['operation'] = [
       '#type' => 'select',
       '#title' => $this->t('Action'),
       '#title_display' => 'invisible',
       '#options' => $options,
       '#default_value' => 'publish',
-    );
-    $form['options']['submit'] = array(
+    ];
+    $form['options']['submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Update'),
-    );
+    ];
 
     $form['apu_info'] = [
       '#markup' => t("<p>The following table shows the IP-addresses, verification e-mail address used, date posted and title of still <em>unverified</em> anonymous posts. To delete the contents and ban the IP-address by moving to Drupal's <code>{blocked_ips}</code> table, check the box in the corresponding lines and execute the &#8220;Delete item and ban it's IP&#8221; action.</p><p>As an alternative to the Drupal <code>{blocked_ips}</code> table you may instead deny access to unwanted IP-addresses using the appropriate command in the web server access file.</p>")
     ];
 
-    $header = array(
-      'title' => array(
+    $header = [
+      'title' => [
         'data' => $this->t('Title'),
-      ),
-      'type' => array(
+      ],
+      'type' => [
         'data' => $this->t('Type'),
-      ),
-      'ip' => array(
+      ],
+      'ip' => [
         'data' => $this->t('IP-address'),
-      ),
-      'email' => array(
+      ],
+      'email' => [
         'data' => $this->t('Verification e-mail'),
-        'class' => array(RESPONSIVE_PRIORITY_MEDIUM),
-      ),
-      'when' => array(
+        'class' => [RESPONSIVE_PRIORITY_MEDIUM],
+      ],
+      'when' => [
         'data' => $this->t('When'),
-        'class' => array(RESPONSIVE_PRIORITY_LOW),
+        'class' => [RESPONSIVE_PRIORITY_LOW],
         'sort' => 'desc',
-      ),
-    );
+      ],
+    ];
 
-    $options = array();
-    $hidden_values = array();
+    $options = [];
+    $hidden_values = [];
 
     // Fetch all unverified posts.
     $rows = $this->getAllUnverifiedContents($header);
@@ -149,63 +149,63 @@ class AnonymousPublishingClAdminUnverified extends FormBase {
           ->formatInterval(REQUEST_TIME - $datefield, 1) . ' ' . t('ago') : '-NULL-';
 
       if ($url) {
-        $datatitle = array(
+        $datatitle = [
           '#type' => 'link',
           '#title' => $titlefield,
           '#url' => $url,
-        );
+        ];
       }
       else {
-        $datatitle = array(
+        $datatitle = [
           '#markup' => $titlefield,
-        );
+        ];
       }
-      $options[$row->apid] = array(
-        'title' => array(
+      $options[$row->apid] = [
+        'title' => [
           'data' => $datatitle,
-        ),
-        'type' => array(
-          'data' => array(
+        ],
+        'type' => [
+          'data' => [
             '#markup' => $type,
-          ),
-        ),
-        'ip' => array(
-          'data' => array(
+          ],
+        ],
+        'ip' => [
+          'data' => [
             '#markup' => $row->ip,
-          ),
-        ),
-        'email' => array(
-          'data' => array(
+          ],
+        ],
+        'email' => [
+          'data' => [
             '#markup' => $row->email,
-          ),
-        ),
-        'when' => array(
-          'data' => array(
+          ],
+        ],
+        'when' => [
+          'data' => [
             '#markup' => $datefield,
-          ),
-        ),
-      );
+          ],
+        ],
+      ];
 
-      $hidden_values[$row->apid] = array(
+      $hidden_values[$row->apid] = [
         'nid' => $row->nid,
         'cid' => $row->cid,
         'ip' => $row->ip,
-      );
+      ];
     }
 
-    $form['hidden_values'] = array(
+    $form['hidden_values'] = [
       '#type' => 'hidden',
       '#value' => serialize($hidden_values),
-    );
+    ];
 
-    $form['items'] = array(
+    $form['items'] = [
       '#type' => 'tableselect',
       '#header' => $header,
       '#options' => $options,
       '#empty' => $this->t('There is no unverified content.'),
-    );
+    ];
 
-    $form['pager'] = array('#type' => 'pager');
+    $form['pager'] = ['#type' => 'pager'];
 
     return $form;
   }
@@ -214,7 +214,7 @@ class AnonymousPublishingClAdminUnverified extends FormBase {
    * {@inheritdoc}
    */
   public function validateForm(array &$form, FormStateInterface $form_state) {
-    $form_state->setValue('items', array_diff($form_state->getValue('items'), array(0)));
+    $form_state->setValue('items', array_diff($form_state->getValue('items'), [0]));
     // We can't execute any 'Update options' if no items were selected.
     if (count($form_state->getValue('items')) == 0) {
       $form_state->setErrorByName('', $this->t('Select one or more items to perform the update on.'));
@@ -246,7 +246,7 @@ class AnonymousPublishingClAdminUnverified extends FormBase {
 
         if (!empty($hidden['ip'])) {
           $existp = $this->database->select('blocked_ips')
-            ->where('ip = :ip', array(':ip' => $hidden['ip']))
+            ->where('ip = :ip', [':ip' => $hidden['ip']])
             ->execute()
             ->fetchAssoc();
           if (FALSE == $existp) {
diff --git a/modules/anonymous_publishing_cl/src/Services/AnonymousPublishingClService.php b/modules/anonymous_publishing_cl/src/Services/AnonymousPublishingClService.php
index 89d5e97..eeac490 100644
--- a/modules/anonymous_publishing_cl/src/Services/AnonymousPublishingClService.php
+++ b/modules/anonymous_publishing_cl/src/Services/AnonymousPublishingClService.php
@@ -128,10 +128,10 @@ class AnonymousPublishingClService {
     // Get the entity title and link.
     if ($entity->getEntityTypeId() == 'node') {
       $title = $entity->getTitle();
-      $vfurl = Url::fromRoute('anonymous_publishing_cl.verify', array(), array(
-        'query' => array('akey' => $akey),
+      $vfurl = Url::fromRoute('anonymous_publishing_cl.verify', [], [
+        'query' => ['akey' => $akey],
         'absolute' => TRUE
-      ));
+      ]);
       $modp = !$options['sactivate'];
     }
     else {
@@ -140,24 +140,24 @@ class AnonymousPublishingClService {
         if (empty($title)) {
           $title = '';
         }
-        $vfurl = Url::fromRoute('anonymous_publishing_cl.verify', array(), array(
-          'query' => array('akey' => $akey),
+        $vfurl = Url::fromRoute('anonymous_publishing_cl.verify', [], [
+          'query' => ['akey' => $akey],
           'absolute' => TRUE
-        ));
+        ]);
         $modp = !$options['sactivate'];
       }
     }
 
     // Build emails remplacement tokens values.
     $autodelhours = $settings->get('autodelhours');
-    $variables = array(
+    $variables = [
       '@action' => $modp ? t('verify') : t('activate'),
       '@autodelhours' => $settings->get('autodelhours'),
       '@email' => $entity->anonymous_publishing_email,
       '@site' => $this->configFactory->get('system.site')->get('name'),
       '@title' => Html::escape($title),
       '@verification_uri' => $vfurl->toString(),
-    );
+    ];
 
     // Build verification mail.
     $to = $entity->anonymous_publishing_email;
@@ -165,20 +165,20 @@ class AnonymousPublishingClService {
     $b1 = $this->t($emailSettings->get('email_introduction'), $variables);
     $b2 = $autodelhours >= 0 ? $this->t($emailSettings->get('email_activate'), $variables) : '';
     $b3 = $modp ? $this->t($emailSettings->get('email_verify'), $variables) : '';
-    $body = array($b1, $b2, $b3);
-    $params = array(
+    $body = [$b1, $b2, $b3];
+    $params = [
       'subject' => $subject,
       'body' => $body,
-    );
+    ];
 
     // Send verification mail
     $result = $this->mailManager->mail('anonymous_publishing_cl', 'verify', $to, \Drupal::currentUser()
       ->getPreferredLangcode(), $params);
     if ($result['result'] == TRUE) {
       drupal_set_message(t('A link and further instructions have been sent to your e-mail address.'));
-      $this->logger->notice('Verification mail sent to @to', array(
+      $this->logger->notice('Verification mail sent to @to', [
         '@to' => $to,
-      ));
+      ]);
     }
     else {
       $this->logger->error('Error mailing activation/verification link.');
@@ -188,12 +188,12 @@ class AnonymousPublishingClService {
     // Send admin notification mail.
     if ($options['modmail']) {
       $subject = $this->t($emailSettings->get('email_admin_subject'), $variables);
-      $body = array($this->t($emailSettings->get('email_admin_body'), $variables));
+      $body = [$this->t($emailSettings->get('email_admin_body'), $variables)];
       $to = $settings->get('notification_email_destination');
-      $params = array(
+      $params = [
         'subject' => $subject,
         'body' => $body,
-      );
+      ];
       $result = $this->mailManager->mail('anonymous_publishing_cl', 'verify', $to, \Drupal::currentUser()
         ->getPreferredLangcode(), $params);
       if ($result['result'] == FALSE) {
@@ -247,26 +247,26 @@ class AnonymousPublishingClService {
     if (!empty($email_spam_bot)) {
 
       // Log the spam bot.
-      $this->logger->warning('Bot with email "@email".', array('@email' => $email));
+      $this->logger->warning('Bot with email "@email".', ['@email' => $email]);
 
       // Insert or update the bot submission in DB.
       $query = $this->database->select('anonymous_publishing_bots');
-      $query->fields('anonymous_publishing_bots', array('id'));
+      $query->fields('anonymous_publishing_bots', ['id']);
       $query->condition('ip', $this->request->getClientIp());
       $id = $query->execute()->fetchField();
 
       if ($id) {
         $this->database->update('anonymous_publishing_bots')
-          ->fields(array(
+          ->fields([
             'last' => REQUEST_TIME,
-          ))
+          ])
           ->expression('visits', 'visits + 1')
           ->condition('id', $id)
           ->execute();
       } else {
         $this->database->insert('anonymous_publishing_bots')->fields(
-          array('ip', 'visits', 'first', 'last'),
-          array($this->request->getClientIp(), 1, REQUEST_TIME, REQUEST_TIME,)
+          ['ip', 'visits', 'first', 'last'],
+          [$this->request->getClientIp(), 1, REQUEST_TIME, REQUEST_TIME,]
         )->execute();
       }
 
@@ -310,7 +310,7 @@ class AnonymousPublishingClService {
           $auid = $record->auid;
           $blocked += $record->blocked;
           $this->database->update('anonymous_publishing_emails')
-            ->fields(array('lastseen' => $now))
+            ->fields(['lastseen' => $now])
             ->condition('auid', $auid)
             ->execute();
         }
diff --git a/modules/anonymous_publishing_cl/src/Tests/AnonymousPublishingAdminSettingsTest.php b/modules/anonymous_publishing_cl/src/Tests/AnonymousPublishingAdminSettingsTest.php
index 41226fd..8272f69 100644
--- a/modules/anonymous_publishing_cl/src/Tests/AnonymousPublishingAdminSettingsTest.php
+++ b/modules/anonymous_publishing_cl/src/Tests/AnonymousPublishingAdminSettingsTest.php
@@ -23,22 +23,22 @@ class AnonymousPublishingAdminSettingsTest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array(
+  public static $modules = [
     'node',
     'comment',
     'anonymous_publishing',
     'anonymous_publishing_cl'
-  );
+  ];
 
   /**
    * {@inheritdoc}
    */
   public static function getInfo() {
-    return array(
+    return [
       'name' => 'Anonymous publishing',
       'description' => 'Tests for the Anonymous publishing module.',
       'group' => 'Anonymous publishing',
-    );
+    ];
   }
 
   /**
@@ -47,19 +47,19 @@ class AnonymousPublishingAdminSettingsTest extends WebTestBase {
   public function setUp() {
     parent::setUp();
 
-    $admin_user = $this->drupalCreateUser(array('administer anonymous_publishing'));
+    $admin_user = $this->drupalCreateUser(['administer anonymous_publishing']);
     $this->drupalLogin($admin_user);
 
     // Sets the module appropriately for testing.
     \Drupal::configFactory()->getEditable('anonymous_publishing_cl.settings')
-      ->set('allowed_content_types', array('article', 'comment'))
+      ->set('allowed_content_types', ['article', 'comment'])
       ->set('flood_limit', -1)
-      ->set('general_options', array(
+      ->set('general_options', [
         'sactivate' => TRUE,
         'modmail' => FALSE,
         'blockip' => FALSE,
         'aregist' => FALSE,
-      ))
+      ])
       ->set('flood_limit', -1)
       ->save();
   }
