diff --git a/password_policy.module b/password_policy.module
index 3024627..e6aeb39 100644
--- a/password_policy.module
+++ b/password_policy.module
@@ -39,24 +39,24 @@ function password_policy_form_user_form_alter(&$form, &$form_state) {
 
   // Load form if relevant.
   if ($show_password_policy_status) {
-    $form['account']['password_policy_status'] = array(
+    $form['account']['password_policy_status'] = [
       '#title' => 'Password policies',
       '#type' => 'table',
-      '#header' => array(t('Policy'), t('Status'), t('Constraint')),
+      '#header' => [t('Policy'), t('Status'), t('Constraint')],
       '#empty' => t('There are no constraints for the selected user roles'),
       '#weight' => '4',
       '#prefix' => '<div id="password-policy-status">',
       '#suffix' => '</div>',
       '#rows' => _password_policy_constraints_table($form, $form_state),
-    );
+    ];
 
     // Set ajax changes.
-    $form['account']['roles']['#ajax'] = array(
+    $form['account']['roles']['#ajax'] = [
       'event' => 'change',
       'callback' => '_password_policy_check_constraints',
       'method' => 'replace',
       'wrapper' => 'password-policy-status',
-    );
+    ];
 
     $form['#validate'][] = '_password_policy_user_profile_form_validate';
   }
@@ -106,13 +106,13 @@ function _password_policy_show_policy() {
  */
 function password_policy_check_constraints_password_confirm_process($element) {
   if (_password_policy_show_policy()) {
-    $element['pass1']['#ajax'] = array(
+    $element['pass1']['#ajax'] = [
       'event' => 'change',
       'callback' => '_password_policy_check_constraints',
       'method' => 'replace',
       'wrapper' => 'password-policy-status',
       'disable-refocus' => TRUE,
-    );
+    ];
   }
 
   return $element;
@@ -149,7 +149,7 @@ function _password_policy_user_profile_form_validate(&$form, FormStateInterface
  * @return bool|mixed
  *   Boolean if the password passes/fails or a detailed listing of failures.
  */
-function _password_policy_constraints_validate(&$form, FormStateInterface &$form_state, $generate_policy_table = FALSE, &$policies_table_rows = array()) {
+function _password_policy_constraints_validate(&$form, FormStateInterface &$form_state, $generate_policy_table = FALSE, &$policies_table_rows = []) {
   $config = \Drupal::config('user.settings');
 
   // When user email verification is enabled Drupal doesn't allow setting
@@ -166,7 +166,7 @@ function _password_policy_constraints_validate(&$form, FormStateInterface &$form
 
   $expiration = $form_state->getValue('field_password_expiration');
   if (!is_null($expiration) && $expiration['value'] === FALSE) {
-    $form_state->setValue('field_password_expiration', array('value' => 0));
+    $form_state->setValue('field_password_expiration', ['value' => 0]);
   }
 
   $roles = $form_state->getValue('roles');
@@ -181,15 +181,15 @@ function _password_policy_constraints_validate(&$form, FormStateInterface &$form
 
   // Add user doesn't automatically register authenticated, so lets add it.
   if (empty($roles)) {
-    $roles = array('authenticated' => 'authenticated');
+    $roles = ['authenticated' => 'authenticated'];
   }
 
   // Run validation.
-  $applicable_policies = array();
-  $ids = array();
+  $applicable_policies = [];
+  $ids = [];
   foreach ($roles as $role_key => $role_enabled) {
     if ($role_enabled) {
-      $role_map = array('roles.' . $role_enabled => $role_enabled);
+      $role_map = ['roles.' . $role_enabled => $role_enabled];
       $role_policies = \Drupal::entityTypeManager()->getStorage('password_policy')->loadByProperties($role_map);
       /** @var \Drupal\password_policy\Entity\PasswordPolicy $policy */
       foreach ($role_policies as $policy) {
@@ -213,8 +213,8 @@ function _password_policy_constraints_validate(&$form, FormStateInterface &$form
 
   // Process user context
   // TODO - Turn this into configuration.
-  $user_context_fields = array('mail', 'name', 'uid');
-  $user_context_values = array();
+  $user_context_fields = ['mail', 'name', 'uid'];
+  $user_context_values = [];
   foreach ($user_context_fields as $user_context_field) {
     $user_context_values[$user_context_field] = $form_state->getValue($user_context_field);
 
@@ -246,7 +246,7 @@ function _password_policy_constraints_validate(&$form, FormStateInterface &$form
           if (empty($message)) {
             $message = t('New role was added or existing password policy changed. Please update your password.');
           }
-          $status = t('Fail - @message', array('@message' => $message));
+          $status = t('Fail - @message', ['@message' => $message]);
           // Throw error to ensure form will not submit.
           if (!$failed and $form_state->getValue('pass') != '') {
             // Set storage value since you cant throw errors here.
@@ -256,11 +256,11 @@ function _password_policy_constraints_validate(&$form, FormStateInterface &$form
             $failed = TRUE;
           }
         }
-        $table_row = array(
+        $table_row = [
           'policy' => $policy->label(),
           'status' => $status,
           'constraint' => $plugin_object->getSummary(),
-        );
+        ];
         $policies_table_rows[] = $table_row;
       }
       else {
@@ -328,7 +328,7 @@ function _password_policy_check_constraints($form, $form_state) {
  */
 function _password_policy_constraints_table($form, $form_state) {
 
-  $policies_table_rows = array();
+  $policies_table_rows = [];
   _password_policy_constraints_validate($form, $form_state, TRUE, $policies_table_rows);
 
   return $policies_table_rows;
diff --git a/password_policy_characters/src/Plugin/PasswordConstraint/PasswordCharacter.php b/password_policy_characters/src/Plugin/PasswordConstraint/PasswordCharacter.php
index b35023f..8e40bba 100644
--- a/password_policy_characters/src/Plugin/PasswordConstraint/PasswordCharacter.php
+++ b/password_policy_characters/src/Plugin/PasswordConstraint/PasswordCharacter.php
@@ -96,24 +96,24 @@ class PasswordCharacter extends PasswordConstraintBase {
    * {@inheritdoc}
    */
   public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
-    $form['character_count'] = array(
+    $form['character_count'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Number of characters'),
       '#required' => TRUE,
       '#default_value' => $this->getConfiguration()['character_count'],
-    );
-    $form['character_type'] = array(
+    ];
+    $form['character_type'] = [
       '#type' => 'select',
       '#title' => $this->t('Character type'),
       '#required' => TRUE,
-      '#options' => array(
+      '#options' => [
         'uppercase' => 'Uppercase',
         'lowercase' => 'Lowercase',
         'numeric' => 'Numeric',
         'special' => 'Special Character',
-      ),
+      ],
       '#default_value' => $this->getConfiguration()['character_type'],
-    );
+    ];
     return $form;
   }
 
@@ -138,7 +138,7 @@ class PasswordCharacter extends PasswordConstraintBase {
    * {@inheritdoc}
    */
   public function getSummary() {
-    return $this->t('Password must contain @characters @character-type characters', array('@character-type' => $this->configuration['character_type'], '@characters' => $this->configuration['character_count']));
+    return $this->t('Password must contain @characters @character-type characters', ['@character-type' => $this->configuration['character_type'], '@characters' => $this->configuration['character_count']]);
   }
 
 }
diff --git a/password_policy_history/password_policy_history.install b/password_policy_history/password_policy_history.install
index 38ccb9f..ddd8ba5 100644
--- a/password_policy_history/password_policy_history.install
+++ b/password_policy_history/password_policy_history.install
@@ -18,13 +18,13 @@ function password_policy_history_install() {
   foreach ($users as $user) {
     $hashed_pass = $user->getPassword();
     if ($hashed_pass) {
-      $values = array(
+      $values = [
         $user->id(),
         $hashed_pass,
         time(),
-      );
+      ];
       $connection->insert('password_policy_history')
-        ->fields(array('uid', 'pass_hash', 'timestamp'), $values)
+        ->fields(['uid', 'pass_hash', 'timestamp'], $values)
         ->execute();
     }
   }
@@ -34,35 +34,35 @@ function password_policy_history_install() {
  * Implements hook_schema().
  */
 function password_policy_history_schema() {
-  $schema['password_policy_history'] = array(
+  $schema['password_policy_history'] = [
     'description' => 'Stores book outline information. Uniquely defines the location of each node in the book outline',
-    'fields' => array(
-      'id' => array(
+    'fields' => [
+      'id' => [
         'type' => 'serial',
         'not null' => TRUE,
         'description' => 'Primary Key: Unique history ID.',
-      ),
-      'uid' => array(
+      ],
+      'uid' => [
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => 0,
         'description' => 'The {users}.uid of the user who changed their password.',
-      ),
-      'pass_hash' => array(
+      ],
+      'pass_hash' => [
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
         'description' => 'Password hash for historical item.',
-      ),
-      'timestamp' => array(
+      ],
+      'timestamp' => [
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
         'description' => 'Unix timestamp of when password change occurred.',
-      ),
-    ),
-    'primary key' => array('id'),
-  );
+      ],
+    ],
+    'primary key' => ['id'],
+  ];
   return $schema;
 }
diff --git a/password_policy_history/password_policy_history.module b/password_policy_history/password_policy_history.module
index 884f136..4010ef7 100644
--- a/password_policy_history/password_policy_history.module
+++ b/password_policy_history/password_policy_history.module
@@ -35,13 +35,13 @@ function _password_policy_history_insert_password_hash(AccountInterface $account
   $connection = Database::getConnection();
 
   $hashed_pass = $account->getPassword();
-  $values = array(
+  $values = [
     $account->id(),
     $hashed_pass,
     time(),
-  );
+  ];
   $connection->insert('password_policy_history')
-    ->fields(array('uid', 'pass_hash', 'timestamp'), $values)
+    ->fields(['uid', 'pass_hash', 'timestamp'], $values)
     ->execute();
 }
 
diff --git a/password_policy_history/src/Plugin/PasswordConstraint/PasswordHistory.php b/password_policy_history/src/Plugin/PasswordConstraint/PasswordHistory.php
index c093cc3..56b57a2 100644
--- a/password_policy_history/src/Plugin/PasswordConstraint/PasswordHistory.php
+++ b/password_policy_history/src/Plugin/PasswordConstraint/PasswordHistory.php
@@ -71,7 +71,7 @@ class PasswordHistory extends PasswordConstraintBase implements ContainerFactory
 
     // Query for users hashes.
     $hashes = Database::getConnection()->select('password_policy_history', 'pph')
-      ->fields('pph', array('pass_hash'))
+      ->fields('pph', ['pass_hash'])
       ->condition('uid', $user_context['uid'])
       ->execute()
       ->fetchAll();
@@ -103,12 +103,12 @@ class PasswordHistory extends PasswordConstraintBase implements ContainerFactory
    * {@inheritdoc}
    */
   public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
-    $form['history_repeats'] = array(
+    $form['history_repeats'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Number of allowed repeated passwords'),
       '#description' => 'A value of 0 represents no allowed repeats',
       '#default_value' => $this->getConfiguration()['history_repeats'],
-    );
+    ];
     return $form;
   }
 
@@ -132,7 +132,7 @@ class PasswordHistory extends PasswordConstraintBase implements ContainerFactory
    * {@inheritdoc}
    */
   public function getSummary() {
-    return $this->t('Number of allowed repeated passwords: @number-repeats', array('@number-repeats' => $this->configuration['history_repeats']));
+    return $this->t('Number of allowed repeated passwords: @number-repeats', ['@number-repeats' => $this->configuration['history_repeats']]);
   }
 
 }
diff --git a/password_policy_history/src/Tests/PasswordHistoryTests.php b/password_policy_history/src/Tests/PasswordHistoryTests.php
index 3fd4f94..01cf99d 100644
--- a/password_policy_history/src/Tests/PasswordHistoryTests.php
+++ b/password_policy_history/src/Tests/PasswordHistoryTests.php
@@ -18,11 +18,11 @@ class PasswordHistoryTests extends WebTestBase {
    */
   public function testHistoryConstraint() {
     // Create user with permission to create policy.
-    $user1 = $this->drupalCreateUser(array(
+    $user1 = $this->drupalCreateUser([
       'administer site configuration',
       'administer users',
       'administer permissions',
-    ));
+    ]);
     $this->drupalLogin($user1);
 
     $user2 = $this->drupalCreateUser();
diff --git a/password_policy_length/src/Plugin/PasswordConstraint/PasswordLength.php b/password_policy_length/src/Plugin/PasswordConstraint/PasswordLength.php
index 9f4482c..7dc859f 100644
--- a/password_policy_length/src/Plugin/PasswordConstraint/PasswordLength.php
+++ b/password_policy_length/src/Plugin/PasswordConstraint/PasswordLength.php
@@ -54,17 +54,17 @@ class PasswordLength extends PasswordConstraintBase {
    * {@inheritdoc}
    */
   public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
-    $form['character_length'] = array(
+    $form['character_length'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Number of characters'),
       '#default_value' => $this->getConfiguration()['character_length'],
-    );
-    $form['character_operation'] = array(
+    ];
+    $form['character_operation'] = [
       '#type' => 'select',
       '#title' => $this->t('Operation'),
-      '#options' => array('minimum' => 'Minimum length', 'maximum' => 'Maximum length'),
+      '#options' => ['minimum' => 'Minimum length', 'maximum' => 'Maximum length'],
       '#default_value' => $this->getConfiguration()['character_operation'],
-    );
+    ];
     return $form;
   }
 
@@ -98,7 +98,7 @@ class PasswordLength extends PasswordConstraintBase {
         $operation = 'at most';
         break;
     }
-    return $this->t('Password character length of @operation @characters', array('@operation' => $operation, '@characters' => $this->configuration['character_length']));
+    return $this->t('Password character length of @operation @characters', ['@operation' => $operation, '@characters' => $this->configuration['character_length']]);
   }
 
 }
diff --git a/src/EventSubscriber/PasswordPolicyEventSubscriber.php b/src/EventSubscriber/PasswordPolicyEventSubscriber.php
index de960e7..8a11afa 100644
--- a/src/EventSubscriber/PasswordPolicyEventSubscriber.php
+++ b/src/EventSubscriber/PasswordPolicyEventSubscriber.php
@@ -28,11 +28,11 @@ class PasswordPolicyEventSubscriber implements EventSubscriberInterface {
       $route_name = \Drupal::request()->attributes->get(RouteObjectInterface::ROUTE_NAME);
 
       // system/ajax.
-      $ignored_routes = array(
+      $ignored_routes = [
         'entity.user.edit_form',
         'system.ajax',
         'user.logout',
-      );
+      ];
 
       $user_expired = FALSE;
       if ($user->get('field_password_expiration')->get(0)) {
@@ -44,7 +44,7 @@ class PasswordPolicyEventSubscriber implements EventSubscriberInterface {
 
       // TODO - Consider excluding admins here.
       if ($user_expired and !in_array($route_name, $ignored_routes)) {
-        $url = new Url('entity.user.edit_form', array('user' => $user->id()));
+        $url = new Url('entity.user.edit_form', ['user' => $user->id()]);
         $url = $url->setAbsolute(TRUE)->toString();
         $event->setResponse(new RedirectResponse($url));
         drupal_set_message('Your password has expired, please update it', 'error');
@@ -57,7 +57,7 @@ class PasswordPolicyEventSubscriber implements EventSubscriberInterface {
    */
   static public function getSubscribedEvents() {
     // TODO - Evaluate if there is a better place to add this check.
-    $events[KernelEvents::REQUEST][] = array('checkForUserPasswordExpiration');
+    $events[KernelEvents::REQUEST][] = ['checkForUserPasswordExpiration'];
     return $events;
   }
 
diff --git a/src/Form/ConstraintDelete.php b/src/Form/ConstraintDelete.php
index bfb4491..8540777 100644
--- a/src/Form/ConstraintDelete.php
+++ b/src/Form/ConstraintDelete.php
@@ -92,14 +92,14 @@ class ConstraintDelete extends ConfirmFormBase {
     $form['#title'] = $this->getQuestion($id, $cached_values);
 
     $form['#attributes']['class'][] = 'confirmation';
-    $form['description'] = array('#markup' => $this->getDescription());
-    $form[$this->getFormName()] = array('#type' => 'hidden', '#value' => 1);
+    $form['description'] = ['#markup' => $this->getDescription()];
+    $form[$this->getFormName()] = ['#type' => 'hidden', '#value' => 1];
 
     // By default, render the form using theme_confirm_form().
     if (!isset($form['#theme'])) {
       $form['#theme'] = 'confirm_form';
     }
-    $form['actions'] = array('#type' => 'actions');
+    $form['actions'] = ['#type' => 'actions'];
     $form['actions'] += $this->actions($form, $form_state);
     return $form;
   }
@@ -125,9 +125,9 @@ class ConstraintDelete extends ConfirmFormBase {
     /** @var \Drupal\password_policy\Entity\PasswordPolicy $password_policy */
     $password_policy = $cached_values['password_policy'];
     $context = $password_policy->getConstraint($id);
-    return $this->t('Are you sure you want to delete the @label constraint?', array(
+    return $this->t('Are you sure you want to delete the @label constraint?', [
       '@label' => $context['id'],
-    ));
+    ]);
   }
 
   /**
@@ -152,16 +152,16 @@ class ConstraintDelete extends ConfirmFormBase {
    *   A set of actions associated with this form.
    */
   protected function actions(array $form, FormStateInterface $form_state) {
-    return array(
-      'submit' => array(
+    return [
+      'submit' => [
         '#type' => 'submit',
         '#value' => $this->getConfirmText(),
-        '#submit' => array(
-          array($this, 'submitForm'),
-        ),
-      ),
+        '#submit' => [
+          [$this, 'submitForm'],
+        ],
+      ],
       'cancel' => ConfirmFormHelper::buildCancelLink($this, $this->getRequest()),
-    );
+    ];
   }
 
 }
diff --git a/src/Form/PasswordPolicyConstraintForm.php b/src/Form/PasswordPolicyConstraintForm.php
index c17f1ed..f137f2e 100644
--- a/src/Form/PasswordPolicyConstraintForm.php
+++ b/src/Form/PasswordPolicyConstraintForm.php
@@ -93,19 +93,19 @@ class PasswordPolicyConstraintForm extends FormBase {
       '#markup' => '<h2>Policy Constraints</h2>',
     ];
 
-    $form['items'] = array(
+    $form['items'] = [
       '#type' => 'markup',
       '#prefix' => '<div id="configured-constraints">',
       '#suffix' => '</div>',
       '#theme' => 'table',
-      '#header' => array(
+      '#header' => [
         'plugin_id' => $this->t('Plugin Id'),
         'summary' => $this->t('Summary'),
         'operations' => $this->t('Operations'),
-      ),
+      ],
       '#rows' => $this->renderRows($cached_values),
       '#empty' => $this->t('No constraints have been configured.'),
-    );
+    ];
 
     return $form;
   }
@@ -138,7 +138,7 @@ class PasswordPolicyConstraintForm extends FormBase {
     ], ['query' => [FormBuilderInterface::AJAX_FORM_REQUEST => TRUE]]);
     $content['submit']['#attached']['drupalSettings']['ajax'][$content['submit']['#id']]['url'] = $url->toString();
     $response = new AjaxResponse();
-    $response->addCommand(new OpenModalDialogCommand($this->t('Configure Required Context'), $content, array('width' => '700')));
+    $response->addCommand(new OpenModalDialogCommand($this->t('Configure Required Context'), $content, ['width' => '700']));
     return $response;
   }
 
@@ -154,7 +154,7 @@ class PasswordPolicyConstraintForm extends FormBase {
   public function renderRows($cached_values) {
     /** @var \Drupal\password_policy\Entity\PasswordPolicy $policy */
     $policy = $cached_values['password_policy'];
-    $configured_conditions = array();
+    $configured_conditions = [];
     foreach ($policy->getConstraints() as $row => $constraint) {
       /** @var \Drupal\password_policy\PasswordConstraintInterface $instance */
       $instance = $this->manager->createInstance($constraint['id'], $constraint);
@@ -162,18 +162,18 @@ class PasswordPolicyConstraintForm extends FormBase {
       $operations = $this->getOperations('entity.password_policy.constraint',
         ['machine_name' => $cached_values['id'], 'constraint_id' => $row]);
 
-      $build = array(
+      $build = [
         '#type' => 'operations',
         '#links' => $operations,
-      );
+      ];
 
-      $configured_conditions[] = array(
+      $configured_conditions[] = [
         'plugin_id' => $instance->getPluginId(),
         'summary' => $instance->getSummary(),
         'operations' => [
           'data' => $build,
         ],
-      );
+      ];
     }
     return $configured_conditions;
   }
@@ -189,37 +189,37 @@ class PasswordPolicyConstraintForm extends FormBase {
    * @return array
    *   Set of operations associated with a constraint.
    */
-  protected function getOperations($route_name_base, array $route_parameters = array()) {
+  protected function getOperations($route_name_base, array $route_parameters = []) {
     $edit_url = new Url($route_name_base . '.edit', $route_parameters);
     $route_parameters['id'] = $route_parameters['constraint_id'];
     unset($route_parameters['constraint_id']);
     $delete_url = new Url($route_name_base . '.delete', $route_parameters);
     $operations = [];
 
-    $operations['edit'] = array(
+    $operations['edit'] = [
       'title' => $this->t('Edit'),
       'url' => $edit_url,
       'weight' => 10,
-      'attributes' => array(
-        'class' => array('use-ajax'),
+      'attributes' => [
+        'class' => ['use-ajax'],
         'data-dialog-type' => 'modal',
         'data-dialog-options' => Json::encode([
           'width' => 700,
         ]),
-      ),
-    );
-    $operations['delete'] = array(
+      ],
+    ];
+    $operations['delete'] = [
       'title' => $this->t('Delete'),
       'url' => $delete_url,
       'weight' => 100,
-      'attributes' => array(
-        'class' => array('use-ajax'),
+      'attributes' => [
+        'class' => ['use-ajax'],
         'data-dialog-type' => 'modal',
         'data-dialog-options' => Json::encode([
           'width' => 700,
         ]),
-      ),
-    );
+      ],
+    ];
     return $operations;
   }
 
diff --git a/src/Form/PasswordPolicyDeleteForm.php b/src/Form/PasswordPolicyDeleteForm.php
index 61812d6..743a0d1 100644
--- a/src/Form/PasswordPolicyDeleteForm.php
+++ b/src/Form/PasswordPolicyDeleteForm.php
@@ -15,7 +15,7 @@ class PasswordPolicyDeleteForm extends EntityConfirmFormBase {
    * {@inheritdoc}
    */
   public function getQuestion() {
-    return $this->t('Are you sure you want to delete the %name policy?', array('%name' => $this->entity->label()));
+    return $this->t('Are you sure you want to delete the %name policy?', ['%name' => $this->entity->label()]);
   }
 
   /**
diff --git a/src/PasswordConstraintBase.php b/src/PasswordConstraintBase.php
index b4ea9b7..2ca45ea 100644
--- a/src/PasswordConstraintBase.php
+++ b/src/PasswordConstraintBase.php
@@ -51,16 +51,16 @@ abstract class PasswordConstraintBase extends PluginBase implements PasswordCons
    * {@inheritdoc}
    */
   public function defaultConfiguration() {
-    return array();
+    return [];
   }
 
   /**
    * {@inheritdoc}
    */
   public function getConfiguration() {
-    return array(
+    return [
       'id' => $this->getPluginId(),
-    ) + $this->configuration;
+    ] + $this->configuration;
   }
 
   /**
@@ -75,7 +75,7 @@ abstract class PasswordConstraintBase extends PluginBase implements PasswordCons
    * {@inheritdoc}
    */
   public function calculateDependencies() {
-    return array();
+    return [];
   }
 
 }
diff --git a/src/Tests/PasswordManualResetTest.php b/src/Tests/PasswordManualResetTest.php
index defb7d9..dbcd72a 100644
--- a/src/Tests/PasswordManualResetTest.php
+++ b/src/Tests/PasswordManualResetTest.php
@@ -11,33 +11,33 @@ use Drupal\simpletest\WebTestBase;
  */
 class PasswordManualResetTest extends WebTestBase {
 
-  public static $modules = array('password_policy', 'node');
+  public static $modules = ['password_policy', 'node'];
 
   /**
    * Test manual password reset.
    */
   public function testManualPasswordReset() {
     // Create user with permission to create policy.
-    $user1 = $this->drupalCreateUser(array());
+    $user1 = $this->drupalCreateUser([]);
 
     // Create new admin user.
-    $user2 = $this->drupalCreateUser(array(
+    $user2 = $this->drupalCreateUser([
       'manage password reset',
       'administer users',
       'administer permissions',
-    ));
+    ]);
     $this->drupalLogin($user2);
 
     // Create new role.
-    $rid = $this->drupalCreateRole(array());
+    $rid = $this->drupalCreateRole([]);
 
     // Update user 1 by adding role.
-    $edit = array();
+    $edit = [];
     $edit['roles[' . $rid . ']'] = $rid;
     $this->drupalPostForm("user/" . $user1->id() . "/edit", $edit, t('Save'));
 
     // Force reset users of new role.
-    $edit = array();
+    $edit = [];
     $edit['roles[' . $rid . ']'] = $rid;
     $this->drupalPostForm("admin/config/security/password-policy/reset", $edit, t('Save'));
 
@@ -51,18 +51,18 @@ class PasswordManualResetTest extends WebTestBase {
    */
   public function testExcludeMyself() {
     // Create new admin user.
-    $user1 = $this->drupalCreateUser(array(
+    $user1 = $this->drupalCreateUser([
       'manage password reset',
       'administer users',
       'administer permissions',
-    ));
+    ]);
     $this->drupalLogin($user1);
 
     // Create new role.
-    $rid = $this->drupalCreateRole(array());
+    $rid = $this->drupalCreateRole([]);
 
     // Update user 1 by adding role.
-    $edit = array();
+    $edit = [];
     $edit['roles[' . $rid . ']'] = $rid;
     $this->drupalPostForm("user/" . $user1->id() . "/edit", $edit, t('Save'));
 
diff --git a/src/Tests/PasswordPolicyInterfaceTest.php b/src/Tests/PasswordPolicyInterfaceTest.php
index 851c908..e26dc6a 100644
--- a/src/Tests/PasswordPolicyInterfaceTest.php
+++ b/src/Tests/PasswordPolicyInterfaceTest.php
@@ -11,28 +11,28 @@ use Drupal\simpletest\WebTestBase;
  */
 class PasswordPolicyInterfaceTest extends WebTestBase {
 
-  public static $modules = array(
+  public static $modules = [
     'password_policy',
     'password_policy_length',
     'password_policy_character_types',
     'node',
-  );
+  ];
 
   /**
    * Test failing password and verify it fails.
    */
   public function testOwnUserPasswords() {
     // Create user with permission to create policy.
-    $user1 = $this->drupalCreateUser(array(
+    $user1 = $this->drupalCreateUser([
       'administer site configuration',
       'administer users',
       'administer permissions',
-    ));
+    ]);
 
     $this->drupalLogin($user1);
 
     // Create role.
-    $rid = $this->drupalCreateRole(array());
+    $rid = $this->drupalCreateRole([]);
 
     // Set role for user.
     $edit = [
@@ -65,7 +65,7 @@ class PasswordPolicyInterfaceTest extends WebTestBase {
     $this->drupalPostForm(NULL, $edit, 'Finish');
 
     // Try failing password on form submit.
-    $edit = array();
+    $edit = [];
     $edit['current_pass'] = $user1->pass_raw;
     $edit['pass[pass1]'] = '111';
     $edit['pass[pass2]'] = '111';
@@ -74,7 +74,7 @@ class PasswordPolicyInterfaceTest extends WebTestBase {
     $this->assertText('The password does not satisfy the password policies');
 
     // Try passing password on form submit.
-    $edit = array();
+    $edit = [];
     $edit['current_pass'] = $user1->pass_raw;
     $edit['pass[pass1]'] = '111111';
     $edit['pass[pass2]'] = '111111';
