From d8fab34b8025e1ac00472d1f3375ebb9bd1c12a1 Mon Sep 17 00:00:00 2001
From: Kevin Paxman <kpaxman@uwaterloo.ca>
Date: Mon, 14 Nov 2022 16:38:48 -0500
Subject: [PATCH] Code standards

---
 src/Form/UwAddUsersForm.php | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/Form/UwAddUsersForm.php b/src/Form/UwAddUsersForm.php
index c6357088..4e0ae1b1 100644
--- a/src/Form/UwAddUsersForm.php
+++ b/src/Form/UwAddUsersForm.php
@@ -4,7 +4,6 @@ namespace Drupal\uw_cfg_common\Form;
 
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\uw_cfg_common\UwPermissions\UwPermissions;
 
 /**
  * Form class for the content access form.
@@ -25,8 +24,8 @@ class UwAddUsersForm extends FormBase {
 
     // The list of users this form.
     $form['users'] = [
-      '#title' => 'WatIAM user ID(s) (maximum 8 characters per ID)',
-      '#description' => 'Enter a single WatIAM user ID, or multiple WatIAM user IDs, one per line.<br>You can use <a href="https://idm.uwaterloo.ca/search/" target="_blank">authenticated WatIAM search</a> if you don\'t know their user ID (will open a new window).',
+      '#title' => t('WatIAM user ID(s) (maximum 8 characters per ID)'),
+      '#description' => t('Enter a single WatIAM user ID, or multiple WatIAM user IDs, one per line.<br>You can use <a href="https://idm.uwaterloo.ca/search/" target="_blank">authenticated WatIAM search</a> if you don\'t know their user ID (will open a new window).'),
       '#type' => 'textarea',
       '#required' => TRUE,
     ];
@@ -52,9 +51,9 @@ class UwAddUsersForm extends FormBase {
 
     // Step through each of the submitted users to create if needed/possible,
     // or show a message if not.
-    foreach ($submitted_users as $row_name => $submitted_user) {
+    foreach ($submitted_users as $user) {
       $this->messenger()->addStatus($this->t('Normally something would happen here...'));
-    } 
+    }
     // Set the message that the users have been created.
     $this->messenger()->addStatus($this->t('Finished creating users.'));
   }
-- 
GitLab