diff --git a/config/schema/student_uic.schema.yml b/config/schema/student_uic.schema.yml
index ee8911c..e83283a 100644
--- a/config/schema/student_uic.schema.yml
+++ b/config/schema/student_uic.schema.yml
@@ -32,4 +32,4 @@ field.widget.settings.student_uic:
   mapping:
     value:
       type: string
-      label: Student UIC
\ No newline at end of file
+      label: Student UIC
diff --git a/src/Plugin/Field/FieldFormatter/StudentUICDefaultFormatter.php b/src/Plugin/Field/FieldFormatter/StudentUICDefaultFormatter.php
index 5e76cd6..bf7a959 100644
--- a/src/Plugin/Field/FieldFormatter/StudentUICDefaultFormatter.php
+++ b/src/Plugin/Field/FieldFormatter/StudentUICDefaultFormatter.php
@@ -20,7 +20,18 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
  */
 class StudentUICDefaultFormatter extends FormatterBase {
 
+  /**
+   * The user.
+   *
+   * @var \Drupal\Core\Session\AccountInterface
+   */
   protected $user;
+
+  /**
+   * Entity type manager.
+   *
+   * @var Drupal\Core\Entity\EntityTypeManagerInterface
+   */
   protected $entityTypeManager;
 
   /**
@@ -38,17 +49,17 @@ class StudentUICDefaultFormatter extends FormatterBase {
    *   The formatter label display setting.
    * @param string $view_mode
    *   The view mode.
-   * @param array $third_party_settings
-   *   Any third party settings.
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
    *   The the entity type manager.
+   * @param array $third_party_settings
+   *   Any third party settings.
    */
   public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, EntityTypeManagerInterface $entity_type_manager, array $third_party_settings) {
     parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
 
     $this->user = $entity_type_manager->getStorage('user')->load(\Drupal::currentUser()->id());
   }
-  
+
   /**
    * {@inheritdoc}
    */
