diff --git a/src/Form/RiddlerSettingsForm.php b/src/Form/RiddlerSettingsForm.php
index 80ca048..797bccd 100755
--- a/src/Form/RiddlerSettingsForm.php
+++ b/src/Form/RiddlerSettingsForm.php
@@ -38,7 +38,7 @@ class RiddlerSettingsForm extends ConfigFormBase {
     // This can be rebuilt by ajax, so check for existing values. in $form_state.
     // Run through array values to reset keys in case one was ajax removed.
     $values = $form_state->getValues();
-    $riddles = isset($values['riddler']) ? $values['riddler'] : array();
+    $riddles = isset($values['riddler']) ? $values['riddler'] : [];
 
     // Without checking if there was a triggering element, this would reload
     // the original active config instead of deleting the last riddle. The
@@ -55,75 +55,75 @@ class RiddlerSettingsForm extends ConfigFormBase {
     $rebuild_info = $form_state->getRebuildInfo();
     if (!isset($rebuild_info['riddler']['items_count'])) {
       // Nested to avoid unlikely conflicts with other modules.
-      $form_state->setRebuildInfo(array(
-        'riddler' => array(
+      $form_state->setRebuildInfo([
+        'riddler' => [
           'items_count' => count($riddles) === 0 ? 1 : count($riddles),
-        )
-      ));
+        ]
+      ]);
     }
 
     $max = $form_state->getRebuildInfo()['riddler']['items_count'];
-    $form['riddler'] = array(
+    $form['riddler'] = [
       '#tree' => TRUE,
       '#prefix' => '<div id="riddler">',
       '#suffix' => '</div>'
-    );
-    $form['riddler']['help'] = array(
+    ];
+    $form['riddler']['help'] = [
       '#markup' => t('Add questions that you require users to answer. A random question will be presented to the user on forms as configured in the CAPTCHA settings. Allow more than one correct answer by entering a comma-separated list.'),
       '#prefix' => '<p>',
       '#suffix' => '</p>'
-    );
+    ];
 
     // Build or rebuild the riddle fields.
     for ($delta = 0; $delta < $max; $delta++) {
       if (!isset($form['riddler'][$delta])) {
-        $element = array(
-          'question' => array(
+        $element = [
+          'question' => [
             '#type' => 'textfield',
             '#title' => 'Riddle ' . ($delta + 1) . ' question',
             '#default_value' => isset($riddles[$delta]) ? $riddles[$delta]['question'] : '',
             '#prefix' => '<div id="row-riddle' . ($delta + 1) . '" class="row-riddle">',
-          ),
-          'response' => array(
+          ],
+          'response' => [
             '#type' => 'textfield',
             '#title' => 'Answer',
             '#default_value' => isset($riddles[$delta]) ? $riddles[$delta]['response'] : '',
-          ),
+          ],
 
           // Delete a row button.
-          'delete' => array(
+          'delete' => [
             '#type' => 'submit',
             '#value' => t('Remove'),
             '#id' => 'riddle' . $delta,
             '#name' => 'riddle-remove-' . $delta,
-            '#submit' => array(array($this, 'removeSubmit')),
-            '#limit_validation_errors' => array(array()),
-            '#ajax' => array(
-              'callback' => array($this, 'removeCallback'),
+            '#submit' => [[$this, 'removeSubmit']],
+            '#limit_validation_errors' => [[]],
+            '#ajax' => [
+              'callback' => [$this, 'removeCallback'],
               'wrapper' => 'riddler',
               'method' => 'replace',
               'effect' => 'fade',
-            ),
+            ],
             '#suffix' => '</div>',
-          ),
-        );
+          ],
+        ];
         $form['riddler'][$delta] = $element;
       }
     }
 
     // Add a row button.
-    $form['add'] = array(
+    $form['add'] = [
       '#type' => 'submit',
       '#value' => t('Add another riddle'),
-      '#submit' => array(array($this, 'addMoreSubmit')),
-      '#limit_validation_errors' => array(array('riddler')),
-      '#ajax' => array(
-        'callback' => array($this, 'addMoreCallback'),
+      '#submit' => [[$this, 'addMoreSubmit']],
+      '#limit_validation_errors' => [['riddler']],
+      '#ajax' => [
+        'callback' => [$this, 'addMoreCallback'],
         'wrapper' => 'riddler',
         'method' => 'replace',
         'effect' => 'fade',
-      ),
-    );
+      ],
+    ];
 
     return parent::buildForm($form, $form_state);
   }
@@ -136,11 +136,11 @@ class RiddlerSettingsForm extends ConfigFormBase {
    */
   public function addMoreSubmit(&$form, FormStateInterface &$form_state) {
     $max = count($form_state->getValues()['riddler']);
-    $form_state->setRebuildInfo(array(
-      'riddler' => array(
+    $form_state->setRebuildInfo([
+      'riddler' => [
         'items_count' => ++$max,
-      )
-    ));
+      ]
+    ]);
     $form_state->setRebuild(TRUE);
   }
 
diff --git a/src/Tests/RiddlerTestCase.php b/src/Tests/RiddlerTestCase.php
index 75dc017..26b1336 100755
--- a/src/Tests/RiddlerTestCase.php
+++ b/src/Tests/RiddlerTestCase.php
@@ -46,12 +46,12 @@ class RiddlerTestCase extends CaptchaBaseWebTestCase {
 //    );
 //
 //    // Try to log in, which should fail.
-//    $edit = array(
+//    $edit = [
 //      'name' => $user->getUsername(),
 //      'pass' => $user->pass_raw,
 //      'captcha_response' => '?',
-//    );
-//    $this->drupalPostForm(NULL, $edit, t('Log in'), array(), array(), self::LOGIN_HTML_FORM_ID);
+//    ];
+//    $this->drupalPostForm(NULL, $edit, t('Log in'), [], [], self::LOGIN_HTML_FORM_ID);
 //    // Check for error message.
 //    $this->assertText(self::CAPTCHA_WRONG_RESPONSE_ERROR_MESSAGE, 'Riddler should block user login form', 'Riddler');
 //
@@ -89,7 +89,7 @@ class RiddlerTestCase extends CaptchaBaseWebTestCase {
 //    $comment_subject = $edit['subject[0][value]'];
 //    $comment_body = $edit['comment_body[0][value]'];
 //    $edit['captcha_response'] = $captcha_response;
-//    $this->drupalPostForm('comment/reply/node/' . $node->id() . '/comment', $edit, t('Save'), array(), array(), 'comment-form');
+//    $this->drupalPostForm('comment/reply/node/' . $node->id() . '/comment', $edit, t('Save'), [], [], 'comment-form');
 //
 //    if ($should_pass) {
 //      // There should be no error message.
@@ -147,18 +147,18 @@ class RiddlerTestCase extends CaptchaBaseWebTestCase {
    * Method for testing the Riddler riddles administration.
    */
   public function testRiddlesAdministration() {
-    $form_values_1_question = array(
+    $form_values_1_question = [
       'riddler[0][question]' => 'What is your favorite primary color?',
       'riddler[0][response]' => 'red, blue, yellow',
-    );
-    $form_values_2_question = array(
+    ];
+    $form_values_2_question = [
       'riddler[0][question]' => 'What is your favorite primary color?',
       'riddler[0][response]' => 'red, blue, yellow',
       'riddler[1][question]' => 'What color is Druplicon?',
       'riddler[1][response]' => 'blue',
-    );
+    ];
 
-    $addAnotherButton = array('op' => 'Add another riddle');
+    $addAnotherButton = ['op' => 'Add another riddle'];
 
     $this->drupalLogin($this->adminUser);
 
