diff --git a/src/Authentication/Provider/W3CTokenAuth.php b/src/Authentication/Provider/W3CTokenAuth.php
index 40d08c3..baae126 100644
--- a/src/Authentication/Provider/W3CTokenAuth.php
+++ b/src/Authentication/Provider/W3CTokenAuth.php
@@ -63,7 +63,7 @@ class W3CTokenAuth implements AuthenticationProviderInterface {
       // Retrieve the current accessed URL.
       $current_url = Url::fromRoute('<current>');
       // Log the access.
-      $this->logger->notice('Request to validate private page !url using token @token for user @user', array('!url' => $current_url->toString(), '@token' => $token, '@user' => $user->label()));
+      $this->logger->notice('Request to validate private page !url using token @token for user @user', ['!url' => $current_url->toString(), '@token' => $token, '@user' => $user->label()]);
 
       return $user;
     }
diff --git a/src/Controller/W3CLogController.php b/src/Controller/W3CLogController.php
index e344b92..c39675e 100644
--- a/src/Controller/W3CLogController.php
+++ b/src/Controller/W3CLogController.php
@@ -70,11 +70,11 @@ class W3CLogController extends ControllerBase {
    *   A render array containing our 'overview report' page content.
    */
   public function overview() {
-    $output = array(
+    $output = [
       '#prefix' => '<div id="foobar">',
       '#suffix' => '</div>',
-    );
-    $rows = array();
+    ];
+    $rows = [];
 
     // Add re-validation form on top.
     $output['operations'] = $this->formBuilder->getForm('Drupal\w3c_validator\Form\W3CValidatorOperationForm');
@@ -92,29 +92,29 @@ class W3CLogController extends ControllerBase {
       $validation = $this->buildValidationResult($all_validated_pages, $url);
 
       // Build the result display using form API.
-      $row = array();
+      $row = [];
       $row[$url]['summary'] = $this->buildValidationDisplay($page, $validation);
       if (isset($validation['status']) && $validation['status'] != $this->t('Unknown')) {
         $row[$url]['details'] = $this->buildValidationDetailDisplay($validation);
       }
       // Render results.
-      $rows[] = array(
-        'data' => array(
-          array(
+      $rows[] = [
+        'data' => [
+          [
             'data' => $this->renderer->render($row),
             'class' => 'w3c_validator-wrapper collapsed',
-          ),
-        ),
-        'class' => array($validation['class']),
-      );
+          ],
+        ],
+        'class' => [$validation['class']],
+      ];
     }
 
-    $output['pages'] = array(
+    $output['pages'] = [
       '#type' => 'table',
       '#rows' => $rows,
-      '#attributes' => array('id' => 'w3c-report'),
+      '#attributes' => ['id' => 'w3c-report'],
       '#empty' => $this->t('No data to display.'),
-    );
+    ];
 
     $output['#attached']['library'][] = 'w3c_validator/w3c_validator.report';
     return $output;
@@ -132,7 +132,7 @@ class W3CLogController extends ControllerBase {
    *   The validation result.
    */
   protected function buildValidationResult($all_validated_pages, $url) {
-    $validation = array();
+    $validation = [];
 
     // Check if the page is validated.
     if (isset($all_validated_pages[$url])) {
@@ -140,7 +140,7 @@ class W3CLogController extends ControllerBase {
       // Retrieve the validation result.
       $validation = $all_validated_pages[$url];
 
-      $validation['result'] = $this->t('@errors errors, @warnings warnings', array('@errors' => $validation['error_count'], '@warnings' => $validation['warning_count']));
+      $validation['result'] = $this->t('@errors errors, @warnings warnings', ['@errors' => $validation['error_count'], '@warnings' => $validation['warning_count']]);
 
       // If page is not yet validated.
       if ($validation['need_validation']) {
@@ -179,29 +179,29 @@ class W3CLogController extends ControllerBase {
    *   A formAPI array representing a result row ready to display.
    */
   protected function buildValidationDisplay($page, $validation) {
-    $display = array(
+    $display = [
       '#type' => 'container',
-      '#attributes' => array('class' => array('page-summary')),
-    );
-    $display['icon'] = array(
+      '#attributes' => ['class' => ['page-summary']],
+    ];
+    $display['icon'] = [
       '#prefix' => '<span class="icon">',
       '#suffix' => '</span>',
-    );
-    $display['title'] = array(
+    ];
+    $display['title'] = [
       '#prefix' => '<span class="title">',
       '#suffix' => '</span>',
       '#markup'  => $page['title'],
-    );
-    $display['result'] = array(
+    ];
+    $display['result'] = [
       '#prefix' => '<span class="result">',
       '#suffix' => '</span>',
       '#markup'  => $validation['result'],
-    );
-    $display['status'] = array(
+    ];
+    $display['status'] = [
       '#prefix' => '<span class="status">',
       '#suffix' => '</span>',
       '#markup'  => $validation['status'],
-    );
+    ];
 
     return $display;
   }
@@ -220,10 +220,10 @@ class W3CLogController extends ControllerBase {
   protected function buildValidationDetailDisplay($validation) {
 
     // Build the container for details results.
-    $display = array(
+    $display = [
       '#prefix' => '<div class="fieldset-wrapper analysis-results">',
       '#suffix' => '</div>',
-    );
+    ];
 
     // Build the title according to validity.
     if ($validation['validity']) {
@@ -232,92 +232,92 @@ class W3CLogController extends ControllerBase {
     else {
       $output = $this->t('Errors found while checking this document !');
     }
-    $display['message'] = array(
+    $display['message'] = [
       '#prefix' => '<h2 class="message ' . $validation['class'] . '">',
       '#suffix' => '</h2>',
       '#markup'  => $output,
-    );
+    ];
 
     // Build rows for details summary table.
     // Render results.
-    $uri = Url::fromUri('base:' . $validation['uri'], array('absolute' => TRUE));
-    $rows[] = array($this->t('Uri'), Link::fromTextAndUrl($uri->toString(), $uri));
-    $rows[] = array($this->t('Validity'), $validation['status']);
-    $url = Url::fromUri('http://validator.w3.org/check', array('query' => array('uri' => $uri->toString()), 'attributes' => array('target' => '_new')));
-    $rows[] = array($this->t('Validator results'), Link::fromTextAndUrl($url->toString(), $url));
-    $rows[] = array($this->t('Doctype'), $validation['doctype']);
-    $rows[] = array($this->t('Summary'), $validation['result']);
-    $display['detail-table'] = array(
+    $uri = Url::fromUri('base:' . $validation['uri'], ['absolute' => TRUE]);
+    $rows[] = [$this->t('Uri'), Link::fromTextAndUrl($uri->toString(), $uri)];
+    $rows[] = [$this->t('Validity'), $validation['status']];
+    $url = Url::fromUri('http://validator.w3.org/check', ['query' => ['uri' => $uri->toString()], 'attributes' => ['target' => '_new']]);
+    $rows[] = [$this->t('Validator results'), Link::fromTextAndUrl($url->toString(), $url)];
+    $rows[] = [$this->t('Doctype'), $validation['doctype']];
+    $rows[] = [$this->t('Summary'), $validation['result']];
+    $display['detail-table'] = [
       '#type' => 'table',
       '#rows' => $rows,
-      '#attributes' => array('class' => 'report'),
+      '#attributes' => ['class' => 'report'],
       '#empty' => $this->t('No data to display.'),
-    );
+    ];
 
     // Display errors.
-    $display['errors-title'] = array(
+    $display['errors-title'] = [
       '#prefix' => '<h2>',
       '#suffix' => '</h2>',
       '#markup'  => $this->t('Errors'),
-    );
+    ];
     $validation['errors'] = is_array($validation['errors']) ? $validation['errors'] : unserialize($validation['errors']);
     if (is_array($validation['errors']) && !empty($validation['errors'])) {
       foreach ($validation['errors'] as $id => $error) {
-        $display['error'][$id] = array(
+        $display['error'][$id] = [
           '#prefix' => '<div class="message-wrapper message-error">',
           '#suffix' => '</div>',
-          'message' => array(
+          'message' => [
             '#prefix' => '<div class="message">',
             '#suffix' => '</div>',
-            '#markup' => '<span class="where">' . t('Line @line, Column @col:', array('@line' => $error->line, '@col' => $error->col)) . '</span><span class="descr">' . t(' @descr', array('@descr' => $error->message)) . '</span>',
-          ),
-          'source' => array(
+            '#markup' => '<span class="where">' . t('Line @line, Column @col:', ['@line' => $error->line, '@col' => $error->col]) . '</span><span class="descr">' . t(' @descr', ['@descr' => $error->message]) . '</span>',
+          ],
+          'source' => [
             '#prefix' => '<div class="source">',
             '#suffix' => '</div>',
             '#markup' => $error->source,
-          ),
-        );
+          ],
+        ];
       }
     }
     else {
-      $display['error'] = array(
+      $display['error'] = [
         '#prefix' => '<div>',
         '#suffix' => '</div>',
         '#markup'  => $this->t('No errors found'),
-      );
+      ];
     }
 
     // Display errors.
-    $display['warnings-title'] = array(
+    $display['warnings-title'] = [
       '#prefix' => '<h2>',
       '#suffix' => '</h2>',
       '#markup'  => $this->t('Warnings'),
-    );
+    ];
     $validation['warnings'] = is_array($validation['warnings']) ? $validation['warnings'] : unserialize($validation['warnings']);
     if (is_array($validation['warnings']) && !empty($validation['warnings'])) {
       foreach ($validation['warnings'] as $id => $warning) {
-        $display['warning'][$id] = array(
+        $display['warning'][$id] = [
           '#prefix' => '<div class="message-wrapper message-warning">',
           '#suffix' => '</div>',
-          'message' => array(
+          'message' => [
             '#prefix' => '<div class="message">',
             '#suffix' => '</div>',
-            '#markup' => '<span class="where">' . t('Line @line, Column @col:', array('@line' => $warning->line, '@col' => $warning->col)) . '</span><span class="descr">' . t(' @descr', array('@descr' => $warning->message)) . '</span>',
-          ),
-          'source' => array(
+            '#markup' => '<span class="where">' . t('Line @line, Column @col:', ['@line' => $warning->line, '@col' => $warning->col]) . '</span><span class="descr">' . t(' @descr', ['@descr' => $warning->message]) . '</span>',
+          ],
+          'source' => [
             '#prefix' => '<div class="source">',
             '#suffix' => '</div>',
             '#markup' => $warning->source,
-          ),
-        );
+          ],
+        ];
       }
     }
     else {
-      $display['warning'] = array(
+      $display['warning'] = [
         '#prefix' => '<div>',
         '#suffix' => '</div>',
         '#markup'  => $this->t('No warnings found'),
-      );
+      ];
     }
 
     return $display;
diff --git a/src/Form/W3CValidatorOperationConfirmForm.php b/src/Form/W3CValidatorOperationConfirmForm.php
index 5334f70..857edf6 100644
--- a/src/Form/W3CValidatorOperationConfirmForm.php
+++ b/src/Form/W3CValidatorOperationConfirmForm.php
@@ -61,16 +61,16 @@ class W3CValidatorOperationConfirmForm extends ConfirmFormBase {
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-    $batch = array(
+    $batch = [
       'title' => t('Validating pages'),
-      'operations' => array(
-        array(array($this->w3cProcessor, 'validateAllPages'), array()),
-      ),
+      'operations' => [
+        [[$this->w3cProcessor, 'validateAllPages'], []],
+      ],
       'finished' => 'getCancelUrl',
       'init_message' => t('Starting validator...'),
       'progress_message' => t('Processed @current out of @total.'),
       'error_message' => t('Error while validating pages.'),
-    );
+    ];
     batch_set($batch);
     $form_state->setRedirect('w3c_validator.overview');
   }
diff --git a/src/Form/W3CValidatorOperationForm.php b/src/Form/W3CValidatorOperationForm.php
index 8673d93..204a4cd 100644
--- a/src/Form/W3CValidatorOperationForm.php
+++ b/src/Form/W3CValidatorOperationForm.php
@@ -55,35 +55,35 @@ class W3CValidatorOperationForm extends FormBase {
   	// Load module settings.
   	$module_settings = $this->configFactory()->get('w3c_validator.settings');
 
-  	$form['advanced_operations'] = array(
+  	$form['advanced_operations'] = [
   		'#type'         => 'details',
   		'#title'        => t('advanced operations'),
   		'#description' 	=> $warning,
   		'#collapsible'  => TRUE,
   		'#collapsed'    => TRUE,
-  	);
+  	];
 
   	// Use admin helper tool option settings.
-  	$form['advanced_operations']['use_token'] = array(
+  	$form['advanced_operations']['use_token'] = [
 	    '#type'           => 'checkbox',
 	    '#title'          => t('Validate as logged user.'),
 	    '#description'    => t('If enabled, pages will be validated as you can see it. Otherwise, as an anonymous user.'),
 	    '#default_value'  => $module_settings->get('use_token'),
-    );
+    ];
 
   	// Include admin pages.
-  	$form['advanced_operations']['admin_pages'] = array(
+  	$form['advanced_operations']['admin_pages'] = [
 	    '#type'           => 'checkbox',
 	    '#title'          => t('Include admin pages.'),
 	    '#description'    => t('If enabled, admin pages will be included in validation.'),
 	    '#default_value'  => $module_settings->get('admin_pages'),
-  	);
+  	];
 
-  	$form['advanced_operations']['w3c_validator_revalidate_all'] = array(
+  	$form['advanced_operations']['w3c_validator_revalidate_all'] = [
       '#type' => 'submit',
       '#value' => 'Re-validate all pages',
   		'#prefix'				=> '<br/>',
-  	);
+  	];
   	return $form;
   }
 
diff --git a/src/Validator/Response.php b/src/Validator/Response.php
index b6538f7..345306d 100644
--- a/src/Validator/Response.php
+++ b/src/Validator/Response.php
@@ -52,7 +52,7 @@ class Response {
    * Array of error objects formated as W3Cvalidator_Message.
    * @var array
    */
-  public $errors = array();
+  public $errors = [];
 
   /**
    * Number of warnings found.
@@ -64,6 +64,6 @@ class Response {
    * Array of warning objects formated as W3Cvalidator_Message.
    * @var array
    */
-  public $warnings = array();
+  public $warnings = [];
 
 }
diff --git a/src/Validator/W3CvalidatorAPI.php b/src/Validator/W3CvalidatorAPI.php
index 4f3909f..fead1a9 100644
--- a/src/Validator/W3CvalidatorAPI.php
+++ b/src/Validator/W3CvalidatorAPI.php
@@ -57,22 +57,22 @@ class W3cValidatorApi {
    * @return \Drupal\Core\Url The URL ready to call.
    */
   protected function buildValidationUrl($settings) {
-    $data = array(
+    $data = [
       'output' => $this->output
-    );
+    ];
     if (isset($settings['uri'])) {
-      $data += array(
+      $data += [
         'uri' => $settings['uri']
-      );
+      ];
     }
     if (isset($settings['fragment'])) {
-      $data += array(
+      $data += [
         'fragment' => $settings['fragment']
-      );
+      ];
     }
-    return Url::fromUri($this->baseUrl, array(
+    return Url::fromUri($this->baseUrl, [
       'query' => $data
-    ));
+    ]);
   }
 
   /**
@@ -93,16 +93,16 @@ class W3cValidatorApi {
     // Call the W3Cvalidator WS.
     try {
       $response = $this->httpClient->post('http://validator.w3.org/check',
-        array('multipart' => array(
-        array(
+        ['multipart' => [
+        [
           'name' => 'fragment',
           'contents' => $fragment
-        ),
-        array(
+        ],
+        [
           'name' => 'output',
           'contents' => 'soap12'
-        )
-      )));
+        ]
+      ]]);
       $data = $response->getBody()->getContents();
     } catch(\Exception $e) {
         watchdog_exception('w3c_validator', $e);
@@ -135,12 +135,12 @@ class W3cValidatorApi {
     $response = new Response();
 
     // Get the standard CDATA elements from the response.
-    foreach(array(
+    foreach([
       'uri',
       'checkedby',
       'doctype',
       'charset'
-    ) as $var) {
+    ] as $var) {
       $element = $doc->getElementsByTagName($var);
       if ($element->length) {
         $response->$var = $element->item(0)->nodeValue;
diff --git a/src/W3CProcessor.php b/src/W3CProcessor.php
index 3a9a747..09fd186 100644
--- a/src/W3CProcessor.php
+++ b/src/W3CProcessor.php
@@ -117,15 +117,15 @@ class W3CProcessor {
    *   List of pages to validate.
    */
   public function findAllPages() {
-    $all_site_pages = array();
+    $all_site_pages = [];
 
     // Add frontpage to list.
     $site_frontpage = $this->configFactory->get('system.site')->get('page.front');
-    $all_site_pages[$site_frontpage] = array('route' => '<front>', 'url' => $site_frontpage, 'title' => t('Frontpage'));
+    $all_site_pages[$site_frontpage] = ['route' => '<front>', 'url' => $site_frontpage, 'title' => t('Frontpage')];
 
     // Add all nodes.
     $query = $this->connection->select('node_field_data', 'n');
-    $query->fields('n', array('nid', 'title'));
+    $query->fields('n', ['nid', 'title']);
     $query->addExpression("CONCAT('entity.node.canonical', '')", 'route');
     $query->addExpression("CONCAT('node/', n.nid)", 'url');
     $nodes = $query->execute()->fetchAllAssoc('url', \PDO::FETCH_ASSOC);
@@ -166,7 +166,7 @@ class W3CProcessor {
   public function validateAllPages(&$context) {
     $token = NULL;
     $user = NULL;
-    $query_options = array();
+    $query_options = [];
 
     // Retrieve all pages to validate.
     $pages_to_validate = $this->findAllPages();
@@ -183,7 +183,7 @@ class W3CProcessor {
       // Retrieve token.
       $token = $this->w3cTokenManager->createAccessToken($this->currentUser);
       // Add it to query options.
-      $query_options['query'] = array('HTTP_W3C_VALIDATOR_TOKEN' => $token);
+      $query_options['query'] = ['HTTP_W3C_VALIDATOR_TOKEN' => $token];
       // Get current user.
       $user = $this->currentUser;
     }
@@ -195,10 +195,10 @@ class W3CProcessor {
     foreach ($pages_to_validate as $page) {
 
       // Set validation message.
-      $context['message'] = $this->t('Validation for page %title...', array('%title' => $page['title']));
+      $context['message'] = $this->t('Validation for page %title...', ['%title' => $page['title']]);
 
       // Check if validation user will be able to validate the page.
-      if (!$this->accessManager->checkNamedRoute($page['route'], array('node' => isset($page['nid']) ? $page['nid'] : ''), $user)) {
+      if (!$this->accessManager->checkNamedRoute($page['route'], ['node' => isset($page['nid']) ? $page['nid'] : ''], $user)) {
         $this->logger->debug($page['title'] . ' at ' . $page['url'] . ' is not accessible for validation.');
         // Update operation data.
         $context['results']['failures']++;
@@ -227,7 +227,7 @@ class W3CProcessor {
    * @param array $query_options
    *   This is a custom array of options for the query.
    */
-  public function validatePage($page, $query_options = array()) {
+  public function validatePage($page, $query_options = []) {
     // Build page query options.
     $query_options['absolute'] = TRUE;
     // Retrieve absolute URL.
@@ -245,8 +245,8 @@ class W3CProcessor {
       $result = $this->validator->validateUrl($fragment);
     }
     catch (\Exception $e) {
-      $this->logger->debug("Page !uri could not be validated.", array('!uri'
-      => $uri));
+      $this->logger->debug("Page !uri could not be validated.", ['!uri'
+      => $uri]);
     }
     // Save result.
     $this->saveResult($result, $page['url']);
@@ -267,8 +267,8 @@ class W3CProcessor {
     if (isset($result) && isset($result->doctype) && isset($key)) {
       // Merge the result with eventual previous result for the same URI.
       $this->connection->merge("w3c_validator")
-        ->key(array('uri' => rtrim($key, "/")))
-        ->fields(array(
+        ->key(['uri' => rtrim($key, "/")])
+        ->fields([
           'uri'             => rtrim($key, "/"),
           'error_count'     => $result->error_count,
           'errors'		    => serialize($result->errors),
@@ -278,16 +278,16 @@ class W3CProcessor {
           'doctype'			=> $result->doctype,
           'validity'		=> $result->validity ? 1 : 0,
           'charset'			=> $result->charset,
-          ))
+          ])
           ->execute();
   	}
   	else {
   	  // Merge the result with eventual previous result for the same URI.
       $this->connection->merge("w3c_validator")
-  	  ->key(array('uri' => rtrim($key, "/")))
-  	  ->fields(array(
+  	  ->key(['uri' => rtrim($key, "/")])
+  	  ->fields([
 	      'need_validation'		=> 1,
-  	  ))
+  	  ])
   	  ->execute();
   	}
   }
diff --git a/src/W3CTokenManager.php b/src/W3CTokenManager.php
index 959a3b7..84923b1 100644
--- a/src/W3CTokenManager.php
+++ b/src/W3CTokenManager.php
@@ -56,12 +56,12 @@ class W3CTokenManager {
 
     // Store unique token.
     $this->database->insert('w3c_access_token')
-      ->fields(array(
+      ->fields([
         'token'       => $token,
         'expiration'  => $time,
         'rand'        => $rand,
         'uid'         => $user->id(),
-      ))
+      ])
       ->execute();
 
     return $token;