@@ -72,7 +83,7 @@ class StudentUICDefaultFormatter extends FormatterBase {
   public static function defaultSettings() {
     return [
       'obfuscate' => FALSE,
-      'obfuscation_level' => 1
+      'obfuscation_level' => 1,
     ] + parent::defaultSettings();
   }
 
@@ -86,7 +97,7 @@ class StudentUICDefaultFormatter extends FormatterBase {
       '#type' => 'checkbox',
       '#title' => $this->t('Obfuscate Student UIC'),
       '#default_value' => $settings['obfuscate'],
-      '#description' => $this->t('Users with the permission \'view full student uic\' will be exempt from this setting.<p>Obfuscated characters will be replaced with an asterisk (*).</p>'),
+      '#description' => $this->t("Users with the permission 'view full student uic' will be exempt from this setting.<p>Obfuscated characters will be replaced with an asterisk (*).</p>"),
     ];
 
     $element['obfuscation_level'] = [
@@ -95,13 +106,13 @@ class StudentUICDefaultFormatter extends FormatterBase {
       '#default_value' => $settings['obfuscation_level'],
       '#states' => [
         'required' => [
-          ':input[name="fields['. $this->fieldDefinition->getName() .'][settings_edit_form][settings][obfuscate]"]' => ['checked' => TRUE],
+          ':input[name="fields[' . $this->fieldDefinition->getName() . '][settings_edit_form][settings][obfuscate]"]' => ['checked' => TRUE],
         ],
         'visible' => [
-          ':input[name="fields['. $this->fieldDefinition->getName() .'][settings_edit_form][settings][obfuscate]"]' => ['checked' => TRUE],
+          ':input[name="fields[' . $this->fieldDefinition->getName() . '][settings_edit_form][settings][obfuscate]"]' => ['checked' => TRUE],
         ],
       ],
-      '#description' => 'How many characters to obfuscate.',
+      '#description' => $this->t('How many characters to obfuscate.'),
     ];
 
     return $element;
@@ -122,7 +133,7 @@ class StudentUICDefaultFormatter extends FormatterBase {
   /**
    * {@inheritdoc}
    */
-  public function viewElements(FieldItemListInterface $items, $langcode) { 
+  public function viewElements(FieldItemListInterface $items, $langcode) {
     $element = [];
     $settings = $this->getSettings();
 
@@ -147,7 +158,7 @@ class StudentUICDefaultFormatter extends FormatterBase {
                 $student_uic .= '*';
               }
               else {
-                $student_uic .= substr($item->student_uic,$x,1);
+                $student_uic .= substr($item->student_uic, $x, 1);
               }
 
               $x++;
diff --git a/src/Plugin/Field/FieldType/StudentUICItem.php b/src/Plugin/Field/FieldType/StudentUICItem.php
index fb79dec..f9be60f 100644
--- a/src/Plugin/Field/FieldType/StudentUICItem.php
+++ b/src/Plugin/Field/FieldType/StudentUICItem.php
@@ -2,8 +2,6 @@
 
 namespace Drupal\student_uic\Plugin\Field\FieldType;
 
-use Drupal\Component\Utility\Random;
-use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Field\FieldItemBase;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\Core\Form\FormStateInterface;
@@ -78,7 +76,7 @@ class StudentUICItem extends FieldItemBase {
       '#type' => 'textfield',
       '#title' => $this->t('Regular Expression Pattern'),
       '#description' => $this->t('Standard PHP regular expression patterns accepted. Regular expression will overwrite the above options.'),
-      '#default_value' => in_array('regex_pattern',$settings['pattern']) ? $settings['pattern']['regex_pattern'] : NULL,
+      '#default_value' => in_array('regex_pattern', $settings['pattern']) ? $settings['pattern']['regex_pattern'] : NULL,
       '#states' => [
         'visible' => [
           ':input[name="settings[pattern][regex]"]' => ['checked' => TRUE],
@@ -93,9 +91,9 @@ class StudentUICItem extends FieldItemBase {
       '#type' => 'checkboxes',
       '#title' => $this->t('Validation Options'),
       '#options' => [
-        'numeric' => 'Numbers allowed',
-        'alpha' => 'Alphabetical characters allowed',
-        'special' => 'Special characters allowed',
+        'numeric' => $this->t('Numbers allowed'),
+        'alpha' => $this->t('Alphabetical characters allowed'),
+        'special' => $this->t('Special characters allowed'),
       ],
       '#states' => [
         'visible' => [
@@ -124,7 +122,7 @@ class StudentUICItem extends FieldItemBase {
       '#weight' => 2,
     ];
 
-    foreach ($element['pattern']['options']['#options'] as $k => $v) {
+    foreach ($element['pattern']['options']['#options'] as $v) {
       if ($settings['pattern']['options'] == 0) {
         unset($settings['pattern']['options']);
       }
@@ -171,4 +169,5 @@ class StudentUICItem extends FieldItemBase {
       ],
     ];
   }
+
 }
diff --git a/src/Plugin/Field/FieldWidget/StudentUICWidget.php b/src/Plugin/Field/FieldWidget/StudentUICWidget.php
index cf87b1b..71efbf5 100644
--- a/src/Plugin/Field/FieldWidget/StudentUICWidget.php
+++ b/src/Plugin/Field/FieldWidget/StudentUICWidget.php
@@ -5,7 +5,6 @@ namespace Drupal\student_uic\Plugin\Field\FieldWidget;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\Core\Field\WidgetBase;
 use Drupal\Core\Form\FormStateInterface;
-use Symfony\Component\Validator\ConstraintViolationInterface;
 
 /**
  * Defines the 'student_uic' field widget.
@@ -30,7 +29,7 @@ class StudentUICWidget extends WidgetBase {
       '#default_value' => isset($items[$delta]->student_uic) ? $items[$delta]->student_uic : NULL,
       '#size' => 20,
       '#element_validate' => [
-        [$this,'validate']
+        [$this, 'validate'],
       ],
     ];
 
@@ -42,34 +41,46 @@ class StudentUICWidget extends WidgetBase {
     return $element;
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public function validate($element, FormStateInterface $form_state) {
     $settings = $this->fieldDefinition->getFieldStorageDefinition()->getSettings();
 
-
     $element_value = $form_state->getValue($this->fieldDefinition->getName()) != NULL ? $form_state->getValue($this->fieldDefinition->getName())[0]['student_uic'] : NULL;
 
     if (!empty($element_value)) {
       if (!empty($settings['minimum_length'])) {
         if (strlen($element_value) < $settings['minimum_length']) {
-          $form_state->setError($element,$this->t('Minimum character length for %field_name must be %length.',['%field_name' => $this->fieldDefinition->getLabel(),'%length' => $settings['minimum_length']]));
+          $form_state->setError($element,
+          $this->t('Minimum character length for %field_name must be %length.',
+          [
+            '%field_name' => $this->fieldDefinition->getLabel(),
+            '%length' => $settings['minimum_length'],
+          ]));
         }
       }
       if ($settings['pattern']['regex'] == 0) {
         if ($settings['pattern']['options']['numeric'] == 0) {
           if (ctype_digit($element_value)) {
-            $form_state->setError($element,$this->t('The field %field_name cannot contain numerical characters.',['%field_name' => $this->fieldDefinition->getLabel()]));
+            $form_state->setError($element, $this->t('The field %field_name cannot contain numerical characters.', ['%field_name' => $this->fieldDefinition->getLabel()]));
           }
         }
 
         if ($settings['pattern']['options']['alpha'] == 0) {
           if (preg_match('/\pL/', $element_value)) {
-            $form_state->setError($element,$this->t('The field %field_name cannot contain alphabetical characters.',['%field_name' => $this->fieldDefinition->getLabel()]));
+            $form_state->setError($element, $this->t('The field %field_name cannot contain alphabetical characters.', ['%field_name' => $this->fieldDefinition->getLabel()]));
           }
         }
       }
       else {
-        if (!preg_match($settings['pattern']['regex_pattern'],$element_value)) {
-          $form_state->setError($element,$this->t('The provided value for %field_name does not match the expected pattern: %pregmatch',['%field_name' => $this->fieldDefinition->getLabel(), '%pregmatch' => $settings['pattern']['regex_pattern']]));
+        if (!preg_match($settings['pattern']['regex_pattern'], $element_value)) {
+          $form_state->setError($element,
+          $this->t('The provided value for %field_name does not match the expected pattern: %pregmatch',
+          [
+            '%field_name' => $this->fieldDefinition->getLabel(),
+            '%pregmatch' => $settings['pattern']['regex_pattern'],
+          ]));
         }
       }
     }
diff --git a/student_uic.info.yml b/student_uic.info.yml
index 0e3ea90..5b938f8 100644
--- a/student_uic.info.yml
+++ b/student_uic.info.yml
@@ -4,4 +4,4 @@ description: Provides a field for providing a student UIC.
 package: Field types
 core_version_requirement: ^9 || ^10
 dependencies: 
-  - field
+  - drupal:field
diff --git a/student_uic.libraries.yml b/student_uic.libraries.yml
index 91d0047..d144ce3 100644
--- a/student_uic.libraries.yml
+++ b/student_uic.libraries.yml
@@ -1,4 +1,4 @@
 student_uic:
   css:
     component:
-      css/student-uic-widget.css: {}
\ No newline at end of file
+      css/student-uic-widget.css: {}
