diff --git a/abjs.install b/abjs.install
index 5c35165..52f2802 100644
--- a/abjs.install
+++ b/abjs.install
@@ -15,238 +15,237 @@
 function abjs_install() {
 }
 
-
 /**
  * Implements hook_schema().
  */
 function abjs_schema() {
-  $schema = array();
-  $schema['abjs_test'] = array(
+  $schema = [];
+  $schema['abjs_test'] = [
     'description' => 'The table for a/b tests.',
-    'fields' => array(
-      'tid' => array(
+    'fields' => [
+      'tid' => [
         'description' => 'The primary identifier for a test.',
         'type' => 'serial',
         'unsigned' => TRUE,
         'not null' => TRUE,
-      ),
-      'name' => array(
+      ],
+      'name' => [
         'description' => 'The name of this test.',
         'type' => 'varchar',
         'length' => 64,
         'not null' => TRUE,
         'default' => '',
-      ),
-      'active' => array(
+      ],
+      'active' => [
         'description' => 'Boolean indicating whether the test is active or not.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'created' => array(
+      ],
+      'created' => [
         'description' => 'The Unix timestamp when the test was created.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'created_by' => array(
+      ],
+      'created_by' => [
         'description' => 'The uid of the user who created the test.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'changed' => array(
+      ],
+      'changed' => [
         'description' => 'The Unix timestamp when the test was most recently saved.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'changed_by' => array(
+      ],
+      'changed_by' => [
         'description' => 'The uid of the user who last modified the test.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-    ),
-    'primary key' => array('tid'),
-  );
+      ],
+    ],
+    'primary key' => ['tid'],
+  ];
 
-  $schema['abjs_experience'] = array(
+  $schema['abjs_experience'] = [
     'description' => 'The table for a/b test experiences.',
-    'fields' => array(
-      'eid' => array(
+    'fields' => [
+      'eid' => [
         'description' => 'The primary identifier for an experience.',
         'type' => 'serial',
         'unsigned' => TRUE,
         'not null' => TRUE,
-      ),
-      'name' => array(
+      ],
+      'name' => [
         'description' => 'The name of this experience.',
         'type' => 'varchar',
         'length' => 64,
         'not null' => TRUE,
         'default' => '',
-      ),
-      'script' => array(
+      ],
+      'script' => [
         'description' => 'The JavaScript for this experience.',
         'type' => 'text',
         'not null' => TRUE,
         'size' => 'big',
-      ),
-      'created' => array(
+      ],
+      'created' => [
         'description' => 'The Unix timestamp when the experience was created.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'created_by' => array(
+      ],
+      'created_by' => [
         'description' => 'The uid of the user who created the experience.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'changed' => array(
+      ],
+      'changed' => [
         'description' => 'The Unix timestamp when the experience was most recently saved.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'changed_by' => array(
+      ],
+      'changed_by' => [
         'description' => 'The uid of the user who last modified the experience.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-    ),
-    'primary key' => array('eid'),
-  );
+      ],
+    ],
+    'primary key' => ['eid'],
+  ];
 
-  $schema['abjs_condition'] = array(
+  $schema['abjs_condition'] = [
     'description' => 'The table for a/b test conditions.',
-    'fields' => array(
-      'cid' => array(
+    'fields' => [
+      'cid' => [
         'description' => 'The primary identifier for a condition.',
         'type' => 'serial',
         'unsigned' => TRUE,
         'not null' => TRUE,
-      ),
-      'name' => array(
+      ],
+      'name' => [
         'description' => 'The name of this condition.',
         'type' => 'varchar',
         'length' => 64,
         'not null' => TRUE,
         'default' => '',
-      ),
-      'script' => array(
+      ],
+      'script' => [
         'description' => 'The JavaScript for this condition.',
         'type' => 'text',
         'not null' => TRUE,
         'size' => 'big',
-      ),
-      'created' => array(
+      ],
+      'created' => [
         'description' => 'The Unix timestamp when the condition was created.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'created_by' => array(
+      ],
+      'created_by' => [
         'description' => 'The uid of the user who created the condition.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'changed' => array(
+      ],
+      'changed' => [
         'description' => 'The Unix timestamp when the condition was most recently saved.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'changed_by' => array(
+      ],
+      'changed_by' => [
         'description' => 'The uid of the user who last modified the condition.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-    ),
-    'primary key' => array('cid'),
-  );
+      ],
+    ],
+    'primary key' => ['cid'],
+  ];
 
-  $schema['abjs_test_experience'] = array(
+  $schema['abjs_test_experience'] = [
     'description' => 'The table associating a/b tests with experiences.',
-    'fields' => array(
-      'teid' => array(
+    'fields' => [
+      'teid' => [
         'description' => 'The primary identifier for the test_experience table.',
         'type' => 'serial',
         'unsigned' => TRUE,
         'not null' => TRUE,
-      ),
-      'tid' => array(
+      ],
+      'tid' => [
         'description' => 'The test.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'eid' => array(
+      ],
+      'eid' => [
         'description' => 'The experience.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'fraction' => array(
+      ],
+      'fraction' => [
         'description' => 'The fraction of this test assigned to this experience.',
         'type' => 'varchar',
         'length' => 12,
         'not null' => TRUE,
         'default' => '',
-      ),
-    ),
-    'foreign keys' => array(
-      'test' => array(
+      ],
+    ],
+    'foreign keys' => [
+      'test' => [
         'table' => 'test',
-        'columns' => array('tid' => 'tid'),
-      ),
-      'experience' => array(
+        'columns' => ['tid' => 'tid'],
+      ],
+      'experience' => [
         'table' => 'experience',
-        'columns' => array('eid' => 'eid'),
-      ),
-    ),
-    'primary key' => array('teid'),
-  );
+        'columns' => ['eid' => 'eid'],
+      ],
+    ],
+    'primary key' => ['teid'],
+  ];
 
-  $schema['abjs_test_condition'] = array(
+  $schema['abjs_test_condition'] = [
     'description' => 'The table associating a/b tests with conditions.',
-    'fields' => array(
-      'tcid' => array(
+    'fields' => [
+      'tcid' => [
         'description' => 'The primary identifier for the test_condition table.',
         'type' => 'serial',
         'unsigned' => TRUE,
         'not null' => TRUE,
-      ),
-      'tid' => array(
+      ],
+      'tid' => [
         'description' => 'The test.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-      'cid' => array(
+      ],
+      'cid' => [
         'description' => 'The condition.',
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-      ),
-    ),
-    'foreign keys' => array(
-      'test' => array(
+      ],
+    ],
+    'foreign keys' => [
+      'test' => [
         'table' => 'test',
-        'columns' => array('tid' => 'tid'),
-      ),
-      'condition' => array(
+        'columns' => ['tid' => 'tid'],
+      ],
+      'condition' => [
         'table' => 'condition',
-        'columns' => array('cid' => 'cid'),
-      ),
-    ),
-    'primary key' => array('tcid'),
-  );
+        'columns' => ['cid' => 'cid'],
+      ],
+    ],
+    'primary key' => ['tcid'],
+  ];
   return $schema;
 }
 
diff --git a/abjs.module b/abjs.module
index 37e3cdc..3495958 100644
--- a/abjs.module
+++ b/abjs.module
@@ -5,16 +5,18 @@
  * Write test JavaScript.
  */
 
+use Drupal\Core\Render\Markup;
+use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Database\Database;
 
 /**
  * Implements hook_help().
  */
-function abjs_help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match) {
+function abjs_help($route_name, RouteMatchInterface $route_match) {
   switch ($route_name) {
     // Main module help for the block module.
     case 'help.page.abjs':
-      return '<h3>' . t('See the <a href="@documentation">Module Documentation</a> for a detailed description of the module and instructions.', array('@documentation' => 'https://www.drupal.org/node/2716391')) . '</h3>';
+      return '<h3>' . t('See the <a href="@documentation">Module Documentation</a> for a detailed description of the module and instructions.', ['@documentation' => 'https://www.drupal.org/node/2716391']) . '</h3>';
   }
 }
 
@@ -42,7 +44,7 @@ function abjs_page_attachments(array &$page) {
   $page['#attached']['html_head'][] = [
     [
       '#tag' => 'script',
-      '#value' => \Drupal\Core\Render\Markup::create($abjs_script),
+      '#value' => Markup::create($abjs_script),
       '#weight' => -100,
     ],
     'abjs_script',
@@ -95,20 +97,19 @@ function abjs_generate_js(array $tests) {
     return '';
   }
 
-  $tests_js = array();
+  $tests_js = [];
 
   for ($i = 0; $i < count($tests); $i++) {
     // Set name of this test to the tid.
-    $tests_js[$i] = array(
+    $tests_js[$i] = [
       'name' => "t_{$tests[$i]->tid}",
-      'conditions' => array(),
-      'experiences' => array(),
-    );
+      'conditions' => [],
+      'experiences' => [],
+    ];
 
     // Get all conditions associated with this test,and make functions for the
     // scripts.
-
-    $conditions = Database::getConnection()->query("SELECT tc.tid, tc.cid, c.script FROM {abjs_condition} AS c INNER JOIN {abjs_test_condition} AS tc ON c.cid = tc.cid WHERE tc.tid = :tid", array(':tid' => $tests[$i]->tid))->fetchAll();
+    $conditions = Database::getConnection()->query("SELECT tc.tid, tc.cid, c.script FROM {abjs_condition} AS c INNER JOIN {abjs_test_condition} AS tc ON c.cid = tc.cid WHERE tc.tid = :tid", [':tid' => $tests[$i]->tid])->fetchAll();
     for ($j = 0; $j < count($conditions); $j++) {
       $tests_js[$i]['conditions'][$j] = $conditions[$j]->script;
     }
@@ -116,13 +117,13 @@ function abjs_generate_js(array $tests) {
     // Get all experiences associated with this test and their fractions, make
     // a name for the value of the test cookie, and make functions for the
     // scripts.
-    $experiences = Database::getConnection()->query("SELECT te.tid, te.eid, e.script, te.fraction FROM {abjs_experience} AS e INNER JOIN {abjs_test_experience} AS te ON e.eid = te.eid WHERE te.tid = :tid", array(':tid' => $tests[$i]->tid))->fetchAll();
+    $experiences = Database::getConnection()->query("SELECT te.tid, te.eid, e.script, te.fraction FROM {abjs_experience} AS e INNER JOIN {abjs_test_experience} AS te ON e.eid = te.eid WHERE te.tid = :tid", [':tid' => $tests[$i]->tid])->fetchAll();
     for ($j = 0; $j < count($experiences); $j++) {
-      $tests_js[$i]['experiences'][$j] = array(
+      $tests_js[$i]['experiences'][$j] = [
         'name' => "e_{$experiences[$j]->eid}",
         'fraction' => $experiences[$j]->fraction,
         'script' => $experiences[$j]->script,
-      );
+      ];
     }
   }
 
@@ -137,14 +138,13 @@ function abjs_generate_js(array $tests) {
   $cookie_domain = !empty($cookie_domain_var) ? '; domain=' . $cookie_domain_var : '';
   $cookie_secure = !empty($cookie_secure_var) ? '; secure' : '';
 
-
-  $js_vars = array(
+  $js_vars = [
     'tests' => $tests_js,
     'cookiePrefix' => $cookie_prefix,
     'cookieDomain' => $cookie_domain,
     'cookieLifetime' => $cookie_lifetime,
     'cookieSecure' => $cookie_secure,
-  );
+  ];
   $json = json_encode($js_vars);
 
   // abjs-common.js is the core functionality of the A/B testing javascript
diff --git a/config/install/abjs.settings.yml b/config/install/abjs.settings.yml
index 6f5893f..246b45e 100644
--- a/config/install/abjs.settings.yml
+++ b/config/install/abjs.settings.yml
@@ -3,4 +3,4 @@ cookie:
   lifetime: '30'
   domain: ''
   secure: 0
-ace: 1
\ No newline at end of file
+ace: 1
diff --git a/src/Controller/AbjsDefaultController.php b/src/Controller/AbjsDefaultController.php
index cd26847..b5a80a0 100644
--- a/src/Controller/AbjsDefaultController.php
+++ b/src/Controller/AbjsDefaultController.php
@@ -6,6 +6,7 @@ use Drupal\Core\Controller\ControllerBase;
 use Drupal\user\Entity\User;
 use Drupal\Core\Database\Database;
 use Drupal\Core\Url;
+
 /**
  * Default controller for the abjs module.
  */
@@ -43,7 +44,7 @@ class AbjsDefaultController extends ControllerBase {
       $test_link = [
         '#title' => $test->name,
         '#type' => 'link',
-        '#url' => Url::fromRoute('abjs.test_edit_form', ['tid' => $test->tid])
+        '#url' => Url::fromRoute('abjs.test_edit_form', ['tid' => $test->tid]),
       ];
 
       $condition_list = [];
@@ -54,7 +55,7 @@ class AbjsDefaultController extends ControllerBase {
           $condition_link = [
             '#title' => $condition->name . ' (c_' . $condition->cid . ')',
             '#type' => 'link',
-            '#url' => Url::fromRoute('abjs.condition_edit_form', ['cid' => $condition->cid])
+            '#url' => Url::fromRoute('abjs.condition_edit_form', ['cid' => $condition->cid]),
           ];
           $condition_list[] = $renderer->render($condition_link);
         }
@@ -72,7 +73,7 @@ class AbjsDefaultController extends ControllerBase {
           $experience_link = [
             '#title' => '[' . $experience->fraction . '] ' . $experience->name . ' (e_' . $experience->eid . ')',
             '#type' => 'link',
-            '#url' => Url::fromRoute('abjs.experience_edit_form', ['eid' => $experience->eid])
+            '#url' => Url::fromRoute('abjs.experience_edit_form', ['eid' => $experience->eid]),
           ];
           $experience_list[] = $renderer->render($experience_link);
         }
@@ -83,24 +84,24 @@ class AbjsDefaultController extends ControllerBase {
       }
       $user_created = User::load($test->created_by);
       $user_changed = User::load($test->changed_by);
-      $rows[] = array(
-             't_' . $test->tid,
-             $renderer->render($test_link),
-             $active_array[$test->active],
-             $renderer->render($condition_output),
-             $renderer->render($experience_output),
-             $date_Formatter->format($test->created),
-             $user_created->toLink(),
-             $date_Formatter->format($test->changed),
-             $user_changed->toLink(),
-           );
+      $rows[] = [
+        't_' . $test->tid,
+        $renderer->render($test_link),
+        $active_array[$test->active],
+        $renderer->render($condition_output),
+        $renderer->render($experience_output),
+        $date_Formatter->format($test->created),
+        $user_created->toLink(),
+        $date_Formatter->format($test->changed),
+        $user_changed->toLink(),
+      ];
 
     }
 
     $output['add'] = [
       '#title' => t('Add new test'),
       '#type' => 'link',
-      '#url' => Url::fromRoute('abjs.test_add_form')
+      '#url' => Url::fromRoute('abjs.test_add_form'),
     ];
     $output['table'] = [
       '#type' => 'table',
@@ -136,24 +137,24 @@ class AbjsDefaultController extends ControllerBase {
       $condition_link = [
         '#title' => $condition->name,
         '#type' => 'link',
-        '#url' => Url::fromRoute('abjs.condition_edit_form', ['cid' => $condition->cid])
+        '#url' => Url::fromRoute('abjs.condition_edit_form', ['cid' => $condition->cid]),
       ];
       $user_created = User::load($condition->created_by);
       $user_changed = User::load($condition->changed_by);
 
       $rows[] = [
-           'c_' . $condition->cid,
-           $renderer->render($condition_link),
-           $date_Formatter->format($condition->created),
-           $user_created->toLink(),
-           $date_Formatter->format($condition->changed),
-           $user_changed->toLink(),
+        'c_' . $condition->cid,
+        $renderer->render($condition_link),
+        $date_Formatter->format($condition->created),
+        $user_created->toLink(),
+        $date_Formatter->format($condition->changed),
+        $user_changed->toLink(),
       ];
     }
     $output['add'] = [
       '#title' => t('Add new condition'),
       '#type' => 'link',
-      '#url' => Url::fromRoute('abjs.condition_add_form')
+      '#url' => Url::fromRoute('abjs.condition_add_form'),
     ];
     $output['table'] = [
       '#type' => 'table',
@@ -190,24 +191,24 @@ class AbjsDefaultController extends ControllerBase {
       $experience_link = [
         '#title' => $experience->name,
         '#type' => 'link',
-        '#url' => Url::fromRoute('abjs.experience_edit_form', ['eid' => $experience->eid])
+        '#url' => Url::fromRoute('abjs.experience_edit_form', ['eid' => $experience->eid]),
       ];
       $user_created = User::load($experience->created_by);
       $user_changed = User::load($experience->changed_by);
 
       $rows[] = [
-           'e_' . $experience->eid,
-           $renderer->render($experience_link),
-           $date_Formatter->format($experience->created),
-           $user_created->toLink(),
-           $date_Formatter->format($experience->changed),
-           $user_changed->toLink(),
+        'e_' . $experience->eid,
+        $renderer->render($experience_link),
+        $date_Formatter->format($experience->created),
+        $user_created->toLink(),
+        $date_Formatter->format($experience->changed),
+        $user_changed->toLink(),
       ];
     }
     $output['add'] = [
       '#title' => t('Add new experience'),
       '#type' => 'link',
-      '#url' => Url::fromRoute('abjs.experience_add_form')
+      '#url' => Url::fromRoute('abjs.experience_add_form'),
     ];
     $output['table'] = [
       '#type' => 'table',
diff --git a/src/Form/AbjsConditionDeleteConfirmForm.php b/src/Form/AbjsConditionDeleteConfirmForm.php
index d3725b2..88e4ac3 100644
--- a/src/Form/AbjsConditionDeleteConfirmForm.php
+++ b/src/Form/AbjsConditionDeleteConfirmForm.php
@@ -6,6 +6,9 @@ use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Url;
 
+/**
+ *
+ */
 class AbjsConditionDeleteConfirmForm extends ConfirmFormBase {
   /**
    * The ID of the item to delete.
@@ -25,14 +28,14 @@ class AbjsConditionDeleteConfirmForm extends ConfirmFormBase {
    * {@inheritdoc}
    */
   public function getQuestion() {
-    return t('Do you want to delete condition %id?', array('%id' => $this->id));
+    return t('Do you want to delete condition %id?', ['%id' => $this->id]);
   }
 
   /**
    * {@inheritdoc}
    */
   public function getCancelUrl() {
-      return new Url('abjs.condition_admin');
+    return new Url('abjs.condition_admin');
   }
 
   /**
diff --git a/src/Form/AbjsConditionForm.php b/src/Form/AbjsConditionForm.php
index 4f9d426..75441ce 100644
--- a/src/Form/AbjsConditionForm.php
+++ b/src/Form/AbjsConditionForm.php
@@ -5,6 +5,9 @@ namespace Drupal\abjs\Form;
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormStateInterface;
 
+/**
+ *
+ */
 class AbjsConditionForm extends FormBase {
 
   /**
@@ -14,12 +17,15 @@ class AbjsConditionForm extends FormBase {
     return 'abjs_condition';
   }
 
+  /**
+   *
+   */
   public function buildForm(array $form, FormStateInterface $form_state, $cid = NULL) {
-    $form = array();
+    $form = [];
     $condition_name_default = "";
     $condition_script_default = "";
     if (!empty($cid)) {
-      $condition_result = db_query('SELECT name, script FROM {abjs_condition} WHERE cid = :cid', array(':cid' => $cid));
+      $condition_result = db_query('SELECT name, script FROM {abjs_condition} WHERE cid = :cid', [':cid' => $cid]);
       $condition = $condition_result->fetchObject();
       if (empty($condition)) {
         drupal_set_message(t('The requested condition does not exist.'), 'error');
@@ -27,47 +33,47 @@ class AbjsConditionForm extends FormBase {
       }
       $condition_name_default = $condition->name;
       $condition_script_default = $condition->script;
-      $form['cid'] = array('#type' => 'value', '#value' => $cid);
+      $form['cid'] = ['#type' => 'value', '#value' => $cid];
     }
 
-    $form['name'] = array(
+    $form['name'] = [
       '#type' => 'textfield',
       '#title' => t('Condition Name'),
       '#default_value' => $condition_name_default,
       '#size' => 30,
       '#maxlength' => 50,
       '#required' => TRUE,
-    );
+    ];
 
-    $form['script'] = array(
+    $form['script'] = [
       '#type' => 'textarea',
       '#title' => t('Condition Script'),
       '#default_value' => $condition_script_default,
       '#description' => t('Any valid javascript with a return statement at the end, returning true or false. Read the documentation for examples'),
       '#rows' => 3,
       '#required' => TRUE,
-    );
-    $form['actions'] = array('#type' => 'actions');
-    $form['actions']['save'] = array(
+    ];
+    $form['actions'] = ['#type' => 'actions'];
+    $form['actions']['save'] = [
       '#type' => 'submit',
       '#value' => t('Save'),
       '#weight' => 5,
-      '#submit' => array('::saveCondition'),
-    );
-    $form['actions']['cancel'] = array(
+      '#submit' => ['::saveCondition'],
+    ];
+    $form['actions']['cancel'] = [
       '#type' => 'submit',
       '#value' => t('Cancel'),
       '#weight' => 10,
-      '#submit' => array('::cancelCondition'),
-      '#limit_validation_errors' => array(),
-    );
+      '#submit' => ['::cancelCondition'],
+      '#limit_validation_errors' => [],
+    ];
     if (!empty($cid)) {
-      $form['actions']['delete'] = array(
+      $form['actions']['delete'] = [
         '#type' => 'submit',
         '#value' => t('Delete'),
         '#weight' => 15,
-        '#submit' => array('::deleteCondition'),
-      );
+        '#submit' => ['::deleteCondition'],
+      ];
     }
 
     // Add ace code editor for syntax highlighting on the script field.
@@ -82,17 +88,20 @@ class AbjsConditionForm extends FormBase {
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {}
 
-  public function saveCondition(array &$form, FormStateInterface $form_state){
+  /**
+   *
+   */
+  public function saveCondition(array &$form, FormStateInterface $form_state) {
     $user = \Drupal::currentUser();
     if ($form_state->hasValue('cid')) {
       // This is a modified condition, so use update.
       db_update('abjs_condition')
-        ->fields(array(
+        ->fields([
           'name' => $form_state->getValue('name'),
           'script' => $form_state->getValue('script'),
           'changed' => REQUEST_TIME,
           'changed_by' => $user->id(),
-        ))
+        ])
         ->condition('cid', $form_state->getValue('cid'), '=')
         ->execute();
       drupal_set_message(t("Successfully updated condition"));
@@ -101,26 +110,32 @@ class AbjsConditionForm extends FormBase {
     else {
       // This is a new condition, so use insert.
       db_insert('abjs_condition')
-        ->fields(array(
+        ->fields([
           'name' => $form_state->getValue('name'),
           'script' => $form_state->getValue('script'),
           'created' => REQUEST_TIME,
           'created_by' => $user->id(),
           'changed' => REQUEST_TIME,
           'changed_by' => $user->id(),
-        ))->execute();
+        ])->execute();
       drupal_set_message(t("Successfully saved new condition"));
 
     }
     $form_state->setRedirect('abjs.condition_admin');
   }
 
-  public function cancelCondition(array &$form, FormStateInterface $form_state){
+  /**
+   *
+   */
+  public function cancelCondition(array &$form, FormStateInterface $form_state) {
     $form_state->setRedirect('abjs.condition_admin');
   }
 
-  public function deleteCondition(array &$form, FormStateInterface $form_state){
-    $form_state->setRedirect('abjs.condition_delete_confirm_form', array('cid' => $form_state->getValue('cid')));
+  /**
+   *
+   */
+  public function deleteCondition(array &$form, FormStateInterface $form_state) {
+    $form_state->setRedirect('abjs.condition_delete_confirm_form', ['cid' => $form_state->getValue('cid')]);
   }
 
 }
diff --git a/src/Form/AbjsExperienceDeleteConfirmForm.php b/src/Form/AbjsExperienceDeleteConfirmForm.php
index 1780476..15b2485 100644
--- a/src/Form/AbjsExperienceDeleteConfirmForm.php
+++ b/src/Form/AbjsExperienceDeleteConfirmForm.php
@@ -6,6 +6,9 @@ use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Url;
 
+/**
+ *
+ */
 class AbjsExperienceDeleteConfirmForm extends ConfirmFormBase {
   /**
    * The ID of the item to delete.
@@ -25,14 +28,14 @@ class AbjsExperienceDeleteConfirmForm extends ConfirmFormBase {
    * {@inheritdoc}
    */
   public function getQuestion() {
-    return t('Do you want to delete experience %id?', array('%id' => $this->id));
+    return t('Do you want to delete experience %id?', ['%id' => $this->id]);
   }
 
   /**
    * {@inheritdoc}
    */
   public function getCancelUrl() {
-      return new Url('abjs.experience_admin');
+    return new Url('abjs.experience_admin');
   }
 
   /**
diff --git a/src/Form/AbjsExperienceForm.php b/src/Form/AbjsExperienceForm.php
index c34bb6e..b2b33d2 100644
--- a/src/Form/AbjsExperienceForm.php
+++ b/src/Form/AbjsExperienceForm.php
@@ -5,6 +5,9 @@ namespace Drupal\abjs\Form;
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormStateInterface;
 
+/**
+ *
+ */
 class AbjsExperienceForm extends FormBase {
 
   /**
@@ -14,12 +17,15 @@ class AbjsExperienceForm extends FormBase {
     return 'abjs_experience';
   }
 
+  /**
+   *
+   */
   public function buildForm(array $form, FormStateInterface $form_state, $eid = NULL) {
-    $form = array();
+    $form = [];
     $experience_name_default = "";
     $experience_script_default = "";
     if (!empty($eid)) {
-      $experience_result = db_query('SELECT name, script FROM {abjs_experience} WHERE eid = :eid', array(':eid' => $eid));
+      $experience_result = db_query('SELECT name, script FROM {abjs_experience} WHERE eid = :eid', [':eid' => $eid]);
       $experience = $experience_result->fetchObject();
       if (empty($experience)) {
         drupal_set_message(t('The requested experience does not exist.'), 'error');
@@ -27,47 +33,47 @@ class AbjsExperienceForm extends FormBase {
       }
       $experience_name_default = $experience->name;
       $experience_script_default = $experience->script;
-      $form['eid'] = array('#type' => 'value', '#value' => $eid);
+      $form['eid'] = ['#type' => 'value', '#value' => $eid];
     }
 
-    $form['name'] = array(
+    $form['name'] = [
       '#type' => 'textfield',
       '#title' => t('Experience Name'),
       '#default_value' => $experience_name_default,
       '#size' => 30,
       '#maxlength' => 50,
       '#required' => TRUE,
-    );
+    ];
 
-    $form['script'] = array(
+    $form['script'] = [
       '#type' => 'textarea',
       '#title' => t('Experience Script'),
       '#default_value' => $experience_script_default,
       '#description' => t('Any valid javascript to load in head. Leave empty for a Control. Read the documentation for more examples.'),
       '#rows' => 3,
-    );
+    ];
 
-    $form['actions'] = array('#type' => 'actions');
-    $form['actions']['save'] = array(
+    $form['actions'] = ['#type' => 'actions'];
+    $form['actions']['save'] = [
       '#type' => 'submit',
       '#value' => t('Save'),
       '#weight' => 5,
-      '#submit' => array('::saveExperience'),
-    );
-    $form['actions']['cancel'] = array(
+      '#submit' => ['::saveExperience'],
+    ];
+    $form['actions']['cancel'] = [
       '#type' => 'submit',
       '#value' => t('Cancel'),
       '#weight' => 10,
-      '#submit' => array('::cancelExperience'),
-      '#limit_validation_errors' => array(),
-    );
+      '#submit' => ['::cancelExperience'],
+      '#limit_validation_errors' => [],
+    ];
     if (!empty($eid)) {
-      $form['actions']['delete'] = array(
+      $form['actions']['delete'] = [
         '#type' => 'submit',
         '#value' => t('Delete'),
         '#weight' => 15,
-        '#submit' => array('::deleteExperience'),
-      );
+        '#submit' => ['::deleteExperience'],
+      ];
     }
 
     // Add ace code editor for syntax highlighting on the script field.
@@ -82,17 +88,20 @@ class AbjsExperienceForm extends FormBase {
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {}
 
-  public function saveExperience(array &$form, FormStateInterface $form_state){
+  /**
+   *
+   */
+  public function saveExperience(array &$form, FormStateInterface $form_state) {
     $user = \Drupal::currentUser();
     if ($form_state->hasValue('eid')) {
       // This is a modified experience, so use update.
       db_update('abjs_experience')
-        ->fields(array(
+        ->fields([
           'name' => $form_state->getValue('name'),
           'script' => $form_state->getValue('script'),
           'changed' => REQUEST_TIME,
           'changed_by' => $user->id(),
-        ))
+        ])
         ->condition('eid', $form_state->getValue('eid'), '=')
         ->execute();
       drupal_set_message(t("Successfully updated experience"));
@@ -101,26 +110,32 @@ class AbjsExperienceForm extends FormBase {
     else {
       // This is a new experience, so use insert.
       db_insert('abjs_experience')
-        ->fields(array(
+        ->fields([
           'name' => $form_state->getValue('name'),
           'script' => $form_state->getValue('script'),
           'created' => REQUEST_TIME,
           'created_by' => $user->id(),
           'changed' => REQUEST_TIME,
           'changed_by' => $user->id(),
-        ))->execute();
+        ])->execute();
       drupal_set_message(t("Successfully saved new experience"));
 
     }
     $form_state->setRedirect('abjs.experience_admin');
   }
 
-  public function cancelExperience(array &$form, FormStateInterface $form_state){
+  /**
+   *
+   */
+  public function cancelExperience(array &$form, FormStateInterface $form_state) {
     $form_state->setRedirect('abjs.experience_admin');
   }
 
-  public function deleteExperience(array &$form, FormStateInterface $form_state){
-    $form_state->setRedirect('abjs.experience_delete_confirm_form', array('eid' => $form_state->getValue('eid')));
+  /**
+   *
+   */
+  public function deleteExperience(array &$form, FormStateInterface $form_state) {
+    $form_state->setRedirect('abjs.experience_delete_confirm_form', ['eid' => $form_state->getValue('eid')]);
   }
 
 }
diff --git a/src/Form/AbjsSettingsAdmin.php b/src/Form/AbjsSettingsAdmin.php
index 8a04935..652f72d 100644
--- a/src/Form/AbjsSettingsAdmin.php
+++ b/src/Form/AbjsSettingsAdmin.php
@@ -5,6 +5,9 @@ namespace Drupal\abjs\Form;
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
 
+/**
+ *
+ */
 class AbjsSettingsAdmin extends ConfigFormBase {
 
   /**
@@ -21,6 +24,9 @@ class AbjsSettingsAdmin extends ConfigFormBase {
     return ['abjs.settings'];
   }
 
+  /**
+   *
+   */
   public function buildForm(array $form, FormStateInterface $form_state) {
     $config = $this->config('abjs.settings');
     // Each applicable test will have one cookie. The cookie prefix will prefix
diff --git a/src/Form/AbjsTestDeleteConfirmForm.php b/src/Form/AbjsTestDeleteConfirmForm.php
index 4bc9286..06cec01 100644
--- a/src/Form/AbjsTestDeleteConfirmForm.php
+++ b/src/Form/AbjsTestDeleteConfirmForm.php
@@ -6,6 +6,9 @@ use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Url;
 
+/**
+ *
+ */
 class AbjsTestDeleteConfirmForm extends ConfirmFormBase {
   /**
    * The ID of the item to delete.
@@ -25,14 +28,14 @@ class AbjsTestDeleteConfirmForm extends ConfirmFormBase {
    * {@inheritdoc}
    */
   public function getQuestion() {
-    return t('Do you want to delete test %id?', array('%id' => $this->id));
+    return t('Do you want to delete test %id?', ['%id' => $this->id]);
   }
 
   /**
    * {@inheritdoc}
    */
   public function getCancelUrl() {
-      return new Url('abjs.test_admin');
+    return new Url('abjs.test_admin');
   }
 
   /**
diff --git a/src/Form/AbjsTestForm.php b/src/Form/AbjsTestForm.php
index 6c06b16..a15a998 100644
--- a/src/Form/AbjsTestForm.php
+++ b/src/Form/AbjsTestForm.php
@@ -5,6 +5,9 @@ namespace Drupal\abjs\Form;
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormStateInterface;
 
+/**
+ *
+ */
 class AbjsTestForm extends FormBase {
 
   /**
@@ -14,13 +17,16 @@ class AbjsTestForm extends FormBase {
     return 'abjs_test';
   }
 
+  /**
+   *
+   */
   public function buildForm(array $form, FormStateInterface $form_state, $tid = NULL) {
-    $form = array();
+    $form = [];
     $test_name_default = "";
     $test_active_default = 0;
     if (!empty($tid)) {
       // Retrieve the test to prefill the edit form.
-      $test_result = db_query('SELECT name, active FROM {abjs_test} WHERE tid = :tid', array(':tid' => $tid));
+      $test_result = db_query('SELECT name, active FROM {abjs_test} WHERE tid = :tid', [':tid' => $tid]);
       $test = $test_result->fetchObject();
       if (empty($test)) {
         drupal_set_message(t('The requested test does not exist.'), 'error');
@@ -28,37 +34,37 @@ class AbjsTestForm extends FormBase {
       }
       $test_name_default = $test->name;
       $test_active_default = $test->active;
-      $form['tid'] = array('#type' => 'value', '#value' => $tid);
+      $form['tid'] = ['#type' => 'value', '#value' => $tid];
     }
     // Because we have many fields with the same values, we have to set
     // #tree to be able to access them.
     $form['#tree'] = TRUE;
-    $form['name'] = array(
+    $form['name'] = [
       '#type' => 'textfield',
       '#title' => t('Test Name'),
       '#default_value' => $test_name_default,
       '#size' => 30,
       '#maxlength' => 50,
       '#required' => TRUE,
-    );
+    ];
 
     // Make select list of conditions.
     $conditions = db_query("SELECT cid, name FROM {abjs_condition} ORDER BY cid ASC, created DESC");
-    $options_array = array(0 => t('Select Condition'));
+    $options_array = [0 => t('Select Condition')];
     foreach ($conditions as $condition) {
       $options_array[$condition->cid] = $condition->name . ' (c_' . $condition->cid . ')';
     }
 
     // Group conditions together, and allow for adding and removing conditions
     // via AJAX incide this fieldset.
-    $form['conditions_fieldset'] = array(
+    $form['conditions_fieldset'] = [
       '#type' => 'fieldset',
       '#title' => t('Conditions'),
       // Set up the wrapper so that AJAX will be able to replace the fieldset.
       '#prefix' => '<div id="conditions-fieldset-wrapper">',
       '#suffix' => '</div>',
       '#description' => t('Select Conditions for which the test will apply. All conditions must must be satisfied for the test to apply'),
-    );
+    ];
 
     $existing_conditions_count = 0;
     if (!$form_state->has('num_conditions')) {
@@ -66,7 +72,7 @@ class AbjsTestForm extends FormBase {
       // form, query the number for edit form).
       $form_state->set('num_conditions', 1);
       if (!empty($tid)) {
-        $existing_conditions = db_query("SELECT cid FROM {abjs_test_condition} WHERE tid = :tid", array(':tid' => $tid))->fetchAll();
+        $existing_conditions = db_query("SELECT cid FROM {abjs_test_condition} WHERE tid = :tid", [':tid' => $tid])->fetchAll();
         if (!empty($existing_conditions)) {
           $existing_conditions_count = count($existing_conditions);
           $form_state->set('num_conditions', $existing_conditions_count);
@@ -76,80 +82,80 @@ class AbjsTestForm extends FormBase {
 
     // Prefill all the condition select fields that exist.
     for ($i = 0; $i < $existing_conditions_count; $i++) {
-      $form['conditions_fieldset']['conditions'][$i] = array(
+      $form['conditions_fieldset']['conditions'][$i] = [
         '#type' => 'select',
         '#title' => t('Select Condition'),
         '#options' => $options_array,
         '#default_value' => $existing_conditions[$i]->cid,
         '#required' => TRUE,
-      );
+      ];
     }
 
     // Add number of sesgment fields determined by use of Ajax Add and
     // remove buttons.
     for ($i = $existing_conditions_count; $i < $form_state->get('num_conditions'); $i++) {
-      $form['conditions_fieldset']['conditions'][$i] = array(
+      $form['conditions_fieldset']['conditions'][$i] = [
         '#type' => 'select',
         '#title' => t('Select Condition'),
         '#options' => $options_array,
         '#default_value' => 0,
         '#required' => TRUE,
-      );
+      ];
     }
 
     // Ajax add button.
-    $form['conditions_fieldset']['add_condition'] = array(
+    $form['conditions_fieldset']['add_condition'] = [
       '#type' => 'submit',
       '#value' => t('Add'),
       '#name' => 'add-condition',
-      '#submit' => array('::abjsAjaxAddCondition'),
-      '#ajax' => array(
+      '#submit' => ['::abjsAjaxAddCondition'],
+      '#ajax' => [
         'callback' => '::abjsAjaxConditionsCallback',
         'wrapper' => 'conditions-fieldset-wrapper',
-      ),
-      '#limit_validation_errors' => array(),
-    );
+      ],
+      '#limit_validation_errors' => [],
+    ];
 
     // Ajax Remove button.
     if ($form_state->get('num_conditions') > 1) {
-      $form['conditions_fieldset']['remove_condition'] = array(
+      $form['conditions_fieldset']['remove_condition'] = [
         '#type' => 'submit',
         '#value' => t('Remove'),
         '#name' => 'remove-condition',
-        '#submit' => array('::abjsAjaxRemoveCondition'),
-        '#ajax' => array(
+        '#submit' => ['::abjsAjaxRemoveCondition'],
+        '#ajax' => [
           'callback' => '::abjsAjaxConditionsCallback',
           'wrapper' => 'conditions-fieldset-wrapper',
-        ),
-        '#limit_validation_errors' => array(),
-      );
+        ],
+        '#limit_validation_errors' => [],
+      ];
     }
 
     // Now do the same for experiences.
     // Make select list of experiences.
     $experiences = db_query("SELECT eid, name FROM {abjs_experience} ORDER BY changed DESC, created DESC");
-    $options_array = array(0 => t('Select Experience'));
+    $options_array = [0 => t('Select Experience')];
     foreach ($experiences as $experience) {
       $options_array[$experience->eid] = $experience->name . ' (e_' . $experience->eid . ')';
     }
 
     // Group experiences together, and allow for adding and removing experiences
     // via AJAX incide this fieldset.
-    $form['experiences_fieldset'] = array(
+    $form['experiences_fieldset'] = [
       '#type' => 'fieldset',
       '#title' => t('Experiences'),
       // Set up the wrapper so that AJAX will be able to replace the fieldset.
       '#prefix' => '<div id="experiences-fieldset-wrapper">',
       '#suffix' => '</div>',
       '#description' => t('Select one or more Experiences for the test, and assign fractions to each Experience (e.g. 1/2, 1/3, 0, 1, 0.5, .95, etc...). You cannot use the same Experience ID twice in the same test, so you must duplicate an Experience to use it twice.'),
-    );
+    ];
     $existing_experiences_count = 0;
     if (!$form_state->has('num_experiences')) {
       // On initial load, get the number of experience select fields (1 for add
       // form, query the number for edit form).
       $form_state->set('num_experiences', 1);
       if (!empty($tid)) {
-        $existing_experiences = db_query("SELECT eid, fraction FROM {abjs_test_experience} WHERE tid = :tid", array(':tid' => $tid))->fetchAll();
+        $existing_experiences = db_query("SELECT eid, fraction FROM {abjs_test_experience} WHERE tid = :tid", [':tid' => $tid])->fetchAll();
         if (!empty($existing_experiences)) {
           $existing_experiences_count = count($existing_experiences);
           $form_state->set('num_experiences', $existing_experiences_count);
@@ -160,113 +166,112 @@ class AbjsTestForm extends FormBase {
     // Prefill all the experience select fields that exist, including fractions
     // for each experience.
     for ($i = 0; $i < $existing_experiences_count; $i++) {
-      $form['experiences_fieldset']['experiences'][$i]['experience'] = array(
+      $form['experiences_fieldset']['experiences'][$i]['experience'] = [
         '#type' => 'select',
-        '#title' => t('Experience %i', array('%i' => $i + 1)),
+        '#title' => t('Experience %i', ['%i' => $i + 1]),
         '#options' => $options_array,
         '#default_value' => $existing_experiences[$i]->eid,
         '#required' => TRUE,
-      );
-      $form['experiences_fieldset']['experiences'][$i]['fraction'] = array(
+      ];
+      $form['experiences_fieldset']['experiences'][$i]['fraction'] = [
         '#type' => 'textfield',
-        '#title' => t('Experience %i Fraction', array('%i' => $i + 1)),
+        '#title' => t('Experience %i Fraction', ['%i' => $i + 1]),
         '#default_value' => $existing_experiences[$i]->fraction,
         '#size' => 5,
         '#maxlength' => 10,
         '#required' => TRUE,
-      );
+      ];
     }
 
     // Add number of experience fields determined by use of Ajax Add and remove
     // buttons.
     for ($i = $existing_experiences_count; $i < $form_state->get('num_experiences'); $i++) {
-      $form['experiences_fieldset']['experiences'][$i]['experience'] = array(
+      $form['experiences_fieldset']['experiences'][$i]['experience'] = [
         '#type' => 'select',
-        '#title' => t('Experience %i', array('%i' => $i + 1)),
+        '#title' => t('Experience %i', ['%i' => $i + 1]),
         '#options' => $options_array,
         '#default_value' => 0,
         '#required' => TRUE,
-      );
-      $form['experiences_fieldset']['experiences'][$i]['fraction'] = array(
+      ];
+      $form['experiences_fieldset']['experiences'][$i]['fraction'] = [
         '#type' => 'textfield',
-        '#title' => t('Experience %i Fraction', array('%i' => $i + 1)),
+        '#title' => t('Experience %i Fraction', ['%i' => $i + 1]),
         '#default_value' => '',
         '#size' => 5,
         '#maxlength' => 10,
         '#required' => TRUE,
-      );
+      ];
     }
 
     // Ajax add button.
-    $form['experiences_fieldset']['add_experience'] = array(
+    $form['experiences_fieldset']['add_experience'] = [
       '#type' => 'submit',
       '#value' => t('Add'),
       '#name' => 'add-experience',
-      '#submit' => array('::abjsAjaxAddExperience'),
-      '#ajax' => array(
+      '#submit' => ['::abjsAjaxAddExperience'],
+      '#ajax' => [
         'callback' => '::abjsAjaxExperiencesCallback',
         'wrapper' => 'experiences-fieldset-wrapper',
-      ),
-      '#limit_validation_errors' => array(),
-    );
+      ],
+      '#limit_validation_errors' => [],
+    ];
 
     // Ajax Remove button.
     if ($form_state->get('num_experiences') > 1) {
-      $form['experiences_fieldset']['remove_experience'] = array(
+      $form['experiences_fieldset']['remove_experience'] = [
         '#type' => 'submit',
         '#value' => t('Remove'),
         '#name' => 'remove-experience',
-        '#submit' => array('::abjsAjaxRemoveExperience'),
-        '#ajax' => array(
+        '#submit' => ['::abjsAjaxRemoveExperience'],
+        '#ajax' => [
           'callback' => '::abjsAjaxExperiencesCallback',
           'wrapper' => 'experiences-fieldset-wrapper',
-        ),
-        '#limit_validation_errors' => array(),
-      );
+        ],
+        '#limit_validation_errors' => [],
+      ];
     }
 
     // Add selector for activating/deactivating test.
-    $form['active'] = array(
+    $form['active'] = [
       '#type' => 'select',
       '#title' => t('Status'),
-      '#options' => array(
+      '#options' => [
         0 => t('Inactive'),
         1 => t('Active'),
-      ),
+      ],
       '#default_value' => $test_active_default,
-    );
+    ];
 
     // Save test.
-    $form['actions']['save'] = array(
+    $form['actions']['save'] = [
       '#type' => 'submit',
       '#value' => t('Save'),
       '#weight' => 5,
-      '#validate' => array('::validateTest'),
-      '#submit' => array('::saveTest'),
-    );
+      '#validate' => ['::validateTest'],
+      '#submit' => ['::saveTest'],
+    ];
 
     // Cancel test and return to admin tests page.
-    $form['actions']['cancel'] = array(
+    $form['actions']['cancel'] = [
       '#type' => 'submit',
       '#value' => t('Cancel'),
       '#weight' => 10,
-      '#submit' => array('::cancelTest'),
-      '#limit_validation_errors' => array(),
-    );
+      '#submit' => ['::cancelTest'],
+      '#limit_validation_errors' => [],
+    ];
 
     // Delete test.
     if (!empty($tid)) {
-      $form['actions']['delete'] = array(
+      $form['actions']['delete'] = [
         '#type' => 'submit',
         '#value' => t('Delete'),
         '#weight' => 15,
-        '#submit' => array('::deleteTest'),
-      );
+        '#submit' => ['::deleteTest'],
+      ];
     }
     return $form;
   }
 
-
   /**
    * Adds condition select fields to AbjsTestForm.
    */
@@ -322,48 +327,54 @@ class AbjsTestForm extends FormBase {
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {}
 
+  /**
+   *
+   */
   public function validateTest(array &$form, FormStateInterface $form_state) {
     for ($i = 0; $i < count($form_state->getValue(['experiences_fieldset', 'experiences'])); $i++) {
       if (!preg_match('#^[0-9./]+$#', $form_state->getValue(['experiences_fieldset', 'experiences'])[$i]['fraction'])) {
-        $form_state->setErrorByName("experiences_fieldset][experiences][$i][fraction", t('Invalid character used in Experience @i Fraction. Only numbers, decimals, and slashes are allowed. Other characters, including spaces, are not allowed.', array('@i' => $i + 1)));
+        $form_state->setErrorByName("experiences_fieldset][experiences][$i][fraction", t('Invalid character used in Experience @i Fraction. Only numbers, decimals, and slashes are allowed. Other characters, including spaces, are not allowed.', ['@i' => $i + 1]));
       }
     }
   }
 
-  public function saveTest(array &$form, FormStateInterface $form_state){
+  /**
+   *
+   */
+  public function saveTest(array &$form, FormStateInterface $form_state) {
     $user = \Drupal::currentUser();
     if ($form_state->hasValue('tid')) {
       // This is an existing test, so update instead of insert.
       $tid = $form_state->getValue('tid');
       db_update('abjs_test')
-        ->fields(array(
+        ->fields([
           'name' => $form_state->getValue('name'),
           'active' => $form_state->getValue('active'),
           'changed' => REQUEST_TIME,
           'changed_by' => $user->id(),
-      ))->condition('tid', $tid, '=')
+        ])->condition('tid', $tid, '=')
         ->execute();
 
       // Delete all entries in the test-condition and test-experience tables to
       // make life easy. Re-insert them later in this function.
       db_delete('abjs_test_condition')
-          ->condition('tid', $tid)
-          ->execute();
+        ->condition('tid', $tid)
+        ->execute();
       db_delete('abjs_test_experience')
-          ->condition('tid', $tid)
-          ->execute();
+        ->condition('tid', $tid)
+        ->execute();
     }
     else {
       // This is a new test, so insert it.
       $tid = db_insert('abjs_test')
-        ->fields(array(
+        ->fields([
           'name' => $form_state->getValue('name'),
           'active' => $form_state->getValue('active'),
           'created' => REQUEST_TIME,
           'created_by' => $user->id(),
           'changed' => REQUEST_TIME,
           'changed_by' => $user->id(),
-        ))->execute();
+        ])->execute();
     }
 
     // Whether new or existing test, insert conditions and experiences for this
@@ -375,26 +386,26 @@ class AbjsTestForm extends FormBase {
     foreach ($form_state->getValue(['conditions_fieldset', 'conditions']) as $cid) {
       if ($cid > 0) {
         db_merge('abjs_test_condition')
-          ->key(array(
+          ->key([
             'tid' => $tid,
             'cid' => $cid,
-        ))->fields(array(
+          ])->fields([
             'tid' => $tid,
             'cid' => $cid,
-        ))->execute();
+          ])->execute();
       }
     }
     foreach ($form_state->getValue(['experiences_fieldset', 'experiences']) as $experience) {
       if (isset($experience['experience']) && $experience['experience'] > 0) {
         db_merge('abjs_test_experience')
-          ->key(array(
+          ->key([
             'tid' => $tid,
             'eid' => $experience['experience'],
-        ))->fields(array(
+          ])->fields([
             'tid' => $tid,
             'eid' => $experience['experience'],
             'fraction' => $experience['fraction'],
-        ))->execute();
+          ])->execute();
       }
     }
     $msg = $form_state->hasValue('tid') ? t("Successfully updated test") : t("Successfully saved new test");
@@ -402,12 +413,18 @@ class AbjsTestForm extends FormBase {
     $form_state->setRedirect('abjs.test_admin');
   }
 
-  public function cancelTest(array &$form, FormStateInterface $form_state){
+  /**
+   *
+   */
+  public function cancelTest(array &$form, FormStateInterface $form_state) {
     $form_state->setRedirect('abjs.test_admin');
   }
 
-  public function deleteTest(array &$form, FormStateInterface $form_state){
-    $form_state->setRedirect('abjs.test_delete_confirm_form', array('tid' => $form_state->getValue('tid')));
+  /**
+   *
+   */
+  public function deleteTest(array &$form, FormStateInterface $form_state) {
+    $form_state->setRedirect('abjs.test_delete_confirm_form', ['tid' => $form_state->getValue('tid')]);
   }
 
 }
