diff --git a/administerusersbyrole.install b/administerusersbyrole.install
index b3d9bbc..fca6766 100644
--- a/administerusersbyrole.install
+++ b/administerusersbyrole.install
@@ -1 +1,5 @@
 <?php
+
+/**
+ * @file
+ */
diff --git a/administerusersbyrole.module b/administerusersbyrole.module
index 36b8736..93f8950 100644
--- a/administerusersbyrole.module
+++ b/administerusersbyrole.module
@@ -1,5 +1,9 @@
 <?php
 
+/**
+ * @file
+ */
+
 use Drupal\administerusersbyrole\Plugin\Action\AddRoleUser;
 use Drupal\administerusersbyrole\Plugin\Action\RemoveRoleUser;
 use Drupal\Core\Url;
@@ -86,7 +90,7 @@ function administerusersbyrole_user_assign_role(UserInterface $user, AccountInte
   // Allow access if
   // 1a) The sub-admin can edit the user OR
   // 1b) The sub-admin can assign all the roles the user already has AND
-  // 2) The sub-admin can assign all the roles that are being changed
+  // 2) The sub-admin can assign all the roles that are being changed.
   $oneA = administerusersbyrole_user_access($user, 'update', $account);
   $oneB = administerusersbyrole_user_access($user, 'role-assign', $account);
   $two = \Drupal::service('administerusersbyrole.access')->access($rids, 'role-assign', $account);
@@ -112,7 +116,7 @@ function administerusersbyrole_entity_field_access($operation, FieldDefinitionIn
     return AccessResult::neutral();
   }
 
-  $fields = array('name', 'status', 'mail');
+  $fields = ['name', 'status', 'mail'];
   if ($operation == 'view') {
     array_push($fields, 'roles', 'access');
   }
@@ -163,11 +167,10 @@ function administerusersbyrole_query_administerusersbyrole_edit_access_alter(Alt
 
     if ($roles) {
       // This code was changed from D7 to workaround D8 core bug https://www.drupal.org/node/2744069.
-
       // Get a list of uids with roles that the user does not have permission
       // to edit.
       $subquery = \Drupal::database()->select('user__roles', 'ur2');
-      $subquery->fields('ur2', array('entity_id'));
+      $subquery->fields('ur2', ['entity_id']);
 
       $subquery->condition('ur2.roles_target_id', $roles, 'NOT IN');
 
diff --git a/src/AdministerusersbyrolePermissions.php b/src/AdministerusersbyrolePermissions.php
index f3018a7..b135e2a 100644
--- a/src/AdministerusersbyrolePermissions.php
+++ b/src/AdministerusersbyrolePermissions.php
@@ -11,7 +11,7 @@ use Drupal\administerusersbyrole\Services\AccessManagerInterface;
  */
 class AdministerusersbyrolePermissions implements ContainerInjectionInterface {
 
- /**
+  /**
    * The access manager.
    *
    * @var \Drupal\administerusersbyrole\Services\AccessManagerInterface
diff --git a/src/Form/SettingsForm.php b/src/Form/SettingsForm.php
index dca97e4..71380b3 100644
--- a/src/Form/SettingsForm.php
+++ b/src/Form/SettingsForm.php
@@ -5,7 +5,6 @@ namespace Drupal\administerusersbyrole\Form;
 use Drupal\Component\Utility\Html;
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Session\AccountInterface;
 use Drupal\administerusersbyrole\Services\AccessManagerInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -14,7 +13,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
  */
 class SettingsForm extends ConfigFormBase {
 
- /**
+  /**
    * The access manager.
    *
    * @var \Drupal\administerusersbyrole\Services\AccessManagerInterface
diff --git a/src/Plugin/Action/RemoveRoleUser.php b/src/Plugin/Action/RemoveRoleUser.php
index 5933aaa..f3eb5f3 100644
--- a/src/Plugin/Action/RemoveRoleUser.php
+++ b/src/Plugin/Action/RemoveRoleUser.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\administerusersbyrole\Plugin\Action;
 
-use Drupal\Core\Session\AccountInterface;
 use Drupal\user\Plugin\Action\RemoveRoleUser as RemoveRoleUserBase;
 
 /**
diff --git a/src/Routing/RouteSubscriber.php b/src/Routing/RouteSubscriber.php
index 5cafd3b..2ec928e 100644
--- a/src/Routing/RouteSubscriber.php
+++ b/src/Routing/RouteSubscriber.php
@@ -15,7 +15,6 @@ class RouteSubscriber extends RouteSubscriberBase {
    */
   public function alterRoutes(RouteCollection $collection) {
     // Provide additional access according to our permissions.
-
     if ($route = $collection->get('entity.user.collection')) {
       $perm = $route->getRequirement('_permission') . '+access users overview';
       $route->setRequirement('_permission', $perm);
diff --git a/src/Services/AccessManager.php b/src/Services/AccessManager.php
index 11cc2b5..2d56c90 100644
--- a/src/Services/AccessManager.php
+++ b/src/Services/AccessManager.php
@@ -6,7 +6,6 @@ use Drupal\Core\Access\AccessResult;
 use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\Config\ConfigFactoryInterface;
-use Drupal\user\Entity\Role;
 
 /**
  * Access Manager.
@@ -22,7 +21,10 @@ class AccessManager implements AccessManagerInterface {
    */
   protected $configFactory;
 
-  /* @var \Drupal\Core\Config\ImmutableConfig */
+  /**
+   * @var \Drupal\Core\Config\ImmutableConfig
+   */
+
   protected $config;
 
   const CONVERT_OP = [
@@ -34,7 +36,10 @@ class AccessManager implements AccessManagerInterface {
     'role-assign' => 'role-assign',
   ];
 
-  function __construct(ConfigFactoryInterface $config_factory) {
+  /**
+   *
+   */
+  public function __construct(ConfigFactoryInterface $config_factory) {
     $this->configFactory = $config_factory;
     $this->config = $config_factory->get('administerusersbyrole.settings');
   }
@@ -70,7 +75,9 @@ class AccessManager implements AccessManagerInterface {
 
     // Per role permissions.
     $role_config = $this->config->get('roles') ?: [];
-    $role_config = array_filter($role_config, function($s) { return $s == self::PERM; });
+    $role_config = array_filter($role_config, function ($s) {
+      return $s == self::PERM;
+    });
     $roles = array_intersect_key($this->managedRoles(), $role_config);
 
     foreach ($roles as $rid => $role) {
@@ -129,7 +136,9 @@ class AccessManager implements AccessManagerInterface {
    * {@inheritdoc}
    */
   public function managedRoles() {
-    $roles = array_filter(user_roles(TRUE), function($role) { return !$role->hasPermission('administer users'); });
+    $roles = array_filter(user_roles(TRUE), function ($role) {
+      return !$role->hasPermission('administer users');
+    });
     unset($roles[AccountInterface::AUTHENTICATED_ROLE]);
     return $roles;
   }
@@ -137,10 +146,12 @@ class AccessManager implements AccessManagerInterface {
   /**
    * Initial access check for an operation to test if access might be granted for some roles.
    *
-   * @param string $operation: The operation that is to be performed on the user.
+   * @param string $operation:
+   *   The operation that is to be performed on the user.
    *   Value is updated to match the canonical value used in this module.
    *
-   * @param \Drupal\Core\Session\AccountInterface $account: The account trying to access the entity.
+   * @param \Drupal\Core\Session\AccountInterface $account:
+   *   The account trying to access the entity.
    *
    * @return \Drupal\Core\Access\AccessResultInterface
    *   The access result. hook_entity_access() has detailed documentation.
diff --git a/src/Services/AccessManagerInterface.php b/src/Services/AccessManagerInterface.php
index cc79335..8caa2a7 100644
--- a/src/Services/AccessManagerInterface.php
+++ b/src/Services/AccessManagerInterface.php
@@ -3,7 +3,6 @@
 namespace Drupal\administerusersbyrole\Services;
 
 use Drupal\Core\Session\AccountInterface;
-use Drupal\Core\Config\Config;
 
 /**
  * Interface for access manager service.
diff --git a/tests/src/Functional/AdministerusersbyroleTest.php b/tests/src/Functional/AdministerusersbyroleTest.php
index ff34c4c..48ee8d0 100644
--- a/tests/src/Functional/AdministerusersbyroleTest.php
+++ b/tests/src/Functional/AdministerusersbyroleTest.php
@@ -3,20 +3,18 @@
 namespace Drupal\Tests\administerusersbyrole\Functional;
 
 use Drupal\Tests\BrowserTestBase;
-use Drupal\Component\Utility\SafeMarkup;
-use Drupal\Core\Session\AccountInterface;
 
 /**
- * Testing for administerusersbyrole module
+ * Testing for administerusersbyrole module.
  *
  * @group administerusersbyrole
  */
 class AdministerusersbyroleTest extends BrowserTestBase {
 
-  public static $modules = array('administerusersbyrole', 'user');
+  public static $modules = ['administerusersbyrole', 'user'];
 
-  protected $roles = array();
-  protected $users = array();
+  protected $roles = [];
+  protected $users = [];
 
   /**
    * The access manager.
@@ -30,207 +28,213 @@ class AdministerusersbyroleTest extends BrowserTestBase {
    */
   protected $config;
 
+  /**
+   *
+   */
   public function setUp() {
     parent::setUp();
     $this->accessManager = \Drupal::service('administerusersbyrole.access');
     $this->config = \Drupal::service('config.factory')->getEditable('administerusersbyrole.settings');
 
-    $this->createUserWithRole('noroles', array());
+    $this->createUserWithRole('noroles', []);
     $this->createRolesAndUsers('alpha', FALSE);
     $this->createRolesAndUsers('beta', TRUE);
-    $this->createUserWithRole('alphabeta', array('alpha', 'beta'));
+    $this->createUserWithRole('alphabeta', ['alpha', 'beta']);
 
-    // alphabeta_ed
-    $perms = array(
+    // alphabeta_ed.
+    $perms = [
       'access content',
       $this->accessManager->buildPermString('edit'),
       $this->accessManager->buildPermString('edit', 'alpha'),
       $this->accessManager->buildPermString('edit', 'beta'),
-    );
+    ];
     $this->drupalCreateRole($perms, 'alphabeta_ed');
     $this->config->set("roles.alphabeta_ed", 'perm')->save();
-    $this->createUserWithRole('alphabeta_ed', array('alphabeta_ed'));
+    $this->createUserWithRole('alphabeta_ed', ['alphabeta_ed']);
 
-    // all_editor
-    $perms = array(
+    // all_editor.
+    $perms = [
       'access content',
       $this->accessManager->buildPermString('edit'),
-    );
+    ];
     foreach (array_keys($this->accessManager->managedRoles()) as $roleName) {
       $perms[] = $this->accessManager->buildPermString('edit', $roleName);
     }
     $this->drupalCreateRole($perms, 'all_editor');
     $this->config->set("roles.all_editor", 'perm')->save();
-    $this->createUserWithRole('all_editor', array('all_editor'));
+    $this->createUserWithRole('all_editor', ['all_editor']);
 
-    // all_deletor
-    $perms = array(
+    // all_deletor.
+    $perms = [
       'access content',
       $this->accessManager->buildPermString('cancel'),
-    );
+    ];
     foreach (array_keys($this->accessManager->managedRoles()) as $roleName) {
       $perms[] = $this->accessManager->buildPermString('cancel', $roleName);
     }
     $this->drupalCreateRole($perms, 'all_deletor');
-    $this->createUserWithRole('all_deletor', array('all_deletor'));
+    $this->createUserWithRole('all_deletor', ['all_deletor']);
 
-    // creator
-    $perms = array(
+    // Creator.
+    $perms = [
       'access content',
       'create users',
-    );
+    ];
     $this->drupalCreateRole($perms, 'creator');
-    $this->createUserWithRole('creator', array('creator'));
+    $this->createUserWithRole('creator', ['creator']);
   }
 
+  /**
+   *
+   */
   public function testPermissions() {
-    $expectations = array(
+    $expectations = [
       // When I'm logged in as...
-      'nobody' => array(
+      'nobody' => [
         // ...I can perform these actions on this other user...
-        'noroles'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'alpha'        => array('edit' => FALSE, 'cancel' => FALSE),
-        'alpha_editor' => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta'         => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta_editor'  => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta'    => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta_ed' => array('edit' => FALSE, 'cancel' => FALSE),
-        'creator'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_editor'   => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_deletor'  => array('edit' => FALSE, 'cancel' => FALSE),
+        'noroles'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'alpha'        => ['edit' => FALSE, 'cancel' => FALSE],
+        'alpha_editor' => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta'         => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta_editor'  => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta'    => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta_ed' => ['edit' => FALSE, 'cancel' => FALSE],
+        'creator'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_editor'   => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_deletor'  => ['edit' => FALSE, 'cancel' => FALSE],
         'create users' => FALSE,
-      ),
-      'noroles' => array(
-        'noroles'      => array('edit' => TRUE,  'cancel' => FALSE),
-        'alpha'        => array('edit' => FALSE, 'cancel' => FALSE),
-        'alpha_editor' => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta'         => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta_editor'  => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta'    => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta_ed' => array('edit' => FALSE, 'cancel' => FALSE),
-        'creator'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_editor'   => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_deletor'  => array('edit' => FALSE, 'cancel' => FALSE),
+      ],
+      'noroles' => [
+        'noroles'      => ['edit' => TRUE, 'cancel' => FALSE],
+        'alpha'        => ['edit' => FALSE, 'cancel' => FALSE],
+        'alpha_editor' => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta'         => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta_editor'  => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta'    => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta_ed' => ['edit' => FALSE, 'cancel' => FALSE],
+        'creator'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_editor'   => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_deletor'  => ['edit' => FALSE, 'cancel' => FALSE],
         'create users' => FALSE,
-      ),
-      'alpha' => array(
-        'noroles'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'alpha'        => array('edit' => TRUE,  'cancel' => FALSE),
-        'alpha_editor' => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta'         => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta_editor'  => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta'    => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta_ed' => array('edit' => FALSE, 'cancel' => FALSE),
-        'creator'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_editor'   => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_deletor'  => array('edit' => FALSE, 'cancel' => FALSE),
+      ],
+      'alpha' => [
+        'noroles'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'alpha'        => ['edit' => TRUE, 'cancel' => FALSE],
+        'alpha_editor' => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta'         => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta_editor'  => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta'    => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta_ed' => ['edit' => FALSE, 'cancel' => FALSE],
+        'creator'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_editor'   => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_deletor'  => ['edit' => FALSE, 'cancel' => FALSE],
         'create users' => FALSE,
-      ),
-      'alpha_editor' => array(
-        'noroles'      => array('edit' => TRUE,  'cancel' => FALSE),
-        'alpha'        => array('edit' => TRUE,  'cancel' => FALSE),
-        'alpha_editor' => array('edit' => TRUE,  'cancel' => FALSE),
-        'beta'         => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta_editor'  => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta'    => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta_ed' => array('edit' => FALSE, 'cancel' => FALSE),
-        'creator'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_editor'   => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_deletor'  => array('edit' => FALSE, 'cancel' => FALSE),
+      ],
+      'alpha_editor' => [
+        'noroles'      => ['edit' => TRUE, 'cancel' => FALSE],
+        'alpha'        => ['edit' => TRUE, 'cancel' => FALSE],
+        'alpha_editor' => ['edit' => TRUE, 'cancel' => FALSE],
+        'beta'         => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta_editor'  => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta'    => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta_ed' => ['edit' => FALSE, 'cancel' => FALSE],
+        'creator'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_editor'   => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_deletor'  => ['edit' => FALSE, 'cancel' => FALSE],
         'create users' => FALSE,
-      ),
-      'beta' => array(
-        'noroles'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'alpha'        => array('edit' => FALSE, 'cancel' => FALSE),
-        'alpha_editor' => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta'         => array('edit' => TRUE,  'cancel' => FALSE),
-        'beta_editor'  => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta'    => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta_ed' => array('edit' => FALSE, 'cancel' => FALSE),
-        'creator'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_editor'   => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_deletor'  => array('edit' => FALSE, 'cancel' => FALSE),
+      ],
+      'beta' => [
+        'noroles'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'alpha'        => ['edit' => FALSE, 'cancel' => FALSE],
+        'alpha_editor' => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta'         => ['edit' => TRUE, 'cancel' => FALSE],
+        'beta_editor'  => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta'    => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta_ed' => ['edit' => FALSE, 'cancel' => FALSE],
+        'creator'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_editor'   => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_deletor'  => ['edit' => FALSE, 'cancel' => FALSE],
         'create users' => FALSE,
-      ),
-      'beta_editor' => array(
-        'noroles'      => array('edit' => TRUE,  'cancel' => TRUE),
-        'alpha'        => array('edit' => FALSE, 'cancel' => FALSE),
-        'alpha_editor' => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta'         => array('edit' => TRUE,  'cancel' => TRUE),
-        'beta_editor'  => array('edit' => TRUE,  'cancel' => FALSE),
-        'alphabeta'    => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta_ed' => array('edit' => FALSE, 'cancel' => FALSE),
-        'creator'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_editor'   => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_deletor'  => array('edit' => FALSE, 'cancel' => FALSE),
+      ],
+      'beta_editor' => [
+        'noroles'      => ['edit' => TRUE, 'cancel' => TRUE],
+        'alpha'        => ['edit' => FALSE, 'cancel' => FALSE],
+        'alpha_editor' => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta'         => ['edit' => TRUE, 'cancel' => TRUE],
+        'beta_editor'  => ['edit' => TRUE, 'cancel' => FALSE],
+        'alphabeta'    => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta_ed' => ['edit' => FALSE, 'cancel' => FALSE],
+        'creator'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_editor'   => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_deletor'  => ['edit' => FALSE, 'cancel' => FALSE],
         'create users' => FALSE,
-      ),
-      'alphabeta' => array(
-        'noroles'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'alpha'        => array('edit' => FALSE, 'cancel' => FALSE),
-        'alpha_editor' => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta'         => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta_editor'  => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta'    => array('edit' => TRUE,  'cancel' => FALSE),
-        'alphabeta_ed' => array('edit' => FALSE, 'cancel' => FALSE),
-        'creator'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_editor'   => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_deletor'  => array('edit' => FALSE, 'cancel' => FALSE),
+      ],
+      'alphabeta' => [
+        'noroles'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'alpha'        => ['edit' => FALSE, 'cancel' => FALSE],
+        'alpha_editor' => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta'         => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta_editor'  => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta'    => ['edit' => TRUE, 'cancel' => FALSE],
+        'alphabeta_ed' => ['edit' => FALSE, 'cancel' => FALSE],
+        'creator'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_editor'   => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_deletor'  => ['edit' => FALSE, 'cancel' => FALSE],
         'create users' => FALSE,
-      ),
-      'alphabeta_ed' => array(
-        'noroles'      => array('edit' => TRUE, 'cancel' => FALSE),
-        'alpha'        => array('edit' => TRUE,  'cancel' => FALSE),
-        'alpha_editor' => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta'         => array('edit' => TRUE,  'cancel' => FALSE),
-        'beta_editor'  => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta'    => array('edit' => TRUE,  'cancel' => FALSE),
-        'alphabeta_ed' => array('edit' => TRUE,  'cancel' => FALSE),
-        'creator'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_editor'   => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_deletor'  => array('edit' => FALSE, 'cancel' => FALSE),
+      ],
+      'alphabeta_ed' => [
+        'noroles'      => ['edit' => TRUE, 'cancel' => FALSE],
+        'alpha'        => ['edit' => TRUE, 'cancel' => FALSE],
+        'alpha_editor' => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta'         => ['edit' => TRUE, 'cancel' => FALSE],
+        'beta_editor'  => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta'    => ['edit' => TRUE, 'cancel' => FALSE],
+        'alphabeta_ed' => ['edit' => TRUE, 'cancel' => FALSE],
+        'creator'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_editor'   => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_deletor'  => ['edit' => FALSE, 'cancel' => FALSE],
         'create users' => FALSE,
-      ),
-      'all_editor' => array(
-        'noroles'      => array('edit' => TRUE,  'cancel' => FALSE),
-        'alpha'        => array('edit' => TRUE,  'cancel' => FALSE),
-        'alpha_editor' => array('edit' => TRUE,  'cancel' => FALSE),
-        'beta'         => array('edit' => TRUE,  'cancel' => FALSE),
-        'beta_editor'  => array('edit' => TRUE,  'cancel' => FALSE),
-        'alphabeta'    => array('edit' => TRUE,  'cancel' => FALSE),
-        'alphabeta_ed' => array('edit' => TRUE,  'cancel' => FALSE),
-        'creator'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_editor'   => array('edit' => TRUE,  'cancel' => FALSE),
-        'all_deletor'  => array('edit' => FALSE, 'cancel' => FALSE),
+      ],
+      'all_editor' => [
+        'noroles'      => ['edit' => TRUE, 'cancel' => FALSE],
+        'alpha'        => ['edit' => TRUE, 'cancel' => FALSE],
+        'alpha_editor' => ['edit' => TRUE, 'cancel' => FALSE],
+        'beta'         => ['edit' => TRUE, 'cancel' => FALSE],
+        'beta_editor'  => ['edit' => TRUE, 'cancel' => FALSE],
+        'alphabeta'    => ['edit' => TRUE, 'cancel' => FALSE],
+        'alphabeta_ed' => ['edit' => TRUE, 'cancel' => FALSE],
+        'creator'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_editor'   => ['edit' => TRUE, 'cancel' => FALSE],
+        'all_deletor'  => ['edit' => FALSE, 'cancel' => FALSE],
         'create users' => FALSE,
-      ),
-      'all_deletor' => array(
-        'noroles'      => array('edit' => FALSE, 'cancel' => TRUE),
-        'alpha'        => array('edit' => FALSE, 'cancel' => TRUE),
-        'alpha_editor' => array('edit' => FALSE, 'cancel' => TRUE),
-        'beta'         => array('edit' => FALSE, 'cancel' => TRUE),
-        'beta_editor'  => array('edit' => FALSE, 'cancel' => TRUE),
-        'alphabeta'    => array('edit' => FALSE, 'cancel' => TRUE),
-        'alphabeta_ed' => array('edit' => FALSE, 'cancel' => TRUE),
-        'creator'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_editor'   => array('edit' => FALSE, 'cancel' => TRUE),
-        'all_deletor'  => array('edit' => TRUE,  'cancel' => FALSE),
+      ],
+      'all_deletor' => [
+        'noroles'      => ['edit' => FALSE, 'cancel' => TRUE],
+        'alpha'        => ['edit' => FALSE, 'cancel' => TRUE],
+        'alpha_editor' => ['edit' => FALSE, 'cancel' => TRUE],
+        'beta'         => ['edit' => FALSE, 'cancel' => TRUE],
+        'beta_editor'  => ['edit' => FALSE, 'cancel' => TRUE],
+        'alphabeta'    => ['edit' => FALSE, 'cancel' => TRUE],
+        'alphabeta_ed' => ['edit' => FALSE, 'cancel' => TRUE],
+        'creator'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_editor'   => ['edit' => FALSE, 'cancel' => TRUE],
+        'all_deletor'  => ['edit' => TRUE, 'cancel' => FALSE],
         'create users' => FALSE,
-      ),
-      'creator' => array(
-        'noroles'      => array('edit' => FALSE, 'cancel' => FALSE),
-        'alpha'        => array('edit' => FALSE, 'cancel' => FALSE),
-        'alpha_editor' => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta'         => array('edit' => FALSE, 'cancel' => FALSE),
-        'beta_editor'  => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta'    => array('edit' => FALSE, 'cancel' => FALSE),
-        'alphabeta_ed' => array('edit' => FALSE, 'cancel' => FALSE),
-        'creator'      => array('edit' => TRUE,  'cancel' => FALSE),
-        'all_editor'   => array('edit' => FALSE, 'cancel' => FALSE),
-        'all_deletor'  => array('edit' => FALSE, 'cancel' => FALSE),
+      ],
+      'creator' => [
+        'noroles'      => ['edit' => FALSE, 'cancel' => FALSE],
+        'alpha'        => ['edit' => FALSE, 'cancel' => FALSE],
+        'alpha_editor' => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta'         => ['edit' => FALSE, 'cancel' => FALSE],
+        'beta_editor'  => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta'    => ['edit' => FALSE, 'cancel' => FALSE],
+        'alphabeta_ed' => ['edit' => FALSE, 'cancel' => FALSE],
+        'creator'      => ['edit' => TRUE, 'cancel' => FALSE],
+        'all_editor'   => ['edit' => FALSE, 'cancel' => FALSE],
+        'all_deletor'  => ['edit' => FALSE, 'cancel' => FALSE],
         'create users' => TRUE,
-      ),
-    );
+      ],
+    ];
 
     $assert = $this->assertSession();
     foreach ($expectations as $loginUsername => $editUsernames) {
@@ -255,7 +259,7 @@ class AdministerusersbyroleTest extends BrowserTestBase {
           $editUid = $this->users[$editUsername]->id();
           foreach ($operations as $operation => $expectedResult) {
             $this->drupalGet("user/$editUid/$operation");
-            //print("$loginUsername perform $operation on $editUsername<br>");
+            // print("$loginUsername perform $operation on $editUsername<br>");.
             if ($expectedResult) {
               if ($operation === 'edit') {
                 $assert->responseContains("All emails from the system will be sent to this address.");
@@ -279,6 +283,9 @@ class AdministerusersbyroleTest extends BrowserTestBase {
     }
   }
 
+  /**
+   *
+   */
   protected function createUserWithRole($userName, $roleNames) {
     $user = $this->drupalCreateUser([], $userName);
     $this->assertTrue($user, "Unable to create user $userName.");
@@ -289,25 +296,28 @@ class AdministerusersbyroleTest extends BrowserTestBase {
     $this->users[$userName] = $user;
   }
 
+  /**
+   *
+   */
   protected function createRolesAndUsers($roleName, $allowEditorToCancel) {
-    // create basic role
-    $this->drupalCreateRole(array('access content'), $roleName);
+    // Create basic role.
+    $this->drupalCreateRole(['access content'], $roleName);
     $this->config->set("roles.$roleName", 'perm')->save();
-    $this->createUserWithRole($roleName, array($roleName));
+    $this->createUserWithRole($roleName, [$roleName]);
 
-    // create role to edit above role and also anyone with no custom roles.
-    $perms = array(
+    // Create role to edit above role and also anyone with no custom roles.
+    $perms = [
       'access content',
       $this->accessManager->buildPermString('edit'),
       $this->accessManager->buildPermString('edit', $roleName),
-    );
+    ];
     if ($allowEditorToCancel) {
       $perms[] = $this->accessManager->buildPermString('cancel');
       $perms[] = $this->accessManager->buildPermString('cancel', $roleName);
     }
     $this->drupalCreateRole($perms, "{$roleName}_editor");
     $this->config->set("roles.{$roleName}_editor", 'perm')->save();
-    $this->createUserWithRole("{$roleName}_editor", array("{$roleName}_editor"));
+    $this->createUserWithRole("{$roleName}_editor", ["{$roleName}_editor"]);
   }
 
 }
