diff --git a/block_example/src/Plugin/Block/ExampleConfigurableTextBlock.php b/block_example/src/Plugin/Block/ExampleConfigurableTextBlock.php
index 9d20371..f9dadbd 100644
--- a/block_example/src/Plugin/Block/ExampleConfigurableTextBlock.php
+++ b/block_example/src/Plugin/Block/ExampleConfigurableTextBlock.php
@@ -31,9 +31,9 @@ class ExampleConfigurableTextBlock extends BlockBase {
    * @see \Drupal\block\BlockBase::__construct()
    */
   public function defaultConfiguration() {
-    return array(
-      'block_example_string' => $this->t('A default value. This block was created at %time', array('%time' => date('c'))),
-    );
+    return [
+      'block_example_string' => $this->t('A default value. This block was created at %time', ['%time' => date('c')]),
+    ];
   }
 
   /**
@@ -48,12 +48,12 @@ class ExampleConfigurableTextBlock extends BlockBase {
    * @see \Drupal\block\BlockFormController::form()
    */
   public function blockForm($form, FormStateInterface $form_state) {
-    $form['block_example_string_text'] = array(
+    $form['block_example_string_text'] = [
       '#type' => 'textarea',
       '#title' => $this->t('Block contents'),
       '#description' => $this->t('This text will appear in the example block.'),
       '#default_value' => $this->configuration['block_example_string'],
-    );
+    ];
     return $form;
   }
 
@@ -74,9 +74,9 @@ class ExampleConfigurableTextBlock extends BlockBase {
    * {@inheritdoc}
    */
   public function build() {
-    return array(
+    return [
       '#markup' => $this->configuration['block_example_string'],
-    );
+    ];
   }
 
 }
diff --git a/block_example/src/Plugin/Block/ExampleUppercaseBlock.php b/block_example/src/Plugin/Block/ExampleUppercaseBlock.php
index 5bb4590..b5f3be1 100644
--- a/block_example/src/Plugin/Block/ExampleUppercaseBlock.php
+++ b/block_example/src/Plugin/Block/ExampleUppercaseBlock.php
@@ -18,9 +18,9 @@ class ExampleUppercaseBlock extends BlockBase {
    * {@inheritdoc}
    */
   public function build() {
-    return array(
+    return [
       '#markup' => t("This block's title is changed to uppercase. Any block title which contains 'uppercase' will also be changed to uppercase."),
-    );
+    ];
   }
 
 }
diff --git a/block_example/tests/src/Functional/BlockExampleMenuTest.php b/block_example/tests/src/Functional/BlockExampleMenuTest.php
index 8068262..e785440 100644
--- a/block_example/tests/src/Functional/BlockExampleMenuTest.php
+++ b/block_example/tests/src/Functional/BlockExampleMenuTest.php
@@ -19,7 +19,7 @@ class BlockExampleMenuTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('block', 'block_example');
+  public static $modules = ['block', 'block_example'];
 
   /**
    * The installation profile to use with this test.
diff --git a/block_example/tests/src/Functional/BlockExampleTest.php b/block_example/tests/src/Functional/BlockExampleTest.php
index 79dfa57..3371a23 100644
--- a/block_example/tests/src/Functional/BlockExampleTest.php
+++ b/block_example/tests/src/Functional/BlockExampleTest.php
@@ -20,7 +20,7 @@ class BlockExampleTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('block', 'block_example');
+  public static $modules = ['block', 'block_example'];
 
   /**
    * Tests block_example functionality.
@@ -29,7 +29,7 @@ class BlockExampleTest extends BrowserTestBase {
     $assert = $this->assertSession();
 
     // Create user.
-    $web_user = $this->drupalCreateUser(array('administer blocks'));
+    $web_user = $this->drupalCreateUser(['administer blocks']);
     // Login the admin user.
     $this->drupalLogin($web_user);
 
@@ -42,25 +42,25 @@ class BlockExampleTest extends BrowserTestBase {
     $assert->pageTextContains('Example: uppercase this please');
 
     // Define and place blocks.
-    $settings_configurable = array(
+    $settings_configurable = [
       'label' => t('Configurable text'),
       'id' => 'block_example_example_configurable_text',
       'theme' => $theme_name,
-    );
+    ];
     $this->drupalPlaceBlock('example_configurable_text', $settings_configurable);
 
-    $settings_uppercase = array(
+    $settings_uppercase = [
       'label' => t('Configurable block to be uppercased'),
       'id' => 'block_example_example_uppercased',
       'theme' => $theme_name,
-    );
+    ];
     $this->drupalPlaceBlock('example_uppercase', $settings_uppercase);
 
-    $settings_empty = array(
+    $settings_empty = [
       'label' => t('Empty block'),
       'id' => 'block_example_example_empty',
       'theme' => $theme_name,
-    );
+    ];
     $this->drupalPlaceBlock('example_empty', $settings_empty);
 
     // Verify that blocks are there. Empty block will not be shown, because it
@@ -72,9 +72,9 @@ class BlockExampleTest extends BrowserTestBase {
     $assert->pageTextNotContains($settings_empty['label']);
 
     // Change content of configurable text block.
-    $edit = array(
+    $edit = [
       'settings[block_example_string_text]' => $this->randomMachineName(),
-    );
+    ];
     $this->drupalPostForm('/admin/structure/block/manage/' . $settings_configurable['id'], $edit, t('Save block'));
     $assert->statusCodeEquals(200);
 
diff --git a/cache_example/src/Form/CacheExampleForm.php b/cache_example/src/Form/CacheExampleForm.php
index f7d1ad8..39b276f 100644
--- a/cache_example/src/Form/CacheExampleForm.php
+++ b/cache_example/src/Form/CacheExampleForm.php
@@ -122,102 +122,102 @@ class CacheExampleForm extends FormBase {
     $intro_message .= '<p>'
       . $this->t(
         '<a href="@url">Reload this page</a> to see cache in action.',
-        array('@url' => $this->getRequest()->getRequestUri())
+        ['@url' => $this->getRequest()->getRequestUri()]
       )
       . ' ';
     $intro_message .= $this->t('You can use the button below to remove cached data.') . '</p>';
 
-    $form['file_search'] = array(
+    $form['file_search'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('File search caching'),
-    );
-    $form['file_search']['introduction'] = array(
+    ];
+    $form['file_search']['introduction'] = [
       '#markup' => $intro_message,
-    );
+    ];
 
     $color = empty($cache) ? 'red' : 'green';
     $retrieval = empty($cache) ? $this->t('calculated by traversing the filesystem') : $this->t('retrieved from cache');
 
-    $form['file_search']['statistics'] = array(
+    $form['file_search']['statistics'] = [
       '#type' => 'item',
-      '#markup' => $this->t('%count files exist in this Drupal installation; @retrieval in @time ms. <br/>(Source: <span style="color:@color;">@source</span>)', array(
+      '#markup' => $this->t('%count files exist in this Drupal installation; @retrieval in @time ms. <br/>(Source: <span style="color:@color;">@source</span>)', [
         '%count' => $files_count,
         '@retrieval' => $retrieval,
         '@time' => number_format($duration * 1000, 2),
         '@color' => $color,
         '@source' => empty($cache) ? $this->t('actual file search') : $this->t('cached'),
-      )
+      ]
       ),
-    );
-    $form['file_search']['remove_file_count'] = array(
+    ];
+    $form['file_search']['remove_file_count'] = [
       '#type' => 'submit',
-      '#submit' => array(array($this, 'expireFiles')),
+      '#submit' => [[$this, 'expireFiles']],
       '#value' => $this->t('Explicitly remove cached file count'),
-    );
+    ];
 
-    $form['expiration_demo'] = array(
+    $form['expiration_demo'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Cache expiration settings'),
-    );
-    $form['expiration_demo']['explanation'] = array(
+    ];
+    $form['expiration_demo']['explanation'] = [
       '#markup' => $this->t('A cache item can be set as CACHE_PERMANENT, meaning that it will only be removed when explicitly cleared, or it can have an expiration time (a Unix timestamp).'),
-    );
+    ];
 
     $item = $this->cacheBackend->get('cache_example_expiring_item', TRUE);
     if ($item == FALSE) {
       $item_status = $this->t('Cache item does not exist');
     }
     else {
-      $item_status = $item->valid ? $this->t('Cache item exists and is set to expire at %time', array('%time' => $item->data)) :
+      $item_status = $item->valid ? $this->t('Cache item exists and is set to expire at %time', ['%time' => $item->data]) :
       $this->t('Cache_item is invalid');
     }
 
-    $form['expiration_demo']['current_status'] = array(
+    $form['expiration_demo']['current_status'] = [
       '#type' => 'item',
       '#title' => $this->t('Current status of cache item "cache_example_expiring_item"'),
       '#markup' => $item_status,
-    );
-    $form['expiration_demo']['expiration'] = array(
+    ];
+    $form['expiration_demo']['expiration'] = [
       '#type' => 'select',
       '#title' => $this->t('Time before cache expiration'),
-      '#options' => array(
+      '#options' => [
         'never_remove' => $this->t('CACHE_PERMANENT'),
         -10 => $this->t('Immediate expiration'),
         10 => $this->t('10 seconds from form submission'),
         60 => $this->t('1 minute from form submission'),
         300 => $this->t('5 minutes from form submission'),
-      ),
+      ],
       '#default_value' => -10,
       '#description' => $this->t('Any cache item can be set to only expire when explicitly cleared, or to expire at a given time.'),
-    );
-    $form['expiration_demo']['create_cache_item'] = array(
+    ];
+    $form['expiration_demo']['create_cache_item'] = [
       '#type' => 'submit',
       '#value' => $this->t('Create a cache item with this expiration'),
-      '#submit' => array(array($this, 'createExpiringItem')),
-    );
+      '#submit' => [[$this, 'createExpiringItem']],
+    ];
 
-    $form['cache_clearing'] = array(
+    $form['cache_clearing'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Expire and remove options'),
       '#description' => $this->t("We have APIs to expire cached items and also to just remove them. Unfortunately, they're all the same API, cache_clear_all"),
-    );
-    $form['cache_clearing']['cache_clear_type'] = array(
+    ];
+    $form['cache_clearing']['cache_clear_type'] = [
       '#type' => 'radios',
       '#title' => $this->t('Type of cache clearing to do'),
-      '#options' => array(
+      '#options' => [
         'expire' => $this->t('Remove items from the "cache" bin that have expired'),
         'remove_all' => $this->t('Remove all items from the "cache" bin regardless of expiration'),
         'remove_tag' => $this->t('Remove all items in the "cache" bin with the tag "cache_example" set to 1'),
-      ),
+      ],
       '#default_value' => 'expire',
-    );
+    ];
     // Submit button to clear cached data.
-    $form['cache_clearing']['clear_expired'] = array(
+    $form['cache_clearing']['clear_expired'] = [
       '#type' => 'submit',
       '#value' => $this->t('Clear or expire cache'),
-      '#submit' => array(array($this, 'cacheClearing')),
+      '#submit' => [[$this, 'cacheClearing']],
       '#access' => $this->currentUser->hasPermission('administer site configuration'),
-    );
+    ];
 
     return $form;
   }
@@ -245,9 +245,9 @@ class CacheExampleForm extends FormBase {
    */
   public function createExpiringItem($form, &$form_state) {
 
-    $tags = array(
+    $tags = [
       'cache_example:1',
-    );
+    ];
 
     $interval = $form_state->getValue('expiration');
     if ($interval == 'never_remove') {
@@ -262,7 +262,7 @@ class CacheExampleForm extends FormBase {
     // required interval. Also add a tag to it to be able to clear caches more
     // precise.
     $this->cacheBackend->set('cache_example_expiring_item', $expiration_friendly, $expiration, $tags);
-    drupal_set_message($this->t('cache_example_expiring_item was set to expire at %time', array('%time' => $expiration_friendly)));
+    drupal_set_message($this->t('cache_example_expiring_item was set to expire at %time', ['%time' => $expiration_friendly]));
   }
 
   /**
@@ -287,9 +287,9 @@ class CacheExampleForm extends FormBase {
       case 'remove_tag':
         // This removes cache entries with the tag "cache_example" set to 1 in
         // the "cache".
-        $tags = array(
+        $tags = [
           'cache_example:1',
-        );
+        ];
         Cache::invalidateTags($tags);
         drupal_set_message($this->t('Cache entries with the tag "cache_example" set to 1 in the "cache" bin were invalidated with \Drupal\Core\Cache\Cache::invalidateTags($tags).'));
         break;
diff --git a/cache_example/tests/src/Functional/CacheExampleTest.php b/cache_example/tests/src/Functional/CacheExampleTest.php
index 2080b91..549779b 100644
--- a/cache_example/tests/src/Functional/CacheExampleTest.php
+++ b/cache_example/tests/src/Functional/CacheExampleTest.php
@@ -19,7 +19,7 @@ class CacheExampleTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('cache_example');
+  public static $modules = ['cache_example'];
 
   /**
    * The installation profile to use with this test.
@@ -63,7 +63,7 @@ class CacheExampleTest extends BrowserTestBase {
     $assert = $this->assertSession();
 
     // We need administrative privileges to clear the cache.
-    $admin_user = $this->drupalCreateUser(array('administer site configuration'));
+    $admin_user = $this->drupalCreateUser(['administer site configuration']);
     $this->drupalLogin($admin_user);
 
     // Get initial page cache example page, first time accessed,
@@ -76,33 +76,33 @@ class CacheExampleTest extends BrowserTestBase {
     $assert->pageTextContains('Source: cached');
 
     // Now push the button to remove the count.
-    $this->drupalPostForm('examples/cache-example', array(), t('Explicitly remove cached file count'));
+    $this->drupalPostForm('examples/cache-example', [], t('Explicitly remove cached file count'));
     $assert->pageTextContains('Source: actual file search');
 
     // Create a cached item. First make sure it doesn't already exist.
     $assert->pageTextContains('Cache item does not exist');
-    $this->drupalPostForm('examples/cache-example', array('expiration' => -10), t('Create a cache item with this expiration'));
+    $this->drupalPostForm('examples/cache-example', ['expiration' => -10], t('Create a cache item with this expiration'));
     // We should now have an already-expired item. Automatically invalid.
     $assert->pageTextContains('Cache_item is invalid');
     // Now do the expiration operation.
-    $this->drupalPostForm('examples/cache-example', array('cache_clear_type' => 'expire'), t('Clear or expire cache'));
+    $this->drupalPostForm('examples/cache-example', ['cache_clear_type' => 'expire'], t('Clear or expire cache'));
     // And verify that it was removed.
     $assert->pageTextContains('Cache item does not exist');
 
     // Create a cached item. This time we'll make it not expire.
-    $this->drupalPostForm('examples/cache-example', array('expiration' => 'never_remove'), t('Create a cache item with this expiration'));
+    $this->drupalPostForm('examples/cache-example', ['expiration' => 'never_remove'], t('Create a cache item with this expiration'));
     // We should now have an never-remove item.
     $assert->pageTextContains('Cache item exists and is set to expire at Never expires');
     // Now do the expiration operation.
-    $this->drupalPostForm('examples/cache-example', array('cache_clear_type' => 'expire'), t('Clear or expire cache'));
+    $this->drupalPostForm('examples/cache-example', ['cache_clear_type' => 'expire'], t('Clear or expire cache'));
     // And verify that it was not removed.
     $assert->pageTextContains('Cache item exists and is set to expire at Never expires');
     // Now do tag invalidation.
-    $this->drupalPostForm('examples/cache-example', array('cache_clear_type' => 'remove_tag'), t('Clear or expire cache'));
+    $this->drupalPostForm('examples/cache-example', ['cache_clear_type' => 'remove_tag'], t('Clear or expire cache'));
     // And verify that it was invalidated.
     $assert->pageTextContains('Cache_item is invalid');
     // Do the hard delete.
-    $this->drupalPostForm('examples/cache-example', array('cache_clear_type' => 'remove_all'), t('Clear or expire cache'));
+    $this->drupalPostForm('examples/cache-example', ['cache_clear_type' => 'remove_all'], t('Clear or expire cache'));
     // And verify that it was removed.
     $assert->pageTextContains('Cache item does not exist');
   }
diff --git a/config_entity_example/src/Form/RobotDeleteForm.php b/config_entity_example/src/Form/RobotDeleteForm.php
index b59b399..99bdae7 100644
--- a/config_entity_example/src/Form/RobotDeleteForm.php
+++ b/config_entity_example/src/Form/RobotDeleteForm.php
@@ -30,9 +30,9 @@ class RobotDeleteForm extends EntityConfirmFormBase {
    *   Translated string.
    */
   public function getQuestion() {
-    return $this->t('Are you sure you want to delete robot %label?', array(
+    return $this->t('Are you sure you want to delete robot %label?', [
       '%label' => $this->entity->label(),
-    ));
+    ]);
   }
 
   /**
@@ -78,9 +78,9 @@ class RobotDeleteForm extends EntityConfirmFormBase {
     $this->entity->delete();
 
     // Set a message that the entity was deleted.
-    drupal_set_message($this->t('Robot %label was deleted.', array(
+    drupal_set_message($this->t('Robot %label was deleted.', [
       '%label' => $this->entity->label(),
-    )));
+    ]));
 
     // Redirect the user to the list controller when complete.
     $form_state->setRedirectUrl($this->getCancelUrl());
diff --git a/config_entity_example/src/Form/RobotFormBase.php b/config_entity_example/src/Form/RobotFormBase.php
index c1cead1..f6afad0 100644
--- a/config_entity_example/src/Form/RobotFormBase.php
+++ b/config_entity_example/src/Form/RobotFormBase.php
@@ -83,29 +83,29 @@ class RobotFormBase extends EntityForm {
     $robot = $this->entity;
 
     // Build the form.
-    $form['label'] = array(
+    $form['label'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Label'),
       '#maxlength' => 255,
       '#default_value' => $robot->label(),
       '#required' => TRUE,
-    );
-    $form['id'] = array(
+    ];
+    $form['id'] = [
       '#type' => 'machine_name',
       '#title' => $this->t('Machine name'),
       '#default_value' => $robot->id(),
-      '#machine_name' => array(
-        'exists' => array($this, 'exists'),
+      '#machine_name' => [
+        'exists' => [$this, 'exists'],
         'replace_pattern' => '([^a-z0-9_]+)|(^custom$)',
         'error' => 'The machine-readable name must be unique, and can only contain lowercase letters, numbers, and underscores. Additionally, it can not be the reserved word "custom".',
-      ),
+      ],
       '#disabled' => !$robot->isNew(),
-    );
-    $form['floopy'] = array(
+    ];
+    $form['floopy'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Floopy'),
       '#default_value' => $robot->floopy,
-    );
+    ];
 
     // Return the form.
     return $form;
@@ -205,12 +205,12 @@ class RobotFormBase extends EntityForm {
 
     if ($status == SAVED_UPDATED) {
       // If we edited an existing entity...
-      drupal_set_message($this->t('Robot %label has been updated.', array('%label' => $robot->label())));
+      drupal_set_message($this->t('Robot %label has been updated.', ['%label' => $robot->label()]));
       $this->logger('contact')->notice('Robot %label has been updated.', ['%label' => $robot->label(), 'link' => $edit_link]);
     }
     else {
       // If we created a new entity...
-      drupal_set_message($this->t('Robot %label has been added.', array('%label' => $robot->label())));
+      drupal_set_message($this->t('Robot %label has been added.', ['%label' => $robot->label()]));
       $this->logger('contact')->notice('Robot %label has been added.', ['%label' => $robot->label(), 'link' => $edit_link]);
     }
 
diff --git a/config_entity_example/tests/src/Functional/ConfigEntityExampleTest.php b/config_entity_example/tests/src/Functional/ConfigEntityExampleTest.php
index 30b15cb..dabd730 100644
--- a/config_entity_example/tests/src/Functional/ConfigEntityExampleTest.php
+++ b/config_entity_example/tests/src/Functional/ConfigEntityExampleTest.php
@@ -19,7 +19,7 @@ class ConfigEntityExampleTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('config_entity_example');
+  public static $modules = ['config_entity_example'];
 
   /**
    * The installation profile to use with this test.
@@ -55,12 +55,12 @@ class ConfigEntityExampleTest extends BrowserTestBase {
     // 2) Verify that permissions are applied to the various defined paths.
     // Define some paths. Since the Marvin entity is defined, we can use it
     // in our management paths.
-    $forbidden_paths = array(
+    $forbidden_paths = [
       '/examples/config-entity-example',
       '/examples/config-entity-example/add',
       '/examples/config-entity-example/manage/marvin',
       '/examples/config-entity-example/manage/marvin/delete',
-    );
+    ];
     // Check each of the paths to make sure we don't have access. At this point
     // we haven't logged in any users, so the client is anonymous.
     foreach ($forbidden_paths as $path) {
@@ -79,7 +79,7 @@ class ConfigEntityExampleTest extends BrowserTestBase {
     }
 
     // Create a user who can administer robots.
-    $admin_user = $this->drupalCreateUser(array('administer robots'));
+    $admin_user = $this->drupalCreateUser(['administer robots']);
     $this->drupalLogin($admin_user);
     // Forbidden paths aren't forbidden any more.
     foreach ($forbidden_paths as $unforbidden) {
@@ -100,11 +100,11 @@ class ConfigEntityExampleTest extends BrowserTestBase {
     $robot_machine_name = 'roboname';
     $this->drupalPostForm(
       NULL,
-      array(
+      [
         'label' => $robot_machine_name,
         'id' => $robot_machine_name,
         'floopy' => TRUE,
-      ),
+      ],
       t('Create Robot')
     );
 
@@ -120,11 +120,11 @@ class ConfigEntityExampleTest extends BrowserTestBase {
     $robby_label = 'Robby label';
     $this->drupalPostForm(
       NULL,
-      array(
+      [
         'label' => $robby_label,
         'id' => $robby_machine_name,
         'floopy' => TRUE,
-      ),
+      ],
       t('Create Robot')
     );
     $this->drupalGet('/examples/config-entity-example');
diff --git a/content_entity_example/src/Entity/Contact.php b/content_entity_example/src/Entity/Contact.php
index d456576..e55a575 100644
--- a/content_entity_example/src/Entity/Contact.php
+++ b/content_entity_example/src/Entity/Contact.php
@@ -138,9 +138,9 @@ class Contact extends ContentEntityBase implements ContactInterface {
    */
   public static function preCreate(EntityStorageInterface $storage_controller, array &$values) {
     parent::preCreate($storage_controller, $values);
-    $values += array(
+    $values += [
       'user_id' => \Drupal::currentUser()->id(),
-    );
+    ];
   }
 
   /**
@@ -217,42 +217,42 @@ class Contact extends ContentEntityBase implements ContactInterface {
     $fields['name'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Name'))
       ->setDescription(t('The name of the Contact entity.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 255,
         'text_processing' => 0,
-      ))
+      ])
       // Set no default value.
       ->setDefaultValue(NULL)
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -6,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -6,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
     $fields['first_name'] = BaseFieldDefinition::create('string')
       ->setLabel(t('First Name'))
       ->setDescription(t('The first name of the Contact entity.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 255,
         'text_processing' => 0,
-      ))
+      ])
       // Set no default value.
       ->setDefaultValue(NULL)
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -5,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -5,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
@@ -264,21 +264,21 @@ class Contact extends ContentEntityBase implements ContactInterface {
     $fields['gender'] = BaseFieldDefinition::create('list_string')
       ->setLabel(t('Gender'))
       ->setDescription(t('The gender of the Contact entity.'))
-      ->setSettings(array(
-        'allowed_values' => array(
+      ->setSettings([
+        'allowed_values' => [
           'female' => 'female',
           'male' => 'male',
-        ),
-      ))
-      ->setDisplayOptions('view', array(
+        ],
+      ])
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'options_select',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
@@ -291,20 +291,20 @@ class Contact extends ContentEntityBase implements ContactInterface {
       ->setDescription(t('The Name of the associated user.'))
       ->setSetting('target_type', 'user')
       ->setSetting('handler', 'default')
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'author',
         'weight' => -3,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'entity_reference_autocomplete',
-        'settings' => array(
+        'settings' => [
           'match_operator' => 'CONTAINS',
           'size' => 60,
           'placeholder' => '',
-        ),
+        ],
         'weight' => -3,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
@@ -313,23 +313,23 @@ class Contact extends ContentEntityBase implements ContactInterface {
     $fields['role'] = BaseFieldDefinition::create('list_string')
       ->setLabel(t('Role'))
       ->setDescription(t('The role of the Contact entity.'))
-      ->setSettings(array(
-        'allowed_values' => array(
+      ->setSettings([
+        'allowed_values' => [
           'administrator' => 'administrator',
           'user' => 'user',
-        ),
-      ))
+        ],
+      ])
       // Set the default value of this field to 'user'.
       ->setDefaultValue('user')
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -2,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'options_select',
         'weight' => -2,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
diff --git a/content_entity_example/src/Entity/Controller/ContactListBuilder.php b/content_entity_example/src/Entity/Controller/ContactListBuilder.php
index 2f6ffae..1b27193 100644
--- a/content_entity_example/src/Entity/Controller/ContactListBuilder.php
+++ b/content_entity_example/src/Entity/Controller/ContactListBuilder.php
@@ -57,11 +57,11 @@ class ContactListBuilder extends EntityListBuilder {
    * buildHeader() and buildRow() implementations.
    */
   public function render() {
-    $build['description'] = array(
-      '#markup' => $this->t('Content Entity Example implements a Contacts model. These contacts are fieldable entities. You can manage the fields on the <a href="@adminlink">Contacts admin page</a>.', array(
+    $build['description'] = [
+      '#markup' => $this->t('Content Entity Example implements a Contacts model. These contacts are fieldable entities. You can manage the fields on the <a href="@adminlink">Contacts admin page</a>.', [
         '@adminlink' => $this->urlGenerator->generateFromRoute('content_entity_example.contact_settings'),
-      )),
-    );
+      ]),
+    ];
     $build['table'] = parent::render();
     return $build;
   }
diff --git a/content_entity_example/src/Form/ContactDeleteForm.php b/content_entity_example/src/Form/ContactDeleteForm.php
index 26cb81b..c224dc2 100644
--- a/content_entity_example/src/Form/ContactDeleteForm.php
+++ b/content_entity_example/src/Form/ContactDeleteForm.php
@@ -17,7 +17,7 @@ class ContactDeleteForm extends ContentEntityConfirmFormBase {
    * {@inheritdoc}
    */
   public function getQuestion() {
-    return $this->t('Are you sure you want to delete entity %name?', array('%name' => $this->entity->label()));
+    return $this->t('Are you sure you want to delete entity %name?', ['%name' => $this->entity->label()]);
   }
 
   /**
@@ -46,10 +46,10 @@ class ContactDeleteForm extends ContentEntityConfirmFormBase {
     $entity->delete();
 
     $this->logger('content_entity_example')->notice('@type: deleted %title.',
-      array(
+      [
         '@type' => $this->entity->bundle(),
         '%title' => $this->entity->label(),
-      ));
+      ]);
     $form_state->setRedirect('entity.content_entity_example_contact.collection');
   }
 
diff --git a/content_entity_example/src/Form/ContactForm.php b/content_entity_example/src/Form/ContactForm.php
index 2771da6..e35a462 100644
--- a/content_entity_example/src/Form/ContactForm.php
+++ b/content_entity_example/src/Form/ContactForm.php
@@ -21,12 +21,12 @@ class ContactForm extends ContentEntityForm {
     $form = parent::buildForm($form, $form_state);
     $entity = $this->entity;
 
-    $form['langcode'] = array(
+    $form['langcode'] = [
       '#title' => $this->t('Language'),
       '#type' => 'language_select',
       '#default_value' => $entity->getUntranslated()->language()->getId(),
       '#languages' => Language::STATE_ALL,
-    );
+    ];
     return $form;
   }
 
diff --git a/content_entity_example/tests/src/Functional/ContentEntityExampleTest.php b/content_entity_example/tests/src/Functional/ContentEntityExampleTest.php
index 433e3ff..b0a25f5 100644
--- a/content_entity_example/tests/src/Functional/ContentEntityExampleTest.php
+++ b/content_entity_example/tests/src/Functional/ContentEntityExampleTest.php
@@ -15,7 +15,7 @@ use Drupal\Tests\examples\Functional\ExamplesBrowserTestBase;
  */
 class ContentEntityExampleTest extends ExamplesBrowserTestBase {
 
-  public static $modules = array('content_entity_example', 'block', 'field_ui');
+  public static $modules = ['content_entity_example', 'block', 'field_ui'];
 
   /**
    * Basic tests for Content Entity Example.
@@ -23,7 +23,7 @@ class ContentEntityExampleTest extends ExamplesBrowserTestBase {
   public function testContentEntityExample() {
     $assert = $this->assertSession();
 
-    $web_user = $this->drupalCreateUser(array(
+    $web_user = $this->drupalCreateUser([
       'add contact entity',
       'edit contact entity',
       'view contact entity',
@@ -32,7 +32,7 @@ class ContentEntityExampleTest extends ExamplesBrowserTestBase {
       'administer content_entity_example_contact display',
       'administer content_entity_example_contact fields',
       'administer content_entity_example_contact form display',
-    ));
+    ]);
 
     // Anonymous User should not see the link to the listing.
     $assert->pageTextNotContains('Content Entity Example: Contacts Listing');
@@ -58,12 +58,12 @@ class ContentEntityExampleTest extends ExamplesBrowserTestBase {
     $assert->fieldValueEquals('user_id[0][target_id]', $user_ref);
 
     // Post content, save an instance. Go back to list after saving.
-    $edit = array(
+    $edit = [
       'name[0][value]' => 'test name',
       'first_name[0][value]' => 'test first name',
       'gender' => 'male',
       'role' => 'administrator',
-    );
+    ];
     $this->drupalPostForm(NULL, $edit, t('Save'));
 
     // Entity listed.
@@ -86,7 +86,7 @@ class ContentEntityExampleTest extends ExamplesBrowserTestBase {
 
     // Confirm deletion.
     $assert->linkExists('Cancel');
-    $this->drupalPostForm(NULL, array(), 'Delete');
+    $this->drupalPostForm(NULL, [], 'Delete');
 
     // Back to list, must be empty.
     $assert->pageTextNotContains('test name');
@@ -110,12 +110,12 @@ class ContentEntityExampleTest extends ExamplesBrowserTestBase {
 
     // Generate a contact so that we can test the paths against it.
     $contact = Contact::create(
-      array(
+      [
         'name' => 'somename',
         'first_name' => 'Joe',
         'gender' => 'female',
         'role' => 'administrator',
-      )
+      ]
     );
     $contact->save();
 
@@ -127,7 +127,7 @@ class ContentEntityExampleTest extends ExamplesBrowserTestBase {
       // drupalCreateUser() doesn't know what to do with an empty permission
       // array, so we help it out.
       if ($datum[2]) {
-        $user = $this->drupalCreateUser(array($datum[2]));
+        $user = $this->drupalCreateUser([$datum[2]]);
         $this->drupalLogin($user);
       }
       else {
@@ -152,91 +152,91 @@ class ContentEntityExampleTest extends ExamplesBrowserTestBase {
    *   - Permission for the user.
    */
   protected function providerTestPaths($contact_id) {
-    return array(
-      array(
+    return [
+      [
         200,
         '/content_entity_example_contact/' . $contact_id,
         'view contact entity',
-      ),
-      array(
+      ],
+      [
         403,
         '/content_entity_example_contact/' . $contact_id,
         '',
-      ),
-      array(
+      ],
+      [
         200,
         '/content_entity_example_contact/list',
         'view contact entity',
-      ),
-      array(
+      ],
+      [
         403,
         '/content_entity_example_contact/list',
         '',
-      ),
-      array(
+      ],
+      [
         200,
         '/content_entity_example_contact/add',
         'add contact entity',
-      ),
-      array(
+      ],
+      [
         403,
         '/content_entity_example_contact/add',
         '',
-      ),
-      array(
+      ],
+      [
         200,
         '/content_entity_example_contact/' . $contact_id . '/edit',
         'edit contact entity',
-      ),
-      array(
+      ],
+      [
         403,
         '/content_entity_example_contact/' . $contact_id . '/edit',
         '',
-      ),
-      array(
+      ],
+      [
         200,
         '/contact/' . $contact_id . '/delete',
         'delete contact entity',
-      ),
-      array(
+      ],
+      [
         403,
         '/contact/' . $contact_id . '/delete',
         '',
-      ),
-      array(
+      ],
+      [
         200,
         'admin/structure/content_entity_example_contact_settings',
         'administer contact entity',
-      ),
-      array(
+      ],
+      [
         403,
         'admin/structure/content_entity_example_contact_settings',
         '',
-      ),
-    );
+      ],
+    ];
   }
 
   /**
    * Test add new fields to the contact entity.
    */
   public function testAddFields() {
-    $web_user = $this->drupalCreateUser(array(
+    $web_user = $this->drupalCreateUser([
       'administer contact entity',
       'administer content_entity_example_contact display',
       'administer content_entity_example_contact fields',
       'administer content_entity_example_contact form display',
-    ));
+    ]);
 
     $this->drupalLogin($web_user);
     $entity_name = 'content_entity_example_contact';
     $add_field_url = 'admin/structure/' . $entity_name . '_settings/fields/add-field';
     $this->drupalGet($add_field_url);
     $field_name = 'test_name';
-    $edit = array(
+    $edit = [
       'new_storage_type' => 'list_string',
       'label' => 'test name',
       'field_name' => $field_name,
-    );
+    ];
 
     $this->drupalPostForm(NULL, $edit, t('Save and continue'));
     $expected_path = $this->buildUrl('admin/structure/' . $entity_name . '_settings/fields/' . $entity_name . '.' . $entity_name . '.field_' . $field_name . '/storage');
diff --git a/dbtng_example/dbtng_example.install b/dbtng_example/dbtng_example.install
index d58555e..a1c7298 100644
--- a/dbtng_example/dbtng_example.install
+++ b/dbtng_example/dbtng_example.install
@@ -16,22 +16,22 @@
  */
 function dbtng_example_install() {
   // Add a default entry.
-  $fields = array(
+  $fields = [
     'name' => 'John',
     'surname' => 'Doe',
     'age' => 0,
-  );
+  ];
   db_insert('dbtng_example')
     ->fields($fields)
     ->execute();
 
   // Add another entry.
-  $fields = array(
+  $fields = [
     'name' => 'John',
     'surname' => 'Roe',
     'age' => 100,
     'uid' => 1,
-  );
+  ];
   db_insert('dbtng_example')
     ->fields($fields)
     ->execute();
@@ -47,49 +47,49 @@ function dbtng_example_install() {
  * @ingroup dbtng_example
  */
 function dbtng_example_schema() {
-  $schema['dbtng_example'] = array(
+  $schema['dbtng_example'] = [
     'description' => 'Stores example person entries for demonstration purposes.',
-    'fields' => array(
-      'pid' => array(
+    'fields' => [
+      'pid' => [
         'type' => 'serial',
         'not null' => TRUE,
         'description' => 'Primary Key: Unique person ID.',
-      ),
-      'uid' => array(
+      ],
+      'uid' => [
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
         'description' => "Creator user's {users}.uid",
-      ),
-      'name' => array(
+      ],
+      'name' => [
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
         'description' => 'Name of the person.',
-      ),
-      'surname' => array(
+      ],
+      'surname' => [
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
         'description' => 'Surname of the person.',
-      ),
-      'age' => array(
+      ],
+      'age' => [
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
         'size' => 'tiny',
         'description' => 'The age of the person in years.',
-      ),
-    ),
-    'primary key' => array('pid'),
-    'indexes' => array(
-      'name' => array('name'),
-      'surname' => array('surname'),
-      'age' => array('age'),
-    ),
-  );
+      ],
+    ],
+    'primary key' => ['pid'],
+    'indexes' => [
+      'name' => ['name'],
+      'surname' => ['surname'],
+      'age' => ['age'],
+    ],
+  ];
 
   return $schema;
 }
diff --git a/dbtng_example/src/Controller/DbtngExampleController.php b/dbtng_example/src/Controller/DbtngExampleController.php
index b37aca9..04f026b 100644
--- a/dbtng_example/src/Controller/DbtngExampleController.php
+++ b/dbtng_example/src/Controller/DbtngExampleController.php
@@ -14,25 +14,25 @@ class DbtngExampleController extends ControllerBase {
    * Render a list of entries in the database.
    */
   public function entryList() {
-    $content = array();
+    $content = [];
 
-    $content['message'] = array(
+    $content['message'] = [
       '#markup' => $this->t('Generate a list of all entries in the database. There is no filter in the query.'),
-    );
+    ];
 
-    $rows = array();
-    $headers = array(t('Id'), t('uid'), t('Name'), t('Surname'), t('Age'));
+    $rows = [];
+    $headers = [t('Id'), t('uid'), t('Name'), t('Surname'), t('Age')];
 
     foreach ($entries = DbtngExampleStorage::load() as $entry) {
       // Sanitize each entry.
       $rows[] = array_map('Drupal\Component\Utility\SafeMarkup::checkPlain', (array) $entry);
     }
-    $content['table'] = array(
+    $content['table'] = [
       '#type' => 'table',
       '#header' => $headers,
       '#rows' => $rows,
       '#empty' => t('No entries available.'),
-    );
+    ];
     // Don't cache this page.
     $content['#cache']['max-age'] = 0;
 
@@ -43,33 +43,33 @@ class DbtngExampleController extends ControllerBase {
    * Render a filtered list of entries in the database.
    */
   public function entryAdvancedList() {
-    $content = array();
+    $content = [];
 
-    $content['message'] = array(
+    $content['message'] = [
       '#markup' => $this->t('A more complex list of entries in the database.') . ' ' .
       $this->t('Only the entries with name = "John" and age older than 18 years are shown, the username of the person who created the entry is also shown.'),
-    );
+    ];
 
-    $headers = array(
+    $headers = [
       t('Id'),
       t('Created by'),
       t('Name'),
       t('Surname'),
       t('Age'),
-    );
+    ];
 
-    $rows = array();
+    $rows = [];
     foreach ($entries = DbtngExampleStorage::advancedLoad() as $entry) {
       // Sanitize each entry.
       $rows[] = array_map('Drupal\Component\Utility\SafeMarkup::checkPlain', $entry);
     }
-    $content['table'] = array(
+    $content['table'] = [
       '#type' => 'table',
       '#header' => $headers,
       '#rows' => $rows,
-      '#attributes' => array('id' => 'dbtng-example-advanced-list'),
+      '#attributes' => ['id' => 'dbtng-example-advanced-list'],
       '#empty' => t('No entries available.'),
-    );
+    ];
     // Don't cache this page.
     $content['#cache']['max-age'] = 0;
     return $content;
diff --git a/dbtng_example/src/DbtngExampleStorage.php b/dbtng_example/src/DbtngExampleStorage.php
index 4d05b24..eea0a69 100644
--- a/dbtng_example/src/DbtngExampleStorage.php
+++ b/dbtng_example/src/DbtngExampleStorage.php
@@ -36,10 +36,10 @@ class DbtngExampleStorage {
         ->execute();
     }
     catch (\Exception $e) {
-      drupal_set_message(t('db_insert failed. Message = %message, query= %query', array(
+      drupal_set_message(t('db_insert failed. Message = %message, query= %query', [
         '%message' => $e->getMessage(),
         '%query' => $e->query_string,
-      )
+      ]
       ), 'error');
     }
     return $return_value;
@@ -65,10 +65,10 @@ class DbtngExampleStorage {
         ->execute();
     }
     catch (\Exception $e) {
-      drupal_set_message(t('db_update failed. Message = %message, query= %query', array(
+      drupal_set_message(t('db_update failed. Message = %message, query= %query', [
         '%message' => $e->getMessage(),
         '%query' => $e->query_string,
-      )
+      ]
       ), 'error');
     }
     return $count;
@@ -161,7 +161,7 @@ class DbtngExampleStorage {
    * @see http://drupal.org/node/310072
    * @see http://drupal.org/node/310075
    */
-  public static function load(array $entry = array()) {
+  public static function load(array $entry = []) {
     // Read all fields from the dbtng_example table.
     $select = db_select('dbtng_example', 'example');
     $select->fields('example');
diff --git a/dbtng_example/src/Form/DbtngExampleAddForm.php b/dbtng_example/src/Form/DbtngExampleAddForm.php
index 83ee94d..04f5a83 100644
--- a/dbtng_example/src/Form/DbtngExampleAddForm.php
+++ b/dbtng_example/src/Form/DbtngExampleAddForm.php
@@ -60,36 +60,36 @@ class DbtngExampleAddForm implements FormInterface, ContainerInjectionInterface
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    $form = array();
+    $form = [];
 
-    $form['message'] = array(
+    $form['message'] = [
       '#markup' => $this->t('Add an entry to the dbtng_example table.'),
-    );
+    ];
 
-    $form['add'] = array(
+    $form['add'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Add a person entry'),
-    );
-    $form['add']['name'] = array(
+    ];
+    $form['add']['name'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Name'),
       '#size' => 15,
-    );
-    $form['add']['surname'] = array(
+    ];
+    $form['add']['surname'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Surname'),
       '#size' => 15,
-    );
-    $form['add']['age'] = array(
+    ];
+    $form['add']['age'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Age'),
       '#size' => 5,
       '#description' => $this->t("Values greater than 127 will cause an exception. Try it - it's a great example why exception handling is needed with DTBNG."),
-    );
-    $form['add']['submit'] = array(
+    ];
+    $form['add']['submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Add'),
-    );
+    ];
 
     return $form;
   }
@@ -115,15 +115,15 @@ class DbtngExampleAddForm implements FormInterface, ContainerInjectionInterface
     // Gather the current user so the new record has ownership.
     $account = $this->currentUser;
     // Save the submitted entry.
-    $entry = array(
+    $entry = [
       'name' => $form_state->getValue('name'),
       'surname' => $form_state->getValue('surname'),
       'age' => $form_state->getValue('age'),
       'uid' => $account->id(),
-    );
+    ];
     $return = DbtngExampleStorage::insert($entry);
     if ($return) {
-      drupal_set_message($this->t('Created entry @entry', array('@entry' => print_r($entry, TRUE))));
+      drupal_set_message($this->t('Created entry @entry', ['@entry' => print_r($entry, TRUE)]));
     }
   }
 
diff --git a/dbtng_example/src/Form/DbtngExampleUpdateForm.php b/dbtng_example/src/Form/DbtngExampleUpdateForm.php
index e279e92..8226bd9 100644
--- a/dbtng_example/src/Form/DbtngExampleUpdateForm.php
+++ b/dbtng_example/src/Form/DbtngExampleUpdateForm.php
@@ -23,32 +23,32 @@ class DbtngExampleUpdateForm extends FormBase {
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
     // Wrap the form in a div.
-    $form = array(
+    $form = [
       '#prefix' => '<div id="updateform">',
       '#suffix' => '</div>',
-    );
+    ];
     // Add some explanatory text to the form.
-    $form['message'] = array(
+    $form['message'] = [
       '#markup' => $this->t('Demonstrates a database update operation.'),
-    );
+    ];
     // Query for items to display.
     $entries = DbtngExampleStorage::load();
     // Tell the user if there is nothing to display.
     if (empty($entries)) {
-      $form['no_values'] = array(
+      $form['no_values'] = [
         '#value' => t('No entries exist in the table dbtng_example table.'),
-      );
+      ];
       return $form;
     }
 
-    $keyed_entries = array();
+    $keyed_entries = [];
     foreach ($entries as $entry) {
-      $options[$entry->pid] = t('@pid: @name @surname (@age)', array(
+      $options[$entry->pid] = t('@pid: @name @surname (@age)', [
         '@pid' => $entry->pid,
         '@name' => $entry->name,
         '@surname' => $entry->surname,
         '@age' => $entry->age,
-      ));
+      ]);
       $keyed_entries[$entry->pid] = $entry;
     }
 
@@ -61,42 +61,42 @@ class DbtngExampleUpdateForm extends FormBase {
     // doesn't need to repeat the query.
     $form_state->setValue('entries', $keyed_entries);
 
-    $form['pid'] = array(
+    $form['pid'] = [
       '#type' => 'select',
       '#options' => $options,
       '#title' => t('Choose entry to update'),
       '#default_value' => $default_entry->pid,
-      '#ajax' => array(
+      '#ajax' => [
         'wrapper' => 'updateform',
-        'callback' => array($this, 'updateCallback'),
-      ),
-    );
+        'callback' => [$this, 'updateCallback'],
+      ],
+    ];
 
-    $form['name'] = array(
+    $form['name'] = [
       '#type' => 'textfield',
       '#title' => t('Updated first name'),
       '#size' => 15,
       '#default_value' => $default_entry->name,
-    );
+    ];
 
-    $form['surname'] = array(
+    $form['surname'] = [
       '#type' => 'textfield',
       '#title' => t('Updated last name'),
       '#size' => 15,
       '#default_value' => $default_entry->surname,
-    );
-    $form['age'] = array(
+    ];
+    $form['age'] = [
       '#type' => 'textfield',
       '#title' => t('Updated age'),
       '#size' => 4,
       '#default_value' => $default_entry->age,
       '#description' => t('Values greater than 127 will cause an exception'),
-    );
+    ];
 
-    $form['submit'] = array(
+    $form['submit'] = [
       '#type' => 'submit',
       '#value' => t('Update'),
-    );
+    ];
     return $form;
   }
 
@@ -113,7 +113,7 @@ class DbtngExampleUpdateForm extends FormBase {
     // Setting the #value of items is the only way I was able to figure out
     // to get replaced defaults on these items. #default_value will not do it
     // and shouldn't.
-    foreach (array('name', 'surname', 'age') as $item) {
+    foreach (['name', 'surname', 'age'] as $item) {
       $form[$item]['#value'] = $entry->$item;
     }
     return $form;
@@ -136,18 +136,18 @@ class DbtngExampleUpdateForm extends FormBase {
     // Gather the current user so the new record has ownership.
     $account = $this->currentUser();
     // Save the submitted entry.
-    $entry = array(
+    $entry = [
       'pid' => $form_state->getValue('pid'),
       'name' => $form_state->getValue('name'),
       'surname' => $form_state->getValue('surname'),
       'age' => $form_state->getValue('age'),
       'uid' => $account->id(),
-    );
+    ];
     $count = DbtngExampleStorage::update($entry);
-    drupal_set_message(t('Updated entry @entry (@count row updated)', array(
+    drupal_set_message(t('Updated entry @entry (@count row updated)', [
       '@count' => $count,
       '@entry' => print_r($entry, TRUE),
-    )));
+    ]));
   }
 
 }
diff --git a/dbtng_example/tests/src/Functional/DbtngExampleTest.php b/dbtng_example/tests/src/Functional/DbtngExampleTest.php
index 78fd892..2d53c9f 100644
--- a/dbtng_example/tests/src/Functional/DbtngExampleTest.php
+++ b/dbtng_example/tests/src/Functional/DbtngExampleTest.php
@@ -20,7 +20,7 @@ class DbtngExampleTest extends ExamplesBrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('dbtng_example');
+  public static $modules = ['dbtng_example'];
 
   /**
    * The installation profile to use with this test.
@@ -70,16 +70,16 @@ class DbtngExampleTest extends ExamplesBrowserTestBase {
    *   - The value is an array of links that should appear on that page.
    */
   protected function providerMenuLinks() {
-    return array(
-      '' => array(
+    return [
+      '' => [
         '/examples/dbtng-example',
-      ),
-      '/examples/dbtng-example' => array(
+      ],
+      '/examples/dbtng-example' => [
         '/examples/dbtng-example/add',
         '/examples/dbtng-example/update',
         '/examples/dbtng-example/advanced',
-      ),
-    );
+      ],
+    ];
   }
 
   /**
@@ -98,11 +98,11 @@ class DbtngExampleTest extends ExamplesBrowserTestBase {
     // Add the new entry.
     $this->drupalPostForm(
       '/examples/dbtng-example/add',
-      array(
+      [
         'name' => 'Some',
         'surname' => 'Anonymous',
         'age' => 33,
-      ),
+      ],
       'Add'
     );
     // Now find the new entry.
@@ -110,7 +110,7 @@ class DbtngExampleTest extends ExamplesBrowserTestBase {
     $assert->pageTextMatches('%Some[td/<>\w\s]+Anonymous%');
     // Try the update tab.
     // Find out the pid of our "anonymous" guy.
-    $result = DbtngExampleStorage::load(array('surname' => 'Anonymous'));
+    $result = DbtngExampleStorage::load(['surname' => 'Anonymous']);
     $this->drupalGet('/examples/dbtng-example');
     $this->assertCount(1, $result, 'Did not find one entry in the table with surname = "Anonymous".');
     $entry = $result[0];
@@ -134,11 +134,11 @@ class DbtngExampleTest extends ExamplesBrowserTestBase {
     $this->drupalLogout();
     $this->drupalPostForm(
       '/examples/dbtng-example/add',
-      array(
+      [
         'name' => 'Anonymous',
         'surname' => 'UserCannotPost',
         'age' => 'not a number',
-      ),
+      ],
       'Add'
     );
     $assert->pageTextContains('You must be logged in to add values to the database.');
@@ -150,19 +150,19 @@ class DbtngExampleTest extends ExamplesBrowserTestBase {
    */
   public function testDbtngExampleStorage() {
     // Create a new entry.
-    $entry = array(
+    $entry = [
       'name' => 'James',
       'surname' => 'Doe',
       'age' => 23,
-    );
+    ];
     DbtngExampleStorage::insert($entry);
 
     // Save another entry.
-    $entry = array(
+    $entry = [
       'name' => 'Jane',
       'surname' => 'NotDoe',
       'age' => 19,
-    );
+    ];
     DbtngExampleStorage::insert($entry);
 
     // Verify that 4 records are found in the database.
@@ -170,11 +170,11 @@ class DbtngExampleTest extends ExamplesBrowserTestBase {
     $this->assertCount(4, $result);
 
     // Verify 2 of these records have 'Doe' as surname.
-    $result = DbtngExampleStorage::load(array('surname' => 'Doe'));
+    $result = DbtngExampleStorage::load(['surname' => 'Doe']);
     $this->assertCount(2, $result, 'Did not find two entries in the table with surname = "Doe".');
 
     // Now find our not-Doe entry.
-    $result = DbtngExampleStorage::load(array('surname' => 'NotDoe'));
+    $result = DbtngExampleStorage::load(['surname' => 'NotDoe']);
     // Found one entry in the table with surname "NotDoe'.
     $this->assertCount(1, $result, 'Did not find one entry in the table with surname "NotDoe');
     // Our NotDoe will be changed to "NowDoe".
@@ -183,11 +183,11 @@ class DbtngExampleTest extends ExamplesBrowserTestBase {
     // update() returns the number of entries updated.
     $this->assertNotEquals(DbtngExampleStorage::update((array) $entry), 0);
 
-    $result = DbtngExampleStorage::load(array('surname' => 'NowDoe'));
+    $result = DbtngExampleStorage::load(['surname' => 'NowDoe']);
     $this->assertCount(1, $result, "Did not find renamed 'NowDoe' surname.");
 
     // Read only John Doe entry.
-    $result = DbtngExampleStorage::load(array('name' => 'John', 'surname' => 'Doe'));
+    $result = DbtngExampleStorage::load(['name' => 'John', 'surname' => 'Doe']);
     $this->assertCount(1, $result, 'Did not find one entry for John Doe.');
 
     // Get the entry.
@@ -199,7 +199,7 @@ class DbtngExampleTest extends ExamplesBrowserTestBase {
 
     // Find entries with age = 45.
     // Read only John Doe entry.
-    $result = DbtngExampleStorage::load(array('surname' => 'NowDoe'));
+    $result = DbtngExampleStorage::load(['surname' => 'NowDoe']);
     // Found one entry with surname = Nowdoe.
     $this->assertCount(1, $result, 'Did not find one entry with surname = Nowdoe.');
 
diff --git a/email_example/email_example.module b/email_example/email_example.module
index 676b4a2..94beb6c 100644
--- a/email_example/email_example.module
+++ b/email_example/email_example.module
@@ -44,18 +44,18 @@ function email_example_mail($key, &$message, $params) {
   // current user's selected language, depending on the type of e-mail being
   // sent. This $options array is used later in the t() calls for subject
   // and body to ensure the proper translation takes effect.
-  $options = array(
+  $options = [
     'langcode' => $message['langcode'],
-  );
+  ];
 
   switch ($key) {
     // Send a simple message from the contact form.
     case 'contact_message':
       $from = \Drupal::config('system.site')->get('mail');
-      $message['subject'] = t('E-mail sent from @site-name', array('@site-name' => $from), $options);
+      $message['subject'] = t('E-mail sent from @site-name', ['@site-name' => $from], $options);
       // Note that the message body is an array, not a string.
       $account = \Drupal::currentUser();
-      $message['body'][] = t('@name sent you the following message:', array('@name' => $account->getUsername()), $options);
+      $message['body'][] = t('@name sent you the following message:', ['@name' => $account->getUsername()], $options);
       // Because this is just user-entered text, we do not need to translate it.
       // Since user-entered text may have unintentional HTML entities in it like
       // '<' or '>', we need to make sure these entities are properly escaped,
@@ -80,11 +80,11 @@ function email_example_mail_alter(&$message) {
   // For the purpose of this example, modify all the outgoing messages and
   // attach a site signature. The signature will be translated to the language
   // in which message was built.
-  $options = array(
+  $options = [
     'langcode' => $message['langcode'],
-  );
+  ];
 
-  $signature = t("\n--\nMail altered by email_example module.", array(), $options);
+  $signature = t("\n--\nMail altered by email_example module.", [], $options);
   if (is_array($message['body'])) {
     $message['body'][] = $signature;
   }
diff --git a/email_example/src/Form/EmailExampleGetFormPage.php b/email_example/src/Form/EmailExampleGetFormPage.php
index 4b17d13..8951e05 100644
--- a/email_example/src/Form/EmailExampleGetFormPage.php
+++ b/email_example/src/Form/EmailExampleGetFormPage.php
@@ -63,23 +63,23 @@ class EmailExampleGetFormPage extends FormBase {
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    $form['intro'] = array(
+    $form['intro'] = [
       '#markup' => t('Use this form to send a message to an e-mail address. No spamming!'),
-    );
-    $form['email'] = array(
+    ];
+    $form['email'] = [
       '#type' => 'textfield',
       '#title' => t('E-mail address'),
       '#required' => TRUE,
-    );
-    $form['message'] = array(
+    ];
+    $form['message'] = [
       '#type' => 'textarea',
       '#title' => t('Message'),
       '#required' => TRUE,
-    );
-    $form['submit'] = array(
+    ];
+    $form['submit'] = [
       '#type' => 'submit',
       '#value' => t('Submit'),
-    );
+    ];
     return $form;
   }
 
diff --git a/email_example/tests/src/Functional/EmailExampleTest.php b/email_example/tests/src/Functional/EmailExampleTest.php
index 5e44b15..6001db2 100644
--- a/email_example/tests/src/Functional/EmailExampleTest.php
+++ b/email_example/tests/src/Functional/EmailExampleTest.php
@@ -22,7 +22,7 @@ class EmailExampleTest extends ExamplesBrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('email_example');
+  public static $modules = ['email_example'];
 
   /**
    * The installation profile to use with this test.
@@ -55,7 +55,7 @@ class EmailExampleTest extends ExamplesBrowserTestBase {
     $assert->fieldValueEquals('edit-message', NULL);
 
     // Verifiy email form is submitted.
-    $edit = array('email' => 'example@example.com', 'message' => 'test');
+    $edit = ['email' => 'example@example.com', 'message' => 'test'];
     $this->drupalPostForm('examples/email-example', $edit, t('Submit'));
     $assert->statusCodeEquals(200);
 
@@ -65,10 +65,10 @@ class EmailExampleTest extends ExamplesBrowserTestBase {
 
     // Verifiy correct email recieved.
     $from = \Drupal::config('system.site')->get('mail');
-    $t_options = array('langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId());
-    $this->assertMailString('subject', t('E-mail sent from @site-name', array('@site-name' => $from), $t_options), 1);
+    $t_options = ['langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId()];
+    $this->assertMailString('subject', t('E-mail sent from @site-name', ['@site-name' => $from], $t_options), 1);
     $this->assertMailString('body', $edit['message'], 1);
-    $this->assertMailString('body', t("\n--\nMail altered by email_example module.", array(), $t_options), 1);
+    $this->assertMailString('body', t("\n--\nMail altered by email_example module.", [], $t_options), 1);
   }
 
 }
diff --git a/events_example/src/EventSubscriber/EventsExampleSubscriber.php b/events_example/src/EventSubscriber/EventsExampleSubscriber.php
index 4691e27..c78cfd9 100644
--- a/events_example/src/EventSubscriber/EventsExampleSubscriber.php
+++ b/events_example/src/EventSubscriber/EventsExampleSubscriber.php
@@ -54,12 +54,12 @@ class EventsExampleSubscriber implements EventSubscriberInterface {
     // For each event key define an array of arrays composed of the method names
     // to call and optional priorities. The method name here refers to a method
     // on this class to call whenever the event is triggered.
-    $events[IncidentEvents::NEW_REPORT][] = array('notifyMario');
+    $events[IncidentEvents::NEW_REPORT][] = ['notifyMario'];
 
     // Subscribers can optionally set a priority. If more than one subscriber is
     // listening to an event when it is triggered they will be executed in order
     // of priority. If no priority is set the default is 0.
-    $events[IncidentEvents::NEW_REPORT][] = array('notifyBatman', -100);
+    $events[IncidentEvents::NEW_REPORT][] = ['notifyBatman', -100];
 
     return $events;
   }
diff --git a/examples.module b/examples.module
index fe3fa72..d5676fa 100644
--- a/examples.module
+++ b/examples.module
@@ -34,7 +34,7 @@ use Drupal\Core\Url;
 function examples_toolbar() {
   // First, build an array of all example modules and their routes.
   // We resort to this hard-coded way so as not to muck up each example.
-  $examples = array(
+  $examples = [
     'block_example' => 'block_example.description',
     'cache_example' => 'cache_example.description',
     'config_entity_example' => 'entity.robot.list',
@@ -60,65 +60,65 @@ function examples_toolbar() {
     'queue_example' => 'queue_example',
     'tablesort_example' => 'tablesort_example_description',
     'tour_example' => 'tour_example_description',
-  );
+  ];
 
   // Build a list of links for the menu.
-  $links = array();
+  $links = [];
   foreach ($examples as $module => $route) {
     // Get the module info (title, description) from Drupal.
     $info = system_get_info('module', $module);
 
     // If there's no info, the example isn't enabled, so don't display it.
     if (!empty($info)) {
-      $links[$module] = array(
+      $links[$module] = [
         'title' => t($info['name']),
         'url' => Url::fromRoute($route),
-        'attributes' => array(
+        'attributes' => [
           'title' => t($info['description']),
-        ),
-      );
+        ],
+      ];
     }
   }
 
   // Add a link to enable all examples.
-  $links['enable_examples'] = array(
+  $links['enable_examples'] = [
     'title' => t('Enable Examples'),
     'url' => Url::fromRoute('system.modules_list'),
-    'options' => array(
+    'options' => [
       'title' => t('Enable more examples in on the Extend page.'),
-    ),
+    ],
     'fragment' => 'edit-modules-example-modules',
-  );
+  ];
 
   // Create the examples toolbar render array.
-  $items['examples'] = array(
+  $items['examples'] = [
     '#type' => 'toolbar_item',
-    'tab' => array(
+    'tab' => [
       '#type' => 'link',
       '#title' => t('Examples'),
       '#url' => Url::fromRoute('<front>'),
-      '#attributes' => array(
+      '#attributes' => [
         'title' => t('Developer Examples'),
-        'class' => array('toolbar-icon', 'toolbar-icon-examples'),
-      ),
-    ),
-    'tray' => array(
+        'class' => ['toolbar-icon', 'toolbar-icon-examples'],
+      ],
+    ],
+    'tray' => [
       '#heading' => t('Developer Examples'),
-      'shortcuts' => array(
+      'shortcuts' => [
         '#theme' => 'links__toolbar_example',
         '#links' => $links,
-        '#attributes' => array(
-          'class' => array('toolbar-menu'),
-        ),
-      ),
-    ),
+        '#attributes' => [
+          'class' => ['toolbar-menu'],
+        ],
+      ],
+    ],
     '#weight' => 99,
-    '#attached' => array(
-      'library' => array(
+    '#attached' => [
+      'library' => [
         'examples/examples.icons',
-      ),
-    ),
-  );
+      ],
+    ],
+  ];
 
   return $items;
 }
diff --git a/fapi_example/src/Form/AjaxAddMore.php b/fapi_example/src/Form/AjaxAddMore.php
index a8d0477..dd4ba7c 100644
--- a/fapi_example/src/Form/AjaxAddMore.php
+++ b/fapi_example/src/Form/AjaxAddMore.php
@@ -22,9 +22,9 @@ class AjaxAddMore extends DemoBase {
    * the corresponding "remove" button.
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    $form['description'] = array(
+    $form['description'] = [
       '#markup' => '<div>' . t('This example shows an add-more and a remove-last button.') . '</div>',
-    );
+    ];
 
     // Gather the number of names in the form already.
     $num_names = $form_state->get('num_names');
@@ -55,7 +55,7 @@ class AjaxAddMore extends DemoBase {
     $form['names_fieldset']['actions']['add_name'] = [
       '#type' => 'submit',
       '#value' => t('Add one more'),
-      '#submit' => array('::addOne'),
+      '#submit' => ['::addOne'],
       '#ajax' => [
         'callback' => '::addmoreCallback',
         'wrapper' => 'names-fieldset-wrapper',
@@ -66,7 +66,7 @@ class AjaxAddMore extends DemoBase {
       $form['names_fieldset']['actions']['remove_name'] = [
         '#type' => 'submit',
         '#value' => t('Remove one'),
-        '#submit' => array('::removeCallback'),
+        '#submit' => ['::removeCallback'],
         '#ajax' => [
           'callback' => '::addmoreCallback',
           'wrapper' => 'names-fieldset-wrapper',
@@ -131,11 +131,11 @@ class AjaxAddMore extends DemoBase {
    * Reports what values were finally set.
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-    $values = $form_state->getValue(array('names_fieldset', 'name'));
+    $values = $form_state->getValue(['names_fieldset', 'name']);
 
-    $output = t('These people are coming to the picnic: @names', array(
+    $output = t('These people are coming to the picnic: @names', [
       '@names' => implode(', ', $values),
-    )
+    ]
     );
     drupal_set_message($output);
   }
diff --git a/fapi_example/src/Form/InputDemo.php b/fapi_example/src/Form/InputDemo.php
index cf64831..a1ede00 100644
--- a/fapi_example/src/Form/InputDemo.php
+++ b/fapi_example/src/Form/InputDemo.php
@@ -215,7 +215,7 @@ class InputDemo extends FormBase {
       // Only display for controls that have titles and values.
       if ($value && $label) {
         $display_value = is_array($value) ? preg_replace('/[\n\r\s]+/', ' ', print_r($value, 1)) : $value;
-        $message = $this->t('Value for %title: %value', array('%title' => $label, '%value' => $display_value));
+        $message = $this->t('Value for %title: %value', ['%title' => $label, '%value' => $display_value]);
         drupal_set_message($message);
       }
     }
diff --git a/fapi_example/tests/src/Functional/FapiExampleWebTest.php b/fapi_example/tests/src/Functional/FapiExampleWebTest.php
index b2f6292..aefc11e 100644
--- a/fapi_example/tests/src/Functional/FapiExampleWebTest.php
+++ b/fapi_example/tests/src/Functional/FapiExampleWebTest.php
@@ -20,7 +20,7 @@ class FapiExampleWebTest extends ExamplesBrowserTestBase {
    *
    * @var array List of test dependencies.
    */
-  static public $modules = array('fapi_example');
+  static public $modules = ['fapi_example'];
 
   /**
    * The installation profile to use with this test.
@@ -289,7 +289,7 @@ class FapiExampleWebTest extends ExamplesBrowserTestBase {
 
     // Enter the value in field-1.
     // and click on 'Add one more' button.
-    $edit = array();
+    $edit = [];
     $edit['names_fieldset[name][0]'] = $name_one;
     $this->drupalPostForm('/examples/fapi-example/ajax-addmore', $edit, t('Add one more'));
 
diff --git a/field_example/src/FieldExampleWebTestBase.php b/field_example/src/FieldExampleWebTestBase.php
index 933a7ee..869e7a1 100644
--- a/field_example/src/FieldExampleWebTestBase.php
+++ b/field_example/src/FieldExampleWebTestBase.php
@@ -42,7 +42,7 @@ class FieldExampleWebTestBase extends ExamplesTestBase {
    *
    * @var array
    */
-  public static $modules = array('block', 'node', 'field_ui', 'field_example');
+  public static $modules = ['block', 'node', 'field_ui', 'field_example'];
 
   /**
    * {@inheritdoc}
@@ -54,32 +54,32 @@ class FieldExampleWebTestBase extends ExamplesTestBase {
     parent::setUp();
 
     // Create and login a user that creates the content type.
-    $permissions = array(
+    $permissions = [
       'administer content types',
       'administer node fields',
       'administer node form display',
       'administer node display',
-    );
+    ];
     $this->administratorAccount = $this->drupalCreateUser($permissions);
     parent::drupalLogin($this->administratorAccount);
 
     // Prepare a new content type where the field will be added.
     $this->contentTypeName = strtolower($this->randomMachineName(10));
     $this->drupalGet('admin/structure/types/add');
-    $edit = array(
+    $edit = [
       'name' => $this->contentTypeName,
       'type' => $this->contentTypeName,
-    );
+    ];
     $this->drupalPostForm(NULL, $edit, t('Save and manage fields'));
-    $this->assertText(t('The content type @name has been added.', array('@name' => $this->contentTypeName)));
+    $this->assertText(t('The content type @name has been added.', ['@name' => $this->contentTypeName]));
 
     // Reset the permission cache.
     $create_permission = 'create ' . $this->contentTypeName . ' content';
-    $this->checkPermissions(array($create_permission), TRUE);
+    $this->checkPermissions([$create_permission], TRUE);
 
     // Now that we have a new content type, create a user that has privileges
     // on the content type.
-    $this->authorAccount = $this->drupalCreateUser(array($create_permission));
+    $this->authorAccount = $this->drupalCreateUser([$create_permission]);
   }
 
   /**
@@ -107,53 +107,53 @@ class FieldExampleWebTestBase extends ExamplesTestBase {
     $field_name = strtolower($this->randomMachineName(10));
 
     // Fill out the field form.
-    $edit = array(
+    $edit = [
       'new_storage_type' => $type,
       'field_name' => $field_name,
       'label' => $field_name,
-    );
+    ];
     $this->drupalPostForm(NULL, $edit, t('Save and continue'));
 
     // Fill out the $cardinality form as if we're not using an unlimited number
     // of values.
-    $edit = array(
+    $edit = [
       'cardinality' => 'number',
       'cardinality_number' => (string) $cardinality,
-    );
+    ];
     // If we have -1 for $cardinality, we should change the form's drop-down
     // from 'Number' to 'Unlimited'.
     if (-1 == $cardinality) {
-      $edit = array(
+      $edit = [
         'cardinality' => '-1',
         'cardinality_number' => '1',
-      );
+      ];
     }
 
     // And now we save the cardinality settings.
     $this->drupalPostForm(NULL, $edit, t('Save field settings'));
     debug(
       t('Saved settings for field %field_name with widget %widget_type and cardinality %cardinality',
-        array(
+        [
           '%field_name' => $field_name,
           '%widget_type' => $widget_type,
           '%cardinality' => $cardinality,
-        )
+        ]
       )
     );
-    $this->assertText(t('Updated field @name field settings.', array('@name' => $field_name)));
+    $this->assertText(t('Updated field @name field settings.', ['@name' => $field_name]));
 
     // Set the widget type for the newly created field.
     $this->drupalGet('admin/structure/types/manage/' . $this->contentTypeName . '/form-display');
-    $edit = array(
+    $edit = [
       'fields[field_' . $field_name . '][type]' => $widget_type,
-    );
+    ];
     $this->drupalPostForm(NULL, $edit, t('Save'));
 
     // Set the field formatter for the newly created field.
     $this->drupalGet('admin/structure/types/manage/' . $this->contentTypeName . '/display');
-    $edit1 = array(
+    $edit1 = [
       'fields[field_' . $field_name . '][type]' => $fieldFormatter,
-    );
+    ];
     $this->drupalPostForm(NULL, $edit1, t('Save'));
 
     return $field_name;
diff --git a/field_example/src/Plugin/Field/FieldFormatter/ColorBackgroudFormatter.php b/field_example/src/Plugin/Field/FieldFormatter/ColorBackgroudFormatter.php
index 515d020..581bce3 100644
--- a/field_example/src/Plugin/Field/FieldFormatter/ColorBackgroudFormatter.php
+++ b/field_example/src/Plugin/Field/FieldFormatter/ColorBackgroudFormatter.php
@@ -22,17 +22,17 @@ class ColorBackgroudFormatter extends FormatterBase {
    * {@inheritdoc}
    */
   public function viewElements(FieldItemListInterface $items, $langcode) {
-    $elements = array();
+    $elements = [];
 
     foreach ($items as $delta => $item) {
-      $elements[$delta] = array(
+      $elements[$delta] = [
         '#type' => 'html_tag',
         '#tag' => 'p',
-        '#value' => t('The content area color has been changed to @code', array('@code' => $item->value)),
-        '#attributes' => array(
+        '#value' => t('The content area color has been changed to @code', ['@code' => $item->value]),
+        '#attributes' => [
           'style' => 'background-color: ' . $item->value,
-        ),
-      );
+        ],
+      ];
     }
     return $elements;
   }
diff --git a/field_example/src/Plugin/Field/FieldFormatter/SimpleTextFormatter.php b/field_example/src/Plugin/Field/FieldFormatter/SimpleTextFormatter.php
index 070cf97..6a382a4 100644
--- a/field_example/src/Plugin/Field/FieldFormatter/SimpleTextFormatter.php
+++ b/field_example/src/Plugin/Field/FieldFormatter/SimpleTextFormatter.php
@@ -23,20 +23,20 @@ class SimpleTextFormatter extends FormatterBase {
    * {@inheritdoc}
    */
   public function viewElements(FieldItemListInterface $items, $langcode) {
-    $elements = array();
+    $elements = [];
 
     foreach ($items as $delta => $item) {
-      $elements[$delta] = array(
+      $elements[$delta] = [
         // We create a render array to produce the desired markup,
         // "<p style="color: #hexcolor">The color code ... #hexcolor</p>".
         // See theme_html_tag().
         '#type' => 'html_tag',
         '#tag' => 'p',
-        '#attributes' => array(
+        '#attributes' => [
           'style' => 'color: ' . $item->value,
-        ),
-        '#value' => $this->t('The color code in this field is @code', array('@code' => $item->value)),
-      );
+        ],
+        '#value' => $this->t('The color code in this field is @code', ['@code' => $item->value]),
+      ];
     }
 
     return $elements;
diff --git a/field_example/src/Plugin/Field/FieldType/RgbItem.php b/field_example/src/Plugin/Field/FieldType/RgbItem.php
index cbe8fd8..55c0617 100644
--- a/field_example/src/Plugin/Field/FieldType/RgbItem.php
+++ b/field_example/src/Plugin/Field/FieldType/RgbItem.php
@@ -23,15 +23,15 @@ class RgbItem extends FieldItemBase {
    * {@inheritdoc}
    */
   public static function schema(FieldStorageDefinitionInterface $field_definition) {
-    return array(
-      'columns' => array(
-        'value' => array(
+    return [
+      'columns' => [
+        'value' => [
           'type' => 'text',
           'size' => 'tiny',
           'not null' => FALSE,
-        ),
-      ),
-    );
+        ],
+      ],
+    ];
   }
 
   /**
diff --git a/field_example/src/Plugin/Field/FieldWidget/ColorPickerWidget.php b/field_example/src/Plugin/Field/FieldWidget/ColorPickerWidget.php
index e75e1f0..ebe07b8 100644
--- a/field_example/src/Plugin/Field/FieldWidget/ColorPickerWidget.php
+++ b/field_example/src/Plugin/Field/FieldWidget/ColorPickerWidget.php
@@ -24,18 +24,18 @@ class ColorPickerWidget extends TextWidget {
    */
   public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
     $element = parent::formElement($items, $delta, $element, $form, $form_state);
-    $element['value'] += array(
+    $element['value'] += [
       '#suffix' => '<div class="field-example-colorpicker"></div>',
-      '#attributes' => array('class' => array('edit-field-example-colorpicker')),
-      '#attached' => array(
+      '#attributes' => ['class' => ['edit-field-example-colorpicker']],
+      '#attached' => [
         // Add Farbtastic color picker and javascript file to trigger the
         // colorpicker.
-        'library' => array(
+        'library' => [
           'core/jquery.farbtastic',
           'field_example/colorpicker',
-        ),
-      ),
-    );
+        ],
+      ],
+    ];
 
     return $element;
   }
diff --git a/field_example/src/Plugin/Field/FieldWidget/Text3Widget.php b/field_example/src/Plugin/Field/FieldWidget/Text3Widget.php
index 59e344b..f8690a4 100644
--- a/field_example/src/Plugin/Field/FieldWidget/Text3Widget.php
+++ b/field_example/src/Plugin/Field/FieldWidget/Text3Widget.php
@@ -30,34 +30,34 @@ class Text3Widget extends WidgetBase {
       preg_match_all('@..@', substr($value, 1), $match);
     }
     else {
-      $match = array(array());
+      $match = [[]];
     }
 
     // Set up the form element for this widget.
-    $element += array(
+    $element += [
       '#type' => 'details',
-      '#element_validate' => array(
-        array($this, 'validate'),
-      ),
-    );
+      '#element_validate' => [
+        [$this, 'validate'],
+      ],
+    ];
 
     // Add in the RGB textfield elements.
-    foreach (array('r' => t('Red'), 'g' => t('Green'), 'b' => t('Blue')) as $key => $title) {
-      $element[$key] = array(
+    foreach (['r' => t('Red'), 'g' => t('Green'), 'b' => t('Blue')] as $key => $title) {
+      $element[$key] = [
         '#type' => 'textfield',
         '#title' => $title,
         '#size' => 2,
         '#default_value' => array_shift($match[0]),
-        '#attributes' => array('class' => array('rgb-entry')),
-        '#description' => t('The 2-digit hexadecimal representation of @color saturation, like "a1" or "ff"', array('@color' => $title)),
-      );
+        '#attributes' => ['class' => ['rgb-entry']],
+        '#description' => t('The 2-digit hexadecimal representation of @color saturation, like "a1" or "ff"', ['@color' => $title]),
+      ];
       // Since Form API doesn't allow a fieldset to be required, we
       // have to require each field element individually.
       if ($element['#required']) {
         $element[$key]['#required'] = TRUE;
       }
     }
-    return array('value' => $element);
+    return ['value' => $element];
   }
 
   /**
@@ -65,8 +65,8 @@ class Text3Widget extends WidgetBase {
    */
   public function validate($element, FormStateInterface $form_state) {
     // Validate each of the textfield entries.
-    $values = array();
-    foreach (array('r', 'g', 'b') as $colorfield) {
+    $values = [];
+    foreach (['r', 'g', 'b'] as $colorfield) {
       $values[$colorfield] = $element[$colorfield]['#value'];
       // If they left any empty, we'll set the value empty and quit.
       if (strlen($values[$colorfield]) == 0) {
diff --git a/field_example/src/Plugin/Field/FieldWidget/TextWidget.php b/field_example/src/Plugin/Field/FieldWidget/TextWidget.php
index 908e743..fcebc2d 100644
--- a/field_example/src/Plugin/Field/FieldWidget/TextWidget.php
+++ b/field_example/src/Plugin/Field/FieldWidget/TextWidget.php
@@ -25,16 +25,16 @@ class TextWidget extends WidgetBase {
    */
   public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
     $value = isset($items[$delta]->value) ? $items[$delta]->value : '';
-    $element += array(
+    $element += [
       '#type' => 'textfield',
       '#default_value' => $value,
       '#size' => 7,
       '#maxlength' => 7,
-      '#element_validate' => array(
-        array($this, 'validate'),
-      ),
-    );
-    return array('value' => $element);
+      '#element_validate' => [
+        [$this, 'validate'],
+      ],
+    ];
+    return ['value' => $element];
   }
 
   /**
diff --git a/field_example/tests/src/Functional/ColorBackgroundFormatterTest.php b/field_example/tests/src/Functional/ColorBackgroundFormatterTest.php
index dc0d60c..711a3dc 100644
--- a/field_example/tests/src/Functional/ColorBackgroundFormatterTest.php
+++ b/field_example/tests/src/Functional/ColorBackgroundFormatterTest.php
@@ -37,14 +37,14 @@ class ColorBackgroundFormatterTest extends FieldExampleBrowserTestBase {
 
     // Details to be submitted for content creation.
     $title = $this->randomMachineName(20);
-    $edit = array(
+    $edit = [
       'title[0][value]' => $title,
       'field_' . $this->fieldName . '[0][value]' => '#00ff00',
-    );
+    ];
 
     // Submit the content creation form.
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    $assert->pageTextContains(t('@type @title has been created', array('@type' => $this->contentTypeName, '@title' => $title)));
+    $assert->pageTextContains(t('@type @title has been created', ['@type' => $this->contentTypeName, '@title' => $title]));
 
     // Verify color.
     $assert->pageTextContains('The content area color has been changed to #00ff00');
@@ -73,22 +73,22 @@ class ColorBackgroundFormatterTest extends FieldExampleBrowserTestBase {
 
     // Details to be submitted for content creation.
     $title = $this->randomMachineName(20);
-    $edit = array(
+    $edit = [
       'title[0][value]' => $title,
       'field_' . $this->fieldName . '[0][value]' => '#00ff00',
-    );
+    ];
 
     // Add another field value.
     $this->drupalPostForm(NULL, $edit, t('Add another item'));
 
     // Set value for newly added item.
-    $edit = array(
+    $edit = [
       'field_' . $this->fieldName . '[1][value]' => '#ffff4f',
-    );
+    ];
 
     // Submit the content creation form.
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    $assert->pageTextContains(t('@type @title has been created', array('@type' => $this->contentTypeName, '@title' => $title)));
+    $assert->pageTextContains(t('@type @title has been created', ['@type' => $this->contentTypeName, '@title' => $title]));
 
     // Verify color.
     $assert->pageTextContains('The content area color has been changed to #00ff00');
diff --git a/field_example/tests/src/Functional/ColorPickerWidgetTest.php b/field_example/tests/src/Functional/ColorPickerWidgetTest.php
index 73b1125..8c23e74 100644
--- a/field_example/tests/src/Functional/ColorPickerWidgetTest.php
+++ b/field_example/tests/src/Functional/ColorPickerWidgetTest.php
@@ -38,14 +38,14 @@ class ColorPickerWidgetTest extends FieldExampleBrowserTestBase {
 
     // Details to be submitted for content creation.
     $title = $this->randomMachineName(20);
-    $edit = array(
+    $edit = [
       'title[0][value]' => $title,
       'field_' . $this->fieldName . '[0][value]' => '#00ff00',
-    );
+    ];
 
     // Submit the content creation form.
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    $assert->pageTextContains(t('@type @title has been created', array('@type' => $this->contentTypeName, '@title' => $title)));
+    $assert->pageTextContains(t('@type @title has been created', ['@type' => $this->contentTypeName, '@title' => $title]));
 
     // Verify color.
     $assert->pageTextContains('The color code in this field is #00ff00');
@@ -74,22 +74,22 @@ class ColorPickerWidgetTest extends FieldExampleBrowserTestBase {
 
     // Details to be submitted for content creation.
     $title = $this->randomMachineName(20);
-    $edit = array(
+    $edit = [
       'title[0][value]' => $title,
       'field_' . $this->fieldName . '[0][value]' => '#00ff00',
-    );
+    ];
 
     // Add another field value.
     $this->drupalPostForm(NULL, $edit, t('Add another item'));
 
     // Set value for newly added item.
-    $edit = array(
+    $edit = [
       'field_' . $this->fieldName . '[1][value]' => '#ffffff',
-    );
+    ];
 
     // Submit the content creation form.
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    $assert->pageTextContains(t('@type @title has been created', array('@type' => $this->contentTypeName, '@title' => $title)));
+    $assert->pageTextContains(t('@type @title has been created', ['@type' => $this->contentTypeName, '@title' => $title]));
 
     // Verify color.
     $assert->pageTextContains('The color code in this field is #00ff00');
diff --git a/field_example/tests/src/Functional/FieldExampleBrowserTestBase.php b/field_example/tests/src/Functional/FieldExampleBrowserTestBase.php
index 2a915ea..0a8b123 100644
--- a/field_example/tests/src/Functional/FieldExampleBrowserTestBase.php
+++ b/field_example/tests/src/Functional/FieldExampleBrowserTestBase.php
@@ -45,7 +45,7 @@ abstract class FieldExampleBrowserTestBase extends ExamplesBrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('block', 'node', 'field_ui', 'field_example');
+  public static $modules = ['block', 'node', 'field_ui', 'field_example'];
 
   /**
    * {@inheritdoc}
@@ -57,32 +57,32 @@ abstract class FieldExampleBrowserTestBase extends ExamplesBrowserTestBase {
     parent::setUp();
 
     // Create and login a user that creates the content type.
-    $permissions = array(
+    $permissions = [
       'administer content types',
       'administer node fields',
       'administer node form display',
       'administer node display',
-    );
+    ];
     $this->administratorAccount = $this->drupalCreateUser($permissions);
     parent::drupalLogin($this->administratorAccount);
 
     // Prepare a new content type where the field will be added.
     $this->contentTypeName = strtolower($this->randomMachineName(10));
     $this->drupalGet('admin/structure/types/add');
-    $edit = array(
+    $edit = [
       'name' => $this->contentTypeName,
       'type' => $this->contentTypeName,
-    );
+    ];
     $this->drupalPostForm(NULL, $edit, t('Save and manage fields'));
-    $this->assertText(t('The content type @name has been added.', array('@name' => $this->contentTypeName)));
+    $this->assertText(t('The content type @name has been added.', ['@name' => $this->contentTypeName]));
 
     // Reset the permission cache.
     $create_permission = 'create ' . $this->contentTypeName . ' content';
-    $this->checkPermissions(array($create_permission), TRUE);
+    $this->checkPermissions([$create_permission], TRUE);
 
     // Now that we have a new content type, create a user that has privileges
     // on the content type.
-    $this->authorAccount = $this->drupalCreateUser(array($create_permission));
+    $this->authorAccount = $this->drupalCreateUser([$create_permission]);
   }
 
   /**
@@ -112,53 +112,53 @@ abstract class FieldExampleBrowserTestBase extends ExamplesBrowserTestBase {
     $field_name = strtolower($this->randomMachineName(10));
 
     // Fill out the field form.
-    $edit = array(
+    $edit = [
       'new_storage_type' => $type,
       'field_name' => $field_name,
       'label' => $field_name,
-    );
+    ];
     $this->drupalPostForm(NULL, $edit, t('Save and continue'));
 
     // Fill out the $cardinality form as if we're not using an unlimited number
     // of values.
-    $edit = array(
+    $edit = [
       'cardinality' => 'number',
       'cardinality_number' => (string) $cardinality,
-    );
+    ];
     // If we have -1 for $cardinality, we should change the form's drop-down
     // from 'Number' to 'Unlimited'.
     if (-1 == $cardinality) {
-      $edit = array(
+      $edit = [
         'cardinality' => '-1',
         'cardinality_number' => '1',
-      );
+      ];
     }
 
     // And now we save the cardinality settings.
     $this->drupalPostForm(NULL, $edit, t('Save field settings'));
     $this->verbose(
       t('Saved settings for field %field_name with widget %widget_type and cardinality %cardinality',
-        array(
+        [
           '%field_name' => $field_name,
           '%widget_type' => $widget_type,
           '%cardinality' => $cardinality,
-        )
+        ]
       )
     );
-    $assert->pageTextContains(t('Updated field @name field settings.', array('@name' => $field_name)));
+    $assert->pageTextContains(t('Updated field @name field settings.', ['@name' => $field_name]));
 
     // Set the widget type for the newly created field.
     $this->drupalGet('admin/structure/types/manage/' . $this->contentTypeName . '/form-display');
-    $edit = array(
+    $edit = [
       'fields[field_' . $field_name . '][type]' => $widget_type,
-    );
+    ];
     $this->drupalPostForm(NULL, $edit, t('Save'));
 
     // Set the field formatter for the newly created field.
     $this->drupalGet('admin/structure/types/manage/' . $this->contentTypeName . '/display');
-    $edit1 = array(
+    $edit1 = [
       'fields[field_' . $field_name . '][type]' => $fieldFormatter,
-    );
+    ];
     $this->drupalPostForm(NULL, $edit1, t('Save'));
 
     return $field_name;
diff --git a/field_example/tests/src/Functional/FieldExampleMenuTest.php b/field_example/tests/src/Functional/FieldExampleMenuTest.php
index c795a0d..bd53c36 100644
--- a/field_example/tests/src/Functional/FieldExampleMenuTest.php
+++ b/field_example/tests/src/Functional/FieldExampleMenuTest.php
@@ -18,7 +18,7 @@ class FieldExampleMenuTest extends FieldExampleBrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('field_example');
+  public static $modules = ['field_example'];
 
   /**
    * The installation profile to use with this test.
diff --git a/field_example/tests/src/Functional/Text3WidgetTest.php b/field_example/tests/src/Functional/Text3WidgetTest.php
index 231db75..e03479d 100644
--- a/field_example/tests/src/Functional/Text3WidgetTest.php
+++ b/field_example/tests/src/Functional/Text3WidgetTest.php
@@ -36,16 +36,16 @@ class Text3WidgetTest extends FieldExampleBrowserTestBase {
 
     // Fill the create form.
     $title = 'test_title';
-    $edit = array(
+    $edit = [
       'title[0][value]' => $title,
       'field_' . $this->fieldName . '[0][value][r]' => '00',
       'field_' . $this->fieldName . '[0][value][g]' => '0a',
       'field_' . $this->fieldName . '[0][value][b]' => '01',
-    );
+    ];
 
     // Create the content.
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    $assert->pageTextContains(t('@type @title has been created', array('@type' => $this->contentTypeName, '@title' => $title)));
+    $assert->pageTextContains(t('@type @title has been created', ['@type' => $this->contentTypeName, '@title' => $title]));
 
     // Verify the value is shown when viewing this node.
     $field_p = $this->xpath("//div[contains(@class,'field--type-field-example-rgb')]/div/p");
@@ -76,24 +76,24 @@ class Text3WidgetTest extends FieldExampleBrowserTestBase {
 
     // Fill the create form.
     $title = $this->randomMachineName(20);
-    $edit = array(
+    $edit = [
       'title[0][value]' => $title,
       'field_' . $this->fieldName . '[0][value][r]' => '00',
       'field_' . $this->fieldName . '[0][value][g]' => 'ff',
       'field_' . $this->fieldName . '[0][value][b]' => '00',
-    );
+    ];
 
     // Add a 2nd item to the multivalue field, so hit "add another".
     $this->drupalPostForm(NULL, $edit, t('Add another item'));
-    $edit = array(
+    $edit = [
       'field_' . $this->fieldName . '[1][value][r]' => 'ff',
       'field_' . $this->fieldName . '[1][value][g]' => 'ff',
       'field_' . $this->fieldName . '[1][value][b]' => 'ff',
-    );
+    ];
 
     // Create the content.
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    $assert->pageTextContains(t('@type @title has been created', array('@type' => $this->contentTypeName, '@title' => $title)));
+    $assert->pageTextContains(t('@type @title has been created', ['@type' => $this->contentTypeName, '@title' => $title]));
 
     // Verify the values are shown when viewing this node.
     $field_p = $this->xpath("//div[contains(@class,'field--type-field-example-rgb')]/div/div/p");
diff --git a/field_example/tests/src/Functional/TextWidgetTest.php b/field_example/tests/src/Functional/TextWidgetTest.php
index 743350f..c7e087b 100644
--- a/field_example/tests/src/Functional/TextWidgetTest.php
+++ b/field_example/tests/src/Functional/TextWidgetTest.php
@@ -40,14 +40,14 @@ class TextWidgetTest extends FieldExampleBrowserTestBase {
 
     // Add a node.
     $title = $this->randomMachineName(20);
-    $edit = array(
+    $edit = [
       'title[0][value]' => $title,
       'field_' . $this->fieldName . '[0][value]' => '#000001',
-    );
+    ];
 
     // Create the content.
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    $assert->pageTextContains(t('@type @title has been created', array('@type' => $this->contentTypeName, '@title' => $title)));
+    $assert->pageTextContains(t('@type @title has been created', ['@type' => $this->contentTypeName, '@title' => $title]));
 
     // Verify the value is shown when viewing this node.
     $field_p = $this->xpath("//div[contains(@class,'field--type-field-example-rgb')]/div/p");
@@ -79,21 +79,21 @@ class TextWidgetTest extends FieldExampleBrowserTestBase {
 
     // Add a node.
     $title = $this->randomMachineName(20);
-    $edit = array(
+    $edit = [
       'title[0][value]' => $title,
       'field_' . $this->fieldName . '[0][value]' => '#00ff00',
-    );
+    ];
 
     // We want to add a 2nd item to the multivalue field, so hit "add another".
     $this->drupalPostForm(NULL, $edit, t('Add another item'));
 
-    $edit = array(
+    $edit = [
       'field_' . $this->fieldName . '[1][value]' => '#ffffff',
-    );
+    ];
 
     // Now we can fill in the second item in the multivalue field and save.
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    $assert->pageTextContains(t('@type @title has been created', array('@type' => $this->contentTypeName, '@title' => $title)));
+    $assert->pageTextContains(t('@type @title has been created', ['@type' => $this->contentTypeName, '@title' => $title]));
 
     // Verify the value is shown when viewing this node.
     $field_p = $this->xpath("//div[contains(@class,'field--type-field-example-rgb')]/div/div/p");
diff --git a/field_permission_example/src/Plugin/Field/FieldFormatter/SimpleTextFormatter.php b/field_permission_example/src/Plugin/Field/FieldFormatter/SimpleTextFormatter.php
index d56e728..ce91470 100644
--- a/field_permission_example/src/Plugin/Field/FieldFormatter/SimpleTextFormatter.php
+++ b/field_permission_example/src/Plugin/Field/FieldFormatter/SimpleTextFormatter.php
@@ -23,24 +23,24 @@ class SimpleTextFormatter extends FormatterBase {
    * {@inheritdoc}
    */
   public function viewElements(FieldItemListInterface $items, $langcode) {
-    $elements = array();
+    $elements = [];
 
     foreach ($items as $delta => $item) {
-      $elements[$delta] = array(
+      $elements[$delta] = [
         // We wrap the fieldnote content up in a div tag.
         '#type' => 'html_tag',
         '#tag' => 'div',
         // This text is auto-XSS escaped.  See docs for the html_tag element.
         '#value' => $item->value,
         // Let's give the note a nice sticky-note CSS appearance.
-        '#attributes' => array(
+        '#attributes' => [
           'class' => 'stickynote',
-        ),
+        ],
         // ..And this is the CSS for the stickynote.
-        '#attached' => array(
-          'library' => array('field_permission_example/fieldnote_sticky'),
-        ),
-      );
+        '#attached' => [
+          'library' => ['field_permission_example/fieldnote_sticky'],
+        ],
+      ];
     }
 
     return $elements;
diff --git a/field_permission_example/src/Plugin/Field/FieldType/FieldNote.php b/field_permission_example/src/Plugin/Field/FieldType/FieldNote.php
index abb812f..0793e16 100644
--- a/field_permission_example/src/Plugin/Field/FieldType/FieldNote.php
+++ b/field_permission_example/src/Plugin/Field/FieldType/FieldNote.php
@@ -23,15 +23,15 @@ class FieldNote extends FieldItemBase {
    * {@inheritdoc}
    */
   public static function schema(FieldStorageDefinitionInterface $field_definition) {
-    return array(
-      'columns' => array(
-        'value' => array(
+    return [
+      'columns' => [
+        'value' => [
           'type' => 'text',
           'size' => 'normal',
           'not null' => FALSE,
-        ),
-      ),
-    );
+        ],
+      ],
+    ];
   }
 
   /**
diff --git a/field_permission_example/src/Plugin/Field/FieldWidget/TextWidget.php b/field_permission_example/src/Plugin/Field/FieldWidget/TextWidget.php
index c229f50..cd24f05 100644
--- a/field_permission_example/src/Plugin/Field/FieldWidget/TextWidget.php
+++ b/field_permission_example/src/Plugin/Field/FieldWidget/TextWidget.php
@@ -25,11 +25,11 @@ class TextWidget extends WidgetBase {
    */
   public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
     $value = isset($items[$delta]->value) ? $items[$delta]->value : '';
-    $element += array(
+    $element += [
       '#type' => 'textarea',
       '#default_value' => $value,
-    );
-    return array('value' => $element);
+    ];
+    return ['value' => $element];
   }
 
 }
diff --git a/file_example/src/Form/FileExampleReadWriteForm.php b/file_example/src/Form/FileExampleReadWriteForm.php
index 4cfc363..4f84949 100644
--- a/file_example/src/Form/FileExampleReadWriteForm.php
+++ b/file_example/src/Form/FileExampleReadWriteForm.php
@@ -203,7 +203,7 @@ class FileExampleReadWriteForm extends FormBase {
   private static function getManagedFile($uri) {
     $fid = Database::getConnection('default')->query(
       'SELECT fid FROM {file_managed} WHERE uri = :uri',
-      array(':uri' => $uri)
+      [':uri' => $uri]
     )->fetchField();
     if (!empty($fid)) {
       $file_object = File::load($fid);
@@ -271,113 +271,113 @@ class FileExampleReadWriteForm extends FormBase {
     $default_file = $this->getDefaultFile();
     $default_directory = $this->getDefaultDirectory();
 
-    $form['description'] = array(
+    $form['description'] = [
       '#markup' => $this->t('This form demonstrates the Drupal 8 file api. Experiment with the form, and then look at the submit handlers in the code to understand the file api.'),
-    );
+    ];
 
-    $form['write_file'] = array(
+    $form['write_file'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Write to a file'),
-    );
-    $form['write_file']['write_contents'] = array(
+    ];
+    $form['write_file']['write_contents'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Enter something you would like to write to a file'),
       '#default_value' => $this->t('Put some text here or just use this text'),
-    );
+    ];
 
-    $form['write_file']['destination'] = array(
+    $form['write_file']['destination'] = [
       '#type' => 'textfield',
       '#default_value' => $default_file,
       '#title' => $this->t('Optional: Enter the streamwrapper saying where it should be written'),
       '#description' => $this->t('This may be public://some_dir/test_file.txt or private://another_dir/some_file.txt, for example. If you include a directory, it must already exist. The default is "public://". Since this example supports session://, you can also use something like session://somefile.txt.'),
-    );
+    ];
 
-    $form['write_file']['managed_submit'] = array(
+    $form['write_file']['managed_submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Write managed file'),
-      '#submit' => array('::handleManagedFile'),
-    );
-    $form['write_file']['unmanaged_submit'] = array(
+      '#submit' => ['::handleManagedFile'],
+    ];
+    $form['write_file']['unmanaged_submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Write unmanaged file'),
-      '#submit' => array('::handleUnmanagedFile'),
-    );
-    $form['write_file']['unmanaged_php'] = array(
+      '#submit' => ['::handleUnmanagedFile'],
+    ];
+    $form['write_file']['unmanaged_php'] = [
       '#type' => 'submit',
       '#value' => $this->t('Unmanaged using PHP'),
-      '#submit' => array('::handleUnmanagedPhp'),
-    );
+      '#submit' => ['::handleUnmanagedPhp'],
+    ];
 
-    $form['fileops'] = array(
+    $form['fileops'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Read from a file'),
-    );
-    $form['fileops']['fileops_file'] = array(
+    ];
+    $form['fileops']['fileops_file'] = [
       '#type' => 'textfield',
       '#default_value' => $default_file,
       '#title' => $this->t('Enter the URI of a file'),
       '#description' => $this->t('This must be a stream-type description like public://some_file.txt or http://drupal.org or private://another_file.txt or (for this example) session://yet_another_file.txt.'),
-    );
-    $form['fileops']['read_submit'] = array(
+    ];
+    $form['fileops']['read_submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Read the file and store it locally'),
-      '#submit' => array('::handleFileRead'),
-    );
-    $form['fileops']['delete_submit'] = array(
+      '#submit' => ['::handleFileRead'],
+    ];
+    $form['fileops']['delete_submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Delete file'),
-      '#submit' => array('::handleFileDelete'),
-    );
-    $form['fileops']['check_submit'] = array(
+      '#submit' => ['::handleFileDelete'],
+    ];
+    $form['fileops']['check_submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Check to see if file exists'),
-      '#submit' => array('::handleFileExists'),
-    );
+      '#submit' => ['::handleFileExists'],
+    ];
 
-    $form['directory'] = array(
+    $form['directory'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Create or prepare a directory'),
-    );
+    ];
 
-    $form['directory']['directory_name'] = array(
+    $form['directory']['directory_name'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Directory to create/prepare/delete'),
       '#default_value' => $default_directory,
       '#description' => $this->t('This is a directory as in public://some/directory or private://another/dir.'),
-    );
-    $form['directory']['create_directory'] = array(
+    ];
+    $form['directory']['create_directory'] = [
       '#type' => 'submit',
       '#value' => $this->t('Create directory'),
-      '#submit' => array('::handleDirectoryCreate'),
-    );
-    $form['directory']['delete_directory'] = array(
+      '#submit' => ['::handleDirectoryCreate'],
+    ];
+    $form['directory']['delete_directory'] = [
       '#type' => 'submit',
       '#value' => $this->t('Delete directory'),
-      '#submit' => array('::handleDirectoryDelete'),
-    );
-    $form['directory']['check_directory'] = array(
+      '#submit' => ['::handleDirectoryDelete'],
+    ];
+    $form['directory']['check_directory'] = [
       '#type' => 'submit',
       '#value' => $this->t('Check to see if directory exists'),
-      '#submit' => array('::handleDirectoryExists'),
-    );
+      '#submit' => ['::handleDirectoryExists'],
+    ];
 
-    $form['debug'] = array(
+    $form['debug'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Debugging'),
-    );
+    ];
     // The Session Wrapper Exampple is not yet committed, so
     // we hide this button until this happens.
-    $form['debug']['show_raw_session'] = array(
+    $form['debug']['show_raw_session'] = [
       '#type' => 'submit',
       '#value' => $this->t('Show raw $_SESSION contents'),
-      '#submit' => array('::handleShowSession'),
+      '#submit' => ['::handleShowSession'],
       '#access' => $this->sessionSchemeEnabled,
-    );
-    $form['debug']['reset_session'] = array(
+    ];
+    $form['debug']['reset_session'] = [
       '#type' => 'submit',
       '#value' => t('Reset the Session'),
-      '#submit' => array('::handleResetSession'),
-    );
+      '#submit' => ['::handleResetSession'],
+    ];
 
     return $form;
   }
@@ -419,12 +419,12 @@ class FileExampleReadWriteForm extends FormBase {
       if ($url) {
         drupal_set_message(
          $this->t('Saved managed file: %file to destination %destination (accessible via <a href=":url">this URL</a>, actual uri=<span id="uri">@uri</span>)',
-            array(
+            [
               '%file' => print_r($file_data, TRUE),
               '%destination' => $uri,
               '@uri' => $file_object->getFileUri(),
               ':url' => $url->toString(),
-            )
+            ]
           )
         );
       }
@@ -432,11 +432,11 @@ class FileExampleReadWriteForm extends FormBase {
         // This Uri is not routable, so we cannot give a link to it.
         drupal_set_message(
          $this->t('Saved managed file: %file to destination %destination (no URL, since this stream type does not support it)',
-            array(
+            [
               '%file' => print_r($file_data, TRUE),
               '%destination' => $uri,
               '@uri' => $file_object->getFileUri(),
-            )
+            ]
           )
         );
 
@@ -483,21 +483,21 @@ class FileExampleReadWriteForm extends FormBase {
       if ($url) {
         drupal_set_message(
          $this->t('Saved file as %filename (accessible via <a href=":url">this URL</a>, uri=<span id="uri">@uri</span>)',
-            array(
+            [
               '%filename' => $filename,
               '@uri' => $filename,
               ':url' => $url->toString(),
-            )
+            ]
           )
         );
       }
       else {
         drupal_set_message(
          $this->t('Saved file as %filename (not accessible externally)',
-            array(
+            [
               '%filename' => $filename,
               '@uri' => $filename,
-            )
+            ]
           )
         );
       }
@@ -546,7 +546,7 @@ class FileExampleReadWriteForm extends FormBase {
     for ($i = 0; $i < $length; $i += $write_size) {
       $result = fwrite($fp, substr($data, $i, $write_size));
       if ($result === FALSE) {
-        drupal_set_message(t('Failed writing to the file %file', array('%file' => $destination)), 'error');
+        drupal_set_message(t('Failed writing to the file %file', ['%file' => $destination]), 'error');
         fclose($fp);
         return;
       }
@@ -556,21 +556,21 @@ class FileExampleReadWriteForm extends FormBase {
     if ($url) {
       drupal_set_message(
        $this->t('Saved file as %filename (accessible via <a href=":url">this URL</a>, uri=<span id="uri">@uri</span>)',
-          array(
+          [
             '%filename' => $destination,
             '@uri' => $destination,
             ':url' => $url->toString(),
-          )
+          ]
         )
       );
     }
     else {
       drupal_set_message(
        $this->t('Saved file as %filename (not accessible externally)',
-          array(
+          [
             '%filename' => $destination,
             '@uri' => $destination,
-          )
+          ]
         )
       );
     }
@@ -608,7 +608,7 @@ class FileExampleReadWriteForm extends FormBase {
     $uri = $form_values['fileops_file'];
 
     if (empty($uri) or !is_file($uri)) {
-      drupal_set_message(t('The file "%uri" does not exist', array('%uri' => $uri)), 'error');
+      drupal_set_message(t('The file "%uri" does not exist', ['%uri' => $uri]), 'error');
       return;
     }
 
@@ -626,19 +626,19 @@ class FileExampleReadWriteForm extends FormBase {
         if ($url) {
           drupal_set_message(
            $this->t('The file was read and copied to %filename which is accessible at <a href=":url">this URL</a>',
-              array(
+              [
                 '%filename' => $sourcename,
                 ':url' => $url->toString(),
-              )
+              ]
             )
           );
         }
         else {
           drupal_set_message(
            $this->t('The file was read and copied to %filename (not accessible externally)',
-              array(
+              [
                 '%filename' => $sourcename,
-              )
+              ]
             )
           );
 
@@ -650,7 +650,7 @@ class FileExampleReadWriteForm extends FormBase {
     }
     else {
       // We failed to get the contents of the requested file.
-      drupal_set_message(t('Failed to retrieve the file %file', array('%file' => $uri)));
+      drupal_set_message(t('Failed to retrieve the file %file', ['%file' => $uri]));
     }
 
   }
@@ -680,15 +680,15 @@ class FileExampleReadWriteForm extends FormBase {
         // This no longer returns a result code.  If things go bad,
         // it will throw an exception:
         file_delete($file_object->id());
-        drupal_set_message(t('Successfully deleted managed file %uri', array('%uri' => $uri)));
+        drupal_set_message(t('Successfully deleted managed file %uri', ['%uri' => $uri]));
         $this->setDefaultFile($uri);
       }
       catch (\Exception $e) {
         drupal_set_message(t('Failed deleting managed file %uri. Result was %result',
-          array(
+          [
             '%uri' => $uri,
             '%result' => print_r($e->getMessage(), TRUE),
-          )
+          ]
         ), 'error');
       }
     }
@@ -696,10 +696,10 @@ class FileExampleReadWriteForm extends FormBase {
     else {
       $result = file_unmanaged_delete($uri);
       if ($result !== TRUE) {
-        drupal_set_message(t('Failed deleting unmanaged file %uri', array('%uri' => $uri, 'error')));
+        drupal_set_message(t('Failed deleting unmanaged file %uri', ['%uri' => $uri, 'error']));
       }
       else {
-        drupal_set_message(t('Successfully deleted unmanaged file %uri', array('%uri' => $uri)));
+        drupal_set_message(t('Successfully deleted unmanaged file %uri', ['%uri' => $uri]));
         $this->setDefaultFile('file_example_default_file', $uri);
       }
     }
@@ -712,10 +712,10 @@ class FileExampleReadWriteForm extends FormBase {
     $form_values = $form_state->getValues();
     $uri = $form_values['fileops_file'];
     if (is_file($uri)) {
-      drupal_set_message(t('The file %uri exists.', array('%uri' => $uri)));
+      drupal_set_message(t('The file %uri exists.', ['%uri' => $uri]));
     }
     else {
-      drupal_set_message(t('The file %uri does not exist.', array('%uri' => $uri)));
+      drupal_set_message(t('The file %uri does not exist.', ['%uri' => $uri]));
     }
   }
 
@@ -737,11 +737,11 @@ class FileExampleReadWriteForm extends FormBase {
     // by default to 0755, or to the value of the variable
     // 'file_chmod_directory'.
     if (!file_prepare_directory($directory, FILE_MODIFY_PERMISSIONS | FILE_CREATE_DIRECTORY)) {
-      drupal_set_message(t('Failed to create %directory.', array('%directory' => $directory)), 'error');
+      drupal_set_message(t('Failed to create %directory.', ['%directory' => $directory]), 'error');
     }
     else {
       $result = is_dir($directory);
-      drupal_set_message(t('Directory %directory is ready for use.', array('%directory' => $directory)));
+      drupal_set_message(t('Directory %directory is ready for use.', ['%directory' => $directory]));
       $this->setDefaultDirectory($directory);
     }
   }
@@ -757,10 +757,10 @@ class FileExampleReadWriteForm extends FormBase {
 
     $result = file_unmanaged_delete_recursive($directory);
     if (!$result) {
-      drupal_set_message(t('Failed to delete %directory.', array('%directory' => $directory)), 'error');
+      drupal_set_message(t('Failed to delete %directory.', ['%directory' => $directory]), 'error');
     }
     else {
-      drupal_set_message(t('Recursively deleted directory %directory.', array('%directory' => $directory)));
+      drupal_set_message(t('Recursively deleted directory %directory.', ['%directory' => $directory]));
       $this->setDefaultDirectory($directory);
     }
   }
@@ -780,10 +780,10 @@ class FileExampleReadWriteForm extends FormBase {
     $directory = $form_values['directory_name'];
     $result = is_dir($directory);
     if (!$result) {
-      drupal_set_message(t('Directory %directory does not exist.', array('%directory' => $directory)));
+      drupal_set_message(t('Directory %directory does not exist.', ['%directory' => $directory]));
     }
     else {
-      drupal_set_message(t('Directory %directory exists.', array('%directory' => $directory)));
+      drupal_set_message(t('Directory %directory exists.', ['%directory' => $directory]));
     }
   }
 
diff --git a/file_example/tests/src/Functional/FileExampleTest.php b/file_example/tests/src/Functional/FileExampleTest.php
index 500ae23..8b415d1 100644
--- a/file_example/tests/src/Functional/FileExampleTest.php
+++ b/file_example/tests/src/Functional/FileExampleTest.php
@@ -21,7 +21,7 @@ class FileExampleTest extends ExamplesBrowserTestBase {
    *
    * @todo Add the stream_wrapper_example when it is completed.
    */
-  public static $modules = array('file_example');
+  public static $modules = ['file_example'];
 
   /**
    * Test the basic File Example UI.
@@ -44,62 +44,62 @@ class FileExampleTest extends ExamplesBrowserTestBase {
     $priviledged_user = $this->drupalCreateUser($permissions);
     $this->drupalLogin($priviledged_user);
 
-    $expected_text = array(
+    $expected_text = [
       'Write managed file' => 'Saved managed file',
       'Write unmanaged file' => 'Saved file as',
       'Unmanaged using PHP' => 'Saved file as',
-    );
+    ];
     // For each of the three buttons == three write types.
-    $buttons = array(
+    $buttons = [
       'Write managed file',
       'Write unmanaged file',
       'Unmanaged using PHP',
-    );
+    ];
     foreach ($buttons as $button) {
       // For each scheme supported by Drupal + the session:// wrapper,
       // which is defined in the stream_wrapper_exampnle.
-      $schemes = array('public', 'private', 'temporary', 'session');
+      $schemes = ['public', 'private', 'temporary', 'session'];
       foreach ($schemes as $scheme) {
         // Create a directory for use.
         $dirname = $scheme . '://' . $this->randomMachineName(10);
 
         // Directory does not yet exist; assert that.
-        $edit = array(
+        $edit = [
           'directory_name' => $dirname,
-        );
+        ];
         $this->drupalPostForm('examples/file_example', $edit, t('Check to see if directory exists'));
-        $assert->pageTextContains(t('Directory @dirname does not exist', array('@dirname' => $dirname)));
+        $assert->pageTextContains(t('Directory @dirname does not exist', ['@dirname' => $dirname]));
 
         $this->drupalPostForm('examples/file_example', $edit, t('Create directory'));
-        $assert->pageTextContains(t('Directory @dirname is ready for use', array('@dirname' => $dirname)));
+        $assert->pageTextContains(t('Directory @dirname is ready for use', ['@dirname' => $dirname]));
 
         $this->drupalPostForm('examples/file_example', $edit, t('Check to see if directory exists'));
-        $assert->pageTextContains(t('Directory @dirname exists', array('@dirname' => $dirname)));
+        $assert->pageTextContains(t('Directory @dirname exists', ['@dirname' => $dirname]));
 
         // Create a file in the directory we created.
         $content = $this->randomMachineName(30);
         $filename = $dirname . '/' . $this->randomMachineName(30) . '.txt';
 
         // Assert that the file we're about to create does not yet exist.
-        $edit = array(
+        $edit = [
           'fileops_file' => $filename,
-        );
+        ];
         $this->drupalPostForm('examples/file_example', $edit, t('Check to see if file exists'));
-        $assert->pageTextContains(t('The file @filename does not exist', array('@filename' => $filename)));
+        $assert->pageTextContains(t('The file @filename does not exist', ['@filename' => $filename]));
 
         $this->verbose((string) t('Processing button=%button, scheme=%scheme, dir=%dirname, file=%filename',
-            array(
+            [
               '%button' => $button,
               '%scheme' => $scheme,
               '%filename' => $filename,
               '%dirname' => $dirname,
-            )
+            ]
           )
         );
-        $edit = array(
+        $edit = [
           'write_contents' => $content,
           'destination' => $filename,
-        );
+        ];
         $this->drupalPostForm('examples/file_example', $edit, $button);
         $this->verbose($expected_text[$button], "Button Text");
         $assert->pageTextContains($expected_text[$button]);
@@ -123,36 +123,36 @@ class FileExampleTest extends ExamplesBrowserTestBase {
         }
 
         // Verify that the file exists.
-        $edit = array(
+        $edit = [
           'fileops_file' => $filename,
-        );
+        ];
         $this->drupalPostForm('examples/file_example', $edit, t('Check to see if file exists'));
-        $assert->pageTextContains(t('The file @filename exists', array('@filename' => $filename)));
+        $assert->pageTextContains(t('The file @filename exists', ['@filename' => $filename]));
 
         // Now read the file that got written above and verify that we can use
         // the writing tools.
-        $edit = array(
+        $edit = [
           'fileops_file' => $output_filename,
-        );
+        ];
         $this->drupalPostForm('examples/file_example', $edit, t('Read the file and store it locally'));
 
         $assert->pageTextContains('The file was read and copied');
 
-        $edit = array(
+        $edit = [
           'fileops_file' => $filename,
-        );
+        ];
 
         $this->drupalPostForm('examples/file_example', $edit, t('Delete file'));
         $assert->pageTextContains('Successfully deleted');
         $this->drupalPostForm('examples/file_example', $edit, t('Check to see if file exists'));
-        $assert->pageTextContains(t('The file @filename does not exist', array('@filename' => $filename)));
+        $assert->pageTextContains(t('The file @filename does not exist', ['@filename' => $filename]));
 
-        $edit = array(
+        $edit = [
           'directory_name' => $dirname,
-        );
+        ];
         $this->drupalPostForm('examples/file_example', $edit, t('Delete directory'));
         $this->drupalPostForm('examples/file_example', $edit, t('Check to see if directory exists'));
-        $assert->pageTextContains(t('Directory @dirname does not exist', array('@dirname' => $dirname)));
+        $assert->pageTextContains(t('Directory @dirname does not exist', ['@dirname' => $dirname]));
       }
     }
   }
diff --git a/hooks_example/hooks_example.api.php b/hooks_example/hooks_example.api.php
index f3777b3..c3a1a2d 100644
--- a/hooks_example/hooks_example.api.php
+++ b/hooks_example/hooks_example.api.php
@@ -44,7 +44,7 @@ function hook_hooks_example_count_incremented($current_count, \Drupal\node\NodeI
   // If this is the first time the user has viewed this node we display a
   // message letting them know.
   if ($current_count === 1) {
-    drupal_set_message(t('This is the first time you have viewed the node %title.', array('%title' => $node->label())));
+    drupal_set_message(t('This is the first time you have viewed the node %title.', ['%title' => $node->label()]));
   }
 }
 
diff --git a/hooks_example/hooks_example.module b/hooks_example/hooks_example.module
index 00dd992..8a5f2f1 100644
--- a/hooks_example/hooks_example.module
+++ b/hooks_example/hooks_example.module
@@ -115,7 +115,7 @@ function hooks_example_node_view(array &$build, EntityInterface $entity, EntityV
   //
   // Retrieve the active session from the current request object.
   $session = \Drupal::request()->getSession();
-  $current_counts = $session->get('hooks_example.view_counts', array());
+  $current_counts = $session->get('hooks_example.view_counts', []);
   if (!isset($current_counts[$entity->id()])) {
     // If this is the first time they've viewed the page we need to start the
     // counter.
@@ -171,20 +171,20 @@ function hooks_example_node_view(array &$build, EntityInterface $entity, EntityV
   // In this example we're invoking hook_hooks_example_count_incremented() and
   // passing all implementations the current view count for the node, and the
   // node object itself.
-  $module_handler->invokeAll('hooks_example_count_incremented', array($current_counts[$entity->id()], $entity));
+  $module_handler->invokeAll('hooks_example_count_incremented', [$current_counts[$entity->id()], $entity]);
 
   // Display the current number of pages the user has viewed along with the
   // node's content.
-  $build['view_count'] = array(
-    '#markup' => '<p>' . t('You have viewed this node @total times this session.', array('@total' => $current_counts[$entity->id()])) . '</p>',
+  $build['view_count'] = [
+    '#markup' => '<p>' . t('You have viewed this node @total times this session.', ['@total' => $current_counts[$entity->id()]]) . '</p>',
     // In order for this example to work we disable caching for the content of
     // this node completely. This ensures that our hook is called every time the
     // node is viewed instead of using a cached version of the page for
     // subsequent requests.
-    '#cache' => array(
+    '#cache' => [
       'max-age' => 0,
-    ),
-  );
+    ],
+  ];
 }
 
 /**
@@ -217,7 +217,7 @@ function hooks_example_form_alter(&$form, FormStateInterface $form_state, $form_
  */
 function hooks_example_hooks_example_count_incremented($current_count, NodeInterface $node) {
   if ($current_count === 1) {
-    drupal_set_message(t('This is the first time you have viewed the node %title.', array('%title' => $node->label())));
+    drupal_set_message(t('This is the first time you have viewed the node %title.', ['%title' => $node->label()]));
   }
 }
 
diff --git a/js_example/js_example.module b/js_example/js_example.module
index 051f3ba..e35b368 100755
--- a/js_example/js_example.module
+++ b/js_example/js_example.module
@@ -24,12 +24,12 @@
  * Implements hook_theme().
  */
 function js_example_theme() {
-  return array(
-    'js_example_accordion' => array(
+  return [
+    'js_example_accordion' => [
       'template' => 'accordion',
-      'variables' => array('title' => NULL),
-    ),
-  );
+      'variables' => ['title' => NULL],
+    ],
+  ];
 }
 
 /**
diff --git a/js_example/src/Controller/JsExampleController.php b/js_example/src/Controller/JsExampleController.php
index 894b838..ccdafcb 100755
--- a/js_example/src/Controller/JsExampleController.php
+++ b/js_example/src/Controller/JsExampleController.php
@@ -55,22 +55,22 @@ class JsExampleController {
    */
   public function getJsWeightImplementation() {
     // Create an array of items with random-ish weight values.
-    $weights = array(
+    $weights = [
       'red' => -4,
       'blue' => -2,
       'green' => -1,
       'brown' => -2,
       'black' => -1,
       'purple' => -5,
-    );
+    ];
 
     // Start building the content.
-    $build = array();
+    $build = [];
     // Main container DIV. We give it a unique ID so that the JavaScript can
     // find it using jQuery.
-    $build['content'] = array(
+    $build['content'] = [
       '#markup' => '<div id="js-weights" class="js-weights"></div>',
-    );
+    ];
     // Attach library containing css and js files.
     $build['#attached']['library'][] = 'js_example/js_example.weights';
     // Attach the weights array to our JavaScript settings. This allows the
@@ -96,10 +96,10 @@ class JsExampleController {
     $title = t('Click sections to expand or collapse:');
     // Build using our theme. This gives us content, which is not a good
     // practice, but which allows us to demonstrate adding JavaScript here.
-    $build['myelement'] = array(
+    $build['myelement'] = [
       '#theme' => 'js_example_accordion',
       '#title' => $title,
-    );
+    ];
     // Add our script. It is tiny, but this demonstrates how to add it. We pass
     // our module name followed by the internal library name declared in
     // libraries yml file.
diff --git a/js_example/tests/src/Functional/JsExampleTest.php b/js_example/tests/src/Functional/JsExampleTest.php
index 7c0adc1..1e3361c 100644
--- a/js_example/tests/src/Functional/JsExampleTest.php
+++ b/js_example/tests/src/Functional/JsExampleTest.php
@@ -18,7 +18,7 @@ class JsExampleTest extends ExamplesBrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('js_example', 'node');
+  public static $modules = ['js_example', 'node'];
 
   /**
    * Test all the paths defined by our module.
diff --git a/node_type_example/tests/src/Functional/NodeTypeExampleTest.php b/node_type_example/tests/src/Functional/NodeTypeExampleTest.php
index 188b901..d0c6ddb 100644
--- a/node_type_example/tests/src/Functional/NodeTypeExampleTest.php
+++ b/node_type_example/tests/src/Functional/NodeTypeExampleTest.php
@@ -20,7 +20,7 @@ class NodeTypeExampleTest extends ExamplesBrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('node', 'node_type_example');
+  public static $modules = ['node', 'node_type_example'];
 
   /**
    * The installation profile to use with this test.
@@ -41,9 +41,9 @@ class NodeTypeExampleTest extends ExamplesBrowserTestBase {
    *   - The value is the link that should appear on that page.
    */
   protected function providerMenuLinks() {
-    return array(
+    return [
       '' => '/examples/node-type-example',
-    );
+    ];
   }
 
   /**
@@ -78,7 +78,7 @@ class NodeTypeExampleTest extends ExamplesBrowserTestBase {
     $assert = $this->assertSession();
 
     // Log in an admin user.
-    $admin_user = $this->drupalCreateUser(array('administer content types'));
+    $admin_user = $this->drupalCreateUser(['administer content types']);
     $this->drupalLogin($admin_user);
 
     // Get a list of content types.
@@ -101,20 +101,20 @@ class NodeTypeExampleTest extends ExamplesBrowserTestBase {
     }
 
     // Log in a content creator.
-    $creator_user = $this->drupalCreateUser(array('create basic_content_type content'));
+    $creator_user = $this->drupalCreateUser(['create basic_content_type content']);
     $this->drupalLogin($creator_user);
 
     // Create a node.
-    $edit = array();
+    $edit = [];
     $edit['title[0][value]'] = $this->randomMachineName(8);
     $edit['body[0][value]'] = $this->randomMachineName(16);
     $this->drupalPostForm('/node/add/basic_content_type', $edit, t('Save'));
 
     // Check that the Basic page has been created.
-    $assert->pageTextContains(t('@post @title has been created.', array(
+    $assert->pageTextContains(t('@post @title has been created.', [
       '@post' => 'Example: Basic Content Type',
       '@title' => $edit['title[0][value]'],
-    )));
+    ]));
 
     // Check that the node exists in the database.
     $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
diff --git a/page_example/src/Controller/PageExampleController.php b/page_example/src/Controller/PageExampleController.php
index 4d89b0d..d74d0eb 100644
--- a/page_example/src/Controller/PageExampleController.php
+++ b/page_example/src/Controller/PageExampleController.php
@@ -31,9 +31,9 @@ class PageExampleController extends ControllerBase {
    * appropriate blocks, navigation, and styling.
    */
   public function simple() {
-    return array(
+    return [
       '#markup' => '<p>' . $this->t('Simple page: The quick brown fox jumps over the lazy dog.') . '</p>',
-    );
+    ];
   }
 
   /**
@@ -70,17 +70,17 @@ class PageExampleController extends ControllerBase {
       throw new AccessDeniedHttpException();
     }
 
-    $list[] = $this->t("First number was @number.", array('@number' => $first));
-    $list[] = $this->t("Second number was @number.", array('@number' => $second));
-    $list[] = $this->t('The total was @number.', array('@number' => $first + $second));
+    $list[] = $this->t("First number was @number.", ['@number' => $first]);
+    $list[] = $this->t("Second number was @number.", ['@number' => $second]);
+    $list[] = $this->t('The total was @number.', ['@number' => $first + $second]);
 
-    $render_array['page_example_arguments'] = array(
+    $render_array['page_example_arguments'] = [
       // The theme function to apply to the #items.
       '#theme' => 'item_list',
       // The list itself.
       '#items' => $list,
       '#title' => $this->t('Argument Information'),
-    );
+    ];
     return $render_array;
   }
 
diff --git a/page_example/tests/src/Functional/PageExampleTest.php b/page_example/tests/src/Functional/PageExampleTest.php
index 429bc56..3e574f2 100644
--- a/page_example/tests/src/Functional/PageExampleTest.php
+++ b/page_example/tests/src/Functional/PageExampleTest.php
@@ -17,7 +17,7 @@ class PageExampleTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('page_example');
+  public static $modules = ['page_example'];
 
   /**
    * The installation profile to use with this test.
@@ -97,7 +97,7 @@ class PageExampleTest extends BrowserTestBase {
    */
   public function testPageExampleLinks($permission, $links) {
     if ($permission) {
-      $user = $this->drupalCreateUser(array($permission));
+      $user = $this->drupalCreateUser([$permission]);
       $this->drupalLogin($user);
     }
     foreach ($links as $page => $path) {
@@ -132,7 +132,7 @@ class PageExampleTest extends BrowserTestBase {
     $this->pageExampleVerifyNoAccess('examples/page-example/arguments/1/2');
 
     // Create a user with permissions to access 'simple' page and login.
-    $this->webUser = $this->drupalCreateUser(array('access simple page'));
+    $this->webUser = $this->drupalCreateUser(['access simple page']);
     $this->drupalLogin($this->webUser);
 
     // Verify that user can access simple content.
@@ -144,7 +144,7 @@ class PageExampleTest extends BrowserTestBase {
     $this->pageExampleVerifyNoAccess('examples/page-example/arguments/1/2');
 
     // Create a user with permissions to access 'simple' page and login.
-    $this->webUser = $this->drupalCreateUser(array('access arguments page'));
+    $this->webUser = $this->drupalCreateUser(['access arguments page']);
     $this->drupalLogin($this->webUser);
 
     // Verify that user can access arguments content.
@@ -153,9 +153,9 @@ class PageExampleTest extends BrowserTestBase {
     $this->drupalGet('/examples/page-example/arguments/' . $first . '/' . $second);
     $assert_session->statusCodeEquals(200);
     // Verify argument usage.
-    $assert_session->pageTextContains(t('First number was @number.', array('@number' => $first)));
-    $assert_session->pageTextContains(t('Second number was @number.', array('@number' => $second)));
-    $assert_session->pageTextContains(t('The total was @number.', array('@number' => $first + $second)));
+    $assert_session->pageTextContains(t('First number was @number.', ['@number' => $first]));
+    $assert_session->pageTextContains(t('Second number was @number.', ['@number' => $second]));
+    $assert_session->pageTextContains(t('The total was @number.', ['@number' => $first + $second]));
 
     // Verify incomplete argument call to arguments content.
     $this->drupalGet('/examples/page-example/arguments/' . $first . '/');
diff --git a/pager_example/src/Controller/PagerExamplePage.php b/pager_example/src/Controller/PagerExamplePage.php
index 681c048..1546f76 100644
--- a/pager_example/src/Controller/PagerExamplePage.php
+++ b/pager_example/src/Controller/PagerExamplePage.php
@@ -91,19 +91,19 @@ class PagerExamplePage extends ControllerBase {
 
     if ($count_nodes == 0) {
       if ($this->currentUser->hasPermission('create page content')) {
-        $build['no-nodes'] = array(
+        $build['no-nodes'] = [
           '#markup' => $this->t('There are no nodes to display.
             Please <a href=":url">create a node</a>.',
-            array(
-              ':url' => Url::fromRoute('node.add', array('node_type' => 'page'))->toString(),
-            )
+            [
+              ':url' => Url::fromRoute('node.add', ['node_type' => 'page'])->toString(),
+            ]
           ),
-        );
+        ];
       }
       else {
-        $build['no-nodes'] = array(
+        $build['no-nodes'] = [
           '#markup' => $this->t('There are no nodes to display.'),
-        );
+        ];
       }
 
       // Ensure that Drupal clears the cache when nodes have been published,
@@ -146,23 +146,23 @@ class PagerExamplePage extends ControllerBase {
       // "mask" these nodes that should not be accessible. If we don't do this
       // masking, it's possible that we'd have lots of pages that don't show any
       // content.
-      $rows[] = array(
+      $rows[] = [
         'nid' => $node->access('view') ? $node->id() : t('XXXXXX'),
         'title' => $node->access('view') ? $node->getTitle() : t('Redacted'),
-      );
+      ];
     }
 
     // Build a render array which will be themed as a table with a pager.
-    $build['pager_example'] = array(
+    $build['pager_example'] = [
       '#rows' => $rows,
-      '#header' => array(t('NID'), t('Title')),
+      '#header' => [t('NID'), t('Title')],
       '#type' => 'table',
       '#empty' => t('No content available.'),
-    );
-    $build['pager'] = array(
+    ];
+    $build['pager'] = [
       '#type' => 'pager',
       '#weight' => 10,
-    );
+    ];
 
     // Ensure that Drupal clears the cache when nodes have been published,
     // unpublished, added or deleted; and when user permissions change.
diff --git a/pager_example/tests/src/Functional/PagerExampleTest.php b/pager_example/tests/src/Functional/PagerExampleTest.php
index 0f5b4fe..b4a2b7e 100644
--- a/pager_example/tests/src/Functional/PagerExampleTest.php
+++ b/pager_example/tests/src/Functional/PagerExampleTest.php
@@ -58,7 +58,7 @@ class PagerExampleTest extends ExamplesBrowserTestBase {
     $assert->pageTextContains($nodes[5]->getTitle());
 
     // Check the last page.
-    $this->drupalGet('examples/pager-example', array('query' => array('page' => 2)));
+    $this->drupalGet('examples/pager-example', ['query' => ['page' => 2]]);
     $assert->statusCodeEquals(200);
     $assert->linkNotExists('Next');
     $assert->linkByHrefExists('?page=1');
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 6fd176b..2d8f266 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -8,7 +8,7 @@
   <description>Default PHP CodeSniffer configuration for Examples for Developers.</description>
   <file>.</file>
   <arg name="extensions" value="css,inc,install,module,php,profile,test,theme,yml"/>
-  <rule ref="Drupal.Array.Array.CommaLastItem"/>
+  <rule ref="Drupal.Array"/>
   <rule ref="Drupal.CSS"/>
   <rule ref="Drupal.Classes"/>
   <rule ref="Drupal.Commenting.DocComment">
diff --git a/phpunit_example/src/AddClass.php b/phpunit_example/src/AddClass.php
index 96c059e..73b743b 100644
--- a/phpunit_example/src/AddClass.php
+++ b/phpunit_example/src/AddClass.php
@@ -25,7 +25,7 @@ class AddClass {
    */
   public function add($a, $b) {
     // Check whether the arguments are numeric.
-    foreach (array($a, $b) as $argument) {
+    foreach ([$a, $b] as $argument) {
       if (!is_numeric($argument)) {
         throw new \InvalidArgumentException('Arguments must be numeric.');
       }
diff --git a/phpunit_example/tests/src/Functional/PHPUnitExampleMenuTest.php b/phpunit_example/tests/src/Functional/PHPUnitExampleMenuTest.php
index ab0e021..abf1ab9 100644
--- a/phpunit_example/tests/src/Functional/PHPUnitExampleMenuTest.php
+++ b/phpunit_example/tests/src/Functional/PHPUnitExampleMenuTest.php
@@ -22,7 +22,7 @@ class PHPUnitExampleMenuTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('phpunit_example');
+  public static $modules = ['phpunit_example'];
 
   /**
    * The installation profile to use with this test.
@@ -43,9 +43,9 @@ class PHPUnitExampleMenuTest extends BrowserTestBase {
    *   The value is the link that should appear on that page.
    */
   protected function providerMenuLinks() {
-    return array(
+    return [
       '' => '/examples/phpunit-example',
-    );
+    ];
   }
 
   /**
diff --git a/phpunit_example/tests/src/Unit/AddClassTest.php b/phpunit_example/tests/src/Unit/AddClassTest.php
index 761cb1c..4d5d0ca 100644
--- a/phpunit_example/tests/src/Unit/AddClassTest.php
+++ b/phpunit_example/tests/src/Unit/AddClassTest.php
@@ -137,10 +137,10 @@ class AddClassTest extends UnitTestCase {
    * @see AddClassTest::testAddWithDataProvider()
    */
   public function addDataProvider() {
-    return array(
-      array(5, 2, 3),
-      array(50, 20, 30),
-    );
+    return [
+      [5, 2, 3],
+      [50, 20, 30],
+    ];
   }
 
   /**
@@ -156,23 +156,23 @@ class AddClassTest extends UnitTestCase {
    * @see AddClassTest::testAddWithBadDataProvider()
    */
   public function addBadDataProvider() {
-    $bad_data = array();
+    $bad_data = [];
     // Set up an array with data that should cause add()
     // to throw an exception.
-    $bad_data_types = array('string', FALSE, array('foo'), new \stdClass());
+    $bad_data_types = ['string', FALSE, ['foo'], new \stdClass()];
     // Create some data where both $a and $b are bad types.
     foreach ($bad_data_types as $bad_datum_a) {
       foreach ($bad_data_types as $bad_datum_b) {
-        $bad_data[] = array($bad_datum_a, $bad_datum_b);
+        $bad_data[] = [$bad_datum_a, $bad_datum_b];
       }
     }
     // Create some data where $a is good and $b is bad.
     foreach ($bad_data_types as $bad_datum_b) {
-      $bad_data[] = array(1, $bad_datum_b);
+      $bad_data[] = [1, $bad_datum_b];
     }
     // Create some data where $b is good and $a is bad.
     foreach ($bad_data_types as $bad_datum_a) {
-      $bad_data[] = array($bad_datum_a, 1);
+      $bad_data[] = [$bad_datum_a, 1];
     }
     return $bad_data;
   }
diff --git a/phpunit_example/tests/src/Unit/ProtectedPrivatesTest.php b/phpunit_example/tests/src/Unit/ProtectedPrivatesTest.php
index b4c169c..900320b 100644
--- a/phpunit_example/tests/src/Unit/ProtectedPrivatesTest.php
+++ b/phpunit_example/tests/src/Unit/ProtectedPrivatesTest.php
@@ -54,9 +54,9 @@ class ProtectedPrivatesTest extends UnitTestCase {
    * Good data provider.
    */
   public function addDataProvider() {
-    return array(
-      array(5, 2, 3),
-    );
+    return [
+      [5, 2, 3],
+    ];
   }
 
   /**
@@ -78,7 +78,7 @@ class ProtectedPrivatesTest extends UnitTestCase {
     // Create a new ProtectedPrivates object.
     $pp = new ProtectedPrivates();
     // Use the reflection to invoke on the object.
-    $sum = $private_method->invokeArgs($pp, array($a, $b));
+    $sum = $private_method->invokeArgs($pp, [$a, $b]);
     // Make an assertion.
     $this->assertEquals($expected, $sum);
   }
@@ -87,9 +87,9 @@ class ProtectedPrivatesTest extends UnitTestCase {
    * Bad data provider.
    */
   public function addBadDataProvider() {
-    return array(
-      array('string', array()),
-    );
+    return [
+      ['string', []],
+    ];
   }
 
   /**
@@ -112,7 +112,7 @@ class ProtectedPrivatesTest extends UnitTestCase {
     $pp = new ProtectedPrivates();
     // Use the reflection to invoke on the object.
     // This should throw an exception.
-    $private_method->invokeArgs($pp, array($a, $b));
+    $private_method->invokeArgs($pp, [$a, $b]);
   }
 
   /**
diff --git a/plugin_type_example/src/Controller/PluginTypeExampleController.php b/plugin_type_example/src/Controller/PluginTypeExampleController.php
index 90ca345..c89fbda 100644
--- a/plugin_type_example/src/Controller/PluginTypeExampleController.php
+++ b/plugin_type_example/src/Controller/PluginTypeExampleController.php
@@ -45,11 +45,11 @@ class PluginTypeExampleController extends ControllerBase {
    *   /examples/plugin_type_example.
    */
   public function description() {
-    $build = array();
+    $build = [];
 
-    $build['intro'] = array(
+    $build['intro'] = [
       '#markup' => t("This page lists the sandwich plugins we've created. The sandwich plugin type is defined in Drupal\\plugin_type_example\\SandwichPluginManager. The various plugins are defined in the Drupal\\plugin_type_example\\Plugin\\Sandwich namespace."),
-    );
+    ];
 
     // Get the list of all the sandwich plugins defined on the system from the
     // plugin manager. Note that at this point, what we have is *definitions* of
@@ -57,24 +57,24 @@ class PluginTypeExampleController extends ControllerBase {
     $sandwich_plugin_definitions = $this->sandwichManager->getDefinitions();
 
     // Let's output a list of the plugin definitions we now have.
-    $items = array();
+    $items = [];
     foreach ($sandwich_plugin_definitions as $sandwich_plugin_definition) {
       // Here we use various properties from the plugin definition. These values
       // are defined in the annotation at the top of the plugin class: see
       // \Drupal\plugin_type_example\Plugin\Sandwich\ExampleHamSandwich.
-      $items[] = t("@id (calories: @calories, description: @description )", array(
+      $items[] = t("@id (calories: @calories, description: @description )", [
         '@id' => $sandwich_plugin_definition['id'],
         '@calories' => $sandwich_plugin_definition['calories'],
         '@description' => $sandwich_plugin_definition['description'],
-      ));
+      ]);
     }
 
     // Add our list to the render array.
-    $build['plugin_definitions'] = array(
+    $build['plugin_definitions'] = [
       '#theme' => 'item_list',
       '#title' => 'Sandwich plugin definitions',
       '#items' => $items,
-    );
+    ];
 
     // If we want just a single plugin definition, we can use getDefinition().
     // This requires us to know the ID of the plugin we want. This is set in the
@@ -86,21 +86,21 @@ class PluginTypeExampleController extends ControllerBase {
     // manager, passing the ID of the plugin we want to load. Let's output a
     // list of the plugins by loading an instance of each plugin definition and
     // collecting the description from each.
-    $items = array();
+    $items = [];
     // The array of plugin definitions is keyed by plugin id, so we can just use
     // that to load our plugin instances.
     foreach ($sandwich_plugin_definitions as $plugin_id => $sandwich_plugin_definition) {
       // We now have a plugin instance. From here on it can be treated just as
       // any other object; have its properties examined, methods called, etc.
-      $plugin = $this->sandwichManager->createInstance($plugin_id, array('of' => 'configuration values'));
+      $plugin = $this->sandwichManager->createInstance($plugin_id, ['of' => 'configuration values']);
       $items[] = $plugin->description();
     }
 
-    $build['plugins'] = array(
+    $build['plugins'] = [
       '#theme' => 'item_list',
       '#title' => 'Sandwich plugins',
       '#items' => $items,
-    );
+    ];
 
     return $build;
   }
diff --git a/plugin_type_example/src/Plugin/Sandwich/ExampleHamSandwich.php b/plugin_type_example/src/Plugin/Sandwich/ExampleHamSandwich.php
index 5e39eba..f9749cf 100644
--- a/plugin_type_example/src/Plugin/Sandwich/ExampleHamSandwich.php
+++ b/plugin_type_example/src/Plugin/Sandwich/ExampleHamSandwich.php
@@ -43,7 +43,7 @@ class ExampleHamSandwich extends SandwichBase {
    *   A description of the sandwich ordered.
    */
   public function order(array $extras) {
-    $ingredients = array('ham, mustard', 'rocket', 'sun-dried tomatoes');
+    $ingredients = ['ham, mustard', 'rocket', 'sun-dried tomatoes'];
     $sandwich = array_merge($ingredients, $extras);
     return 'You ordered an ' . implode(', ', $sandwich) . ' sandwich. Enjoy!';
   }
diff --git a/plugin_type_example/src/Plugin/Sandwich/ExampleMeatballSandwich.php b/plugin_type_example/src/Plugin/Sandwich/ExampleMeatballSandwich.php
index 9df63c7..96222ab 100644
--- a/plugin_type_example/src/Plugin/Sandwich/ExampleMeatballSandwich.php
+++ b/plugin_type_example/src/Plugin/Sandwich/ExampleMeatballSandwich.php
@@ -86,7 +86,7 @@ class ExampleMeatballSandwich extends SandwichBase implements ContainerFactoryPl
    * {@inheritdoc}
    */
   public function order(array $extras) {
-    $ingredients = array('meatballs', 'irresistible marinara sauce');
+    $ingredients = ['meatballs', 'irresistible marinara sauce'];
     $sandwich = array_merge($ingredients, $extras);
     return 'You ordered an ' . implode(', ', $sandwich) . ' sandwich. Enjoy!';
   }
diff --git a/plugin_type_example/tests/src/Functional/PluginTypeExampleTest.php b/plugin_type_example/tests/src/Functional/PluginTypeExampleTest.php
index 48067fe..81a6007 100644
--- a/plugin_type_example/tests/src/Functional/PluginTypeExampleTest.php
+++ b/plugin_type_example/tests/src/Functional/PluginTypeExampleTest.php
@@ -20,7 +20,7 @@ class PluginTypeExampleTest extends ExamplesBrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('plugin_type_example');
+  public static $modules = ['plugin_type_example'];
 
   /**
    * The installation profile to use with this test.
@@ -47,7 +47,7 @@ class PluginTypeExampleTest extends ExamplesBrowserTestBase {
     $this->assertEquals(426, $sandwich_plugin_definition['calories'], 'The ham sandwich plugin definition\'s calories property is not set.');
 
     // Create an instance of the ham sandwich plugin to check it works.
-    $plugin = $manager->createInstance('ham_sandwich', array('of' => 'configuration values'));
+    $plugin = $manager->createInstance('ham_sandwich', ['of' => 'configuration values']);
 
     $this->assertInstanceOf(ExampleHamSandwich::class, $plugin);
 
diff --git a/queue_example/src/Forms/QueueExampleForm.php b/queue_example/src/Forms/QueueExampleForm.php
index 80da519..e43d0c9 100644
--- a/queue_example/src/Forms/QueueExampleForm.php
+++ b/queue_example/src/Forms/QueueExampleForm.php
@@ -94,114 +94,114 @@ class QueueExampleForm extends FormBase {
     $queue_name = $form_state->getValue('queue_name') ?: 'queue_example_first_queue';
     $items = $this->retrieveQueue($queue_name);
 
-    $form['help'] = array(
+    $form['help'] = [
       '#type' => 'markup',
       '#markup' => '<div>' . $this->t('This page is an interface on the Drupal queue API. You can add new items to the queue, "claim" one (retrieve the next item and keep a lock on it), and delete one (remove it from the queue). Note that claims are not expired until cron runs, so there is a special button to run cron to perform any necessary expirations.') . '</div>',
-    );
+    ];
 
-    $form['wrong_queue_warning'] = array(
+    $form['wrong_queue_warning'] = [
       '#type' => 'markup',
       '#markup' => '<div>' . $this->t('Note: the example works only with the default queue implementation, which is not currently configured!!') . '</div>',
       '#access' => (!$this->doesQueueUseDB()),
-    );
+    ];
 
-    $queue_names = array('queue_example_first_queue', 'queue_example_second_queue');
-    $form['queue_name'] = array(
+    $queue_names = ['queue_example_first_queue', 'queue_example_second_queue'];
+    $form['queue_name'] = [
       '#type' => 'select',
       '#title' => $this->t('Choose queue to examine'),
       '#options' => array_combine($queue_names, $queue_names),
       '#default_value' => $queue_name,
-    );
+    ];
 
-    $form['queue_show'] = array(
+    $form['queue_show'] = [
       '#type' => 'submit',
       '#value' => $this->t('Show queue'),
-      '#submit' => array(array($this, 'submitShowQueue')),
-    );
+      '#submit' => [[$this, 'submitShowQueue']],
+    ];
 
-    $form['status_fieldset'] = array(
+    $form['status_fieldset'] = [
       '#type' => 'fieldset',
-      '#title' => $this->t('Queue status for @name', array('@name' => $queue_name)),
+      '#title' => $this->t('Queue status for @name', ['@name' => $queue_name]),
       '#collapsible' => TRUE,
-    );
+    ];
 
     if (count($items) > 0) {
-      $form['status_fieldset']['status'] = array(
+      $form['status_fieldset']['status'] = [
         '#theme' => 'table',
-        '#header' => array(
+        '#header' => [
           $this->t('Item ID'),
           $this->t('Claimed/Expiration'),
           $this->t('Created'),
           $this->t('Content/Data'),
-        ),
-        '#rows' => array_map(array($this, 'processQueueItemForTable'), $items),
-      );
+        ],
+        '#rows' => array_map([$this, 'processQueueItemForTable'], $items),
+      ];
     }
     else {
-      $form['status_fieldset']['status'] = array(
+      $form['status_fieldset']['status'] = [
         '#type' => 'markup',
         '#markup' => $this->t('There are no items in the queue.'),
-      );
+      ];
     }
 
-    $form['insert_fieldset'] = array(
+    $form['insert_fieldset'] = [
       '#type' => 'fieldset',
-      '#title' => $this->t('Insert into @name', array('@name' => $queue_name)),
-    );
+      '#title' => $this->t('Insert into @name', ['@name' => $queue_name]),
+    ];
 
-    $form['insert_fieldset']['string_to_add'] = array(
+    $form['insert_fieldset']['string_to_add'] = [
       '#type' => 'textfield',
       '#size' => 10,
-      '#default_value' => $this->t('item @counter', array('@counter' => $form_state->get('insert_counter'))),
-    );
+      '#default_value' => $this->t('item @counter', ['@counter' => $form_state->get('insert_counter')]),
+    ];
 
-    $form['insert_fieldset']['add_item'] = array(
+    $form['insert_fieldset']['add_item'] = [
       '#type' => 'submit',
       '#value' => $this->t('Insert into queue'),
-      '#submit' => array(array($this, 'submitAddQueueItem')),
-    );
+      '#submit' => [[$this, 'submitAddQueueItem']],
+    ];
 
-    $form['claim_fieldset'] = array(
+    $form['claim_fieldset'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Claim from queue'),
       '#collapsible' => TRUE,
-    );
+    ];
 
-    $form['claim_fieldset']['claim_time'] = array(
+    $form['claim_fieldset']['claim_time'] = [
       '#type' => 'radios',
       '#title' => $this->t('Claim time, in seconds'),
-      '#options' => array(
+      '#options' => [
         0 => $this->t('none'),
         5 => $this->t('5 seconds'),
         60 => $this->t('60 seconds'),
-      ),
+      ],
       '#description' => $this->t('This time is only valid if cron runs during this time period. You can run cron manually below.'),
       '#default_value' => $form_state->getValue('claim_time') ?: 5,
-    );
+    ];
 
-    $form['claim_fieldset']['claim_item'] = array(
+    $form['claim_fieldset']['claim_item'] = [
       '#type' => 'submit',
       '#value' => $this->t('Claim the next item from the queue'),
-      '#submit' => array(array($this, 'submitClaimItem')),
-    );
+      '#submit' => [[$this, 'submitClaimItem']],
+    ];
 
-    $form['claim_fieldset']['claim_and_delete_item'] = array(
+    $form['claim_fieldset']['claim_and_delete_item'] = [
       '#type' => 'submit',
       '#value' => $this->t('Claim the next item and delete it'),
-      '#submit' => array(array($this, 'submitClaimDeleteItem')),
-    );
+      '#submit' => [[$this, 'submitClaimDeleteItem']],
+    ];
 
-    $form['claim_fieldset']['run_cron'] = array(
+    $form['claim_fieldset']['run_cron'] = [
       '#type' => 'submit',
       '#value' => $this->t('Run cron manually to expire claims'),
-      '#submit' => array(array($this, 'submitRunCron')),
-    );
+      '#submit' => [[$this, 'submitRunCron']],
+    ];
 
-    $form['delete_queue'] = array(
+    $form['delete_queue'] = [
       '#type' => 'submit',
       '#value' => $this->t('Delete the queue and items in it'),
-      '#submit' => array(array($this, 'submitDeleteQueue')),
-    );
+      '#submit' => [[$this, 'submitDeleteQueue']],
+    ];
 
     return $form;
   }
@@ -226,7 +226,7 @@ class QueueExampleForm extends FormBase {
    *   An array of item arrays.
    */
   public function retrieveQueue($queue_name) {
-    $items = array();
+    $items = [];
 
     // This example requires the default queue implementation to work,
     // so we bail if some other queue implementation has been installed.
@@ -303,7 +303,7 @@ class QueueExampleForm extends FormBase {
     // Queue the string.
     $queue->createItem($form_state->getValue('string_to_add'));
     $count = $queue->numberOfItems();
-    drupal_set_message($this->t('Queued your string (@string_to_add). There are now @count items in the queue.', array('@count' => $count, '@string_to_add' => $form_state->getValue('string_to_add'))));
+    drupal_set_message($this->t('Queued your string (@string_to_add). There are now @count items in the queue.', ['@count' => $count, '@string_to_add' => $form_state->getValue('string_to_add')]));
     // Allows us to keep information in $form_state.
     $form_state->setRebuild();
 
@@ -331,15 +331,15 @@ class QueueExampleForm extends FormBase {
     $count = $queue->numberOfItems();
     if (!empty($item)) {
       drupal_set_message($this->t('Claimed item id=@item_id string=@string for @seconds seconds. There are @count items in the queue.',
-                          array(
+                          [
                             '@count' => $count,
                             '@item_id' => $item->item_id,
                             '@string' => $item->data,
                             '@seconds' => $form_state->getValue('claim_time'),
-                          )));
+                          ]));
     }
     else {
-      drupal_set_message($this->t('There were no items in the queue available to claim. There are @count items in the queue.', array('@count' => $count)));
+      drupal_set_message($this->t('There were no items in the queue available to claim. There are @count items in the queue.', ['@count' => $count]));
     }
     $form_state->setRebuild();
   }
@@ -359,19 +359,19 @@ class QueueExampleForm extends FormBase {
     $count = $queue->numberOfItems();
     $item = $queue->claimItem(60);
     if (!empty($item)) {
-      drupal_set_message($this->t('Claimed and deleted item id=@item_id string=@string for @seconds seconds. There are @count items in the queue.', array(
+      drupal_set_message($this->t('Claimed and deleted item id=@item_id string=@string for @seconds seconds. There are @count items in the queue.', [
         '@count' => $count,
         '@item_id' => $item->item_id,
         '@string' => $item->data,
         '@seconds' => $form_state->getValue('claim_time'),
-      )));
+      ]));
       $queue->deleteItem($item);
       $count = $queue->numberOfItems();
-      drupal_set_message($this->t('There are now @count items in the queue.', array('@count' => $count)));
+      drupal_set_message($this->t('There are now @count items in the queue.', ['@count' => $count]));
     }
     else {
       $count = $queue->numberOfItems();
-      drupal_set_message($this->t('There were no items in the queue available to claim/delete. There are currently @count items in the queue.', array('@count' => $count)));
+      drupal_set_message($this->t('There were no items in the queue available to claim/delete. There are currently @count items in the queue.', ['@count' => $count]));
     }
     $form_state->setRebuild();
   }
@@ -396,7 +396,7 @@ class QueueExampleForm extends FormBase {
     // There is no harm in trying to recreate existing.
     $queue->createQueue();
     $count = $queue->numberOfItems();
-    drupal_set_message($this->t('Ran cron. If claimed items expired, they should be expired now. There are now @count items in the queue', array('@count' => $count)));
+    drupal_set_message($this->t('Ran cron. If claimed items expired, they should be expired now. There are now @count items in the queue', ['@count' => $count]));
     $form_state->setRebuild();
   }
 
@@ -411,7 +411,7 @@ class QueueExampleForm extends FormBase {
   public function submitDeleteQueue(array &$form, FormStateInterface $form_state) {
     $queue = $this->queueFactory->get($form_state->getValue('queue_name'));
     $queue->deleteQueue();
-    drupal_set_message($this->t('Deleted the @queue_name queue and all items in it', array('@queue_name' => $form_state->getValue('queue_name'))));
+    drupal_set_message($this->t('Deleted the @queue_name queue and all items in it', ['@queue_name' => $form_state->getValue('queue_name')]));
   }
 
   /**
@@ -426,7 +426,7 @@ class QueueExampleForm extends FormBase {
    */
   private function processQueueItemForTable(array $item) {
     if ($item['expire'] > 0) {
-      $item['expire'] = $this->t('Claimed: expires %expire', array('%expire' => date('r', $item['expire'])));
+      $item['expire'] = $this->t('Claimed: expires %expire', ['%expire' => date('r', $item['expire'])]);
     }
     else {
       $item['expire'] = $this->t('Unclaimed');
diff --git a/queue_example/tests/src/Functional/QueueExampleTest.php b/queue_example/tests/src/Functional/QueueExampleTest.php
index 753ec29..fc7e971 100644
--- a/queue_example/tests/src/Functional/QueueExampleTest.php
+++ b/queue_example/tests/src/Functional/QueueExampleTest.php
@@ -12,7 +12,7 @@ use Drupal\Tests\BrowserTestBase;
  * @group examples
  */
 class QueueExampleTest extends BrowserTestBase {
-  public static $modules = array('queue_example');
+  public static $modules = ['queue_example'];
 
   /**
    * The installation profile to use with this test.
@@ -31,17 +31,17 @@ class QueueExampleTest extends BrowserTestBase {
     $this->drupalGet('examples/queue_example');
     // Load the queue with 5 items.
     for ($i = 1; $i <= 5; $i++) {
-      $edit = array('queue_name' => 'queue_example_first_queue', 'string_to_add' => 'boogie' . $i);
+      $edit = ['queue_name' => 'queue_example_first_queue', 'string_to_add' => 'boogie' . $i];
       $this->drupalPostForm(NULL, $edit, t('Insert into queue'));
-      $this->assertText(t('There are now @number items in the queue', array('@number' => $i)));
+      $this->assertText(t('There are now @number items in the queue', ['@number' => $i]));
     }
     // Claim each of the 5 items with a claim time of 0 seconds.
     for ($i = 1; $i <= 5; $i++) {
-      $edit = array('queue_name' => 'queue_example_first_queue', 'claim_time' => 0);
+      $edit = ['queue_name' => 'queue_example_first_queue', 'claim_time' => 0];
       $this->drupalPostForm(NULL, $edit, t('Claim the next item from the queue'));
-      $this->assertPattern(t('%Claimed item id=.*string=@string for 0 seconds.%', array('@string' => 'boogie' . $i)));
+      $this->assertPattern(t('%Claimed item id=.*string=@string for 0 seconds.%', ['@string' => 'boogie' . $i]));
     }
-    $edit = array('queue_name' => 'queue_example_first_queue', 'claim_time' => 0);
+    $edit = ['queue_name' => 'queue_example_first_queue', 'claim_time' => 0];
     $this->drupalPostForm(NULL, $edit, t('Claim the next item from the queue'));
     $this->assertText(t('There were no items in the queue available to claim'));
 
@@ -51,16 +51,16 @@ class QueueExampleTest extends BrowserTestBase {
     sleep(1);
 
     // Run cron to release expired items.
-    $this->drupalPostForm(NULL, array(), t('Run cron manually to expire claims'));
+    $this->drupalPostForm(NULL, [], t('Run cron manually to expire claims'));
 
     // Claim and delete each of the 5 items which should now be available.
     for ($i = 1; $i <= 5; $i++) {
-      $edit = array('queue_name' => 'queue_example_first_queue', 'claim_time' => 0);
+      $edit = ['queue_name' => 'queue_example_first_queue', 'claim_time' => 0];
       $this->drupalPostForm(NULL, $edit, t('Claim the next item and delete it'));
-      $this->assertPattern(t('%Claimed and deleted item id=.*string=@string for 0 seconds.%', array('@string' => 'boogie' . $i)));
+      $this->assertPattern(t('%Claimed and deleted item id=.*string=@string for 0 seconds.%', ['@string' => 'boogie' . $i]));
     }
     // Verify that nothing is left to claim.
-    $edit = array('queue_name' => 'queue_example_first_queue', 'claim_time' => 0);
+    $edit = ['queue_name' => 'queue_example_first_queue', 'claim_time' => 0];
     $this->drupalPostForm(NULL, $edit, t('Claim the next item from the queue'));
     $this->assertText(t('There were no items in the queue available to claim'));
   }
diff --git a/simpletest_example/mock/simpletest_example_test/simpletest_example_test.module b/simpletest_example/mock/simpletest_example_test/simpletest_example_test.module
index 1650762..79974f6 100644
--- a/simpletest_example/mock/simpletest_example_test/simpletest_example_test.module
+++ b/simpletest_example/mock/simpletest_example_test/simpletest_example_test.module
@@ -30,9 +30,9 @@ function simpletest_example_test_node_view(
   EntityViewDisplayInterface $display,
   $view_mode) {
   if ($node->getType() == 'simpletest_example') {
-    $build['simpletest_example_test_section'] = array(
+    $build['simpletest_example_test_section'] = [
       '#markup' => t('The test module did its thing.'),
       '#weight' => -99,
-    );
+    ];
   }
 }
diff --git a/simpletest_example/src/Tests/SimpleTestExampleMockModuleTest.php b/simpletest_example/src/Tests/SimpleTestExampleMockModuleTest.php
index 596cfd3..78824da 100644
--- a/simpletest_example/src/Tests/SimpleTestExampleMockModuleTest.php
+++ b/simpletest_example/src/Tests/SimpleTestExampleMockModuleTest.php
@@ -39,10 +39,10 @@ class SimpleTestExampleMockModuleTest extends WebTestBase {
    *
    * @var array
    */
-  static public $modules = array(
+  static public $modules = [
     'simpletest_example',
     'simpletest_example_test',
-  );
+  ];
 
   /**
    * Test modifications made by our mock module.
@@ -52,14 +52,14 @@ class SimpleTestExampleMockModuleTest extends WebTestBase {
    */
   public function testSimpleTestExampleMockModule() {
     // Create a user.
-    $test_user = $this->drupalCreateUser(array('access content'));
+    $test_user = $this->drupalCreateUser(['access content']);
     // Log them in.
     $this->drupalLogin($test_user);
     // Set up some content.
-    $settings = array(
+    $settings = [
       'type' => 'simpletest_example',
       'title' => $this->randomMachineName(32),
-    );
+    ];
     // Create the content node.
     $node = $this->drupalCreateNode($settings);
     // View the node.
diff --git a/simpletest_example/src/Tests/SimpleTestExampleTest.php b/simpletest_example/src/Tests/SimpleTestExampleTest.php
index e5c93d4..fa74570 100644
--- a/simpletest_example/src/Tests/SimpleTestExampleTest.php
+++ b/simpletest_example/src/Tests/SimpleTestExampleTest.php
@@ -37,7 +37,7 @@ class SimpleTestExampleTest extends WebTestBase {
    *
    * @var array
    */
-  static public $modules = array('simpletest_example');
+  static public $modules = ['simpletest_example'];
 
   /**
    * The installation profile to use with this test.
@@ -75,31 +75,31 @@ class SimpleTestExampleTest extends WebTestBase {
   public function testSimpleTestExampleCreate() {
     // Create a user with the ability to create our content type. This
     // permission is generated by the node module.
-    $user = $this->createUser(array('create simpletest_example content'));
+    $user = $this->createUser(['create simpletest_example content']);
     // Log in our user.
     $this->drupalLogin($user);
 
     // Create a node using the node/add form.
-    $edit = array();
+    $edit = [];
     $edit['title[0][value]'] = $this->randomMachineName(8);
     $edit['body[0][value]'] = $this->randomMachineName(16);
     $this->drupalPostForm('node/add/simpletest_example', $edit, t('Save'));
 
     // Check that our simpletest_example node has been created.
-    $this->assertText(t('@post @title has been created.', array(
+    $this->assertText(t('@post @title has been created.', [
       '@post' => 'SimpleTest Example Node Type',
       '@title' => $edit['title[0][value]'],
-    )));
+    ]));
     // Check that the node exists in the database.
     $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
     $this->assertTrue($node, 'Node found in database.');
 
     // Verify 'submitted by' information. Drupal adds a newline in there, so
     // we have to check for that.
-    $submitted_by = t("Submitted by @username\n on @datetime", array(
+    $submitted_by = t("Submitted by @username\n on @datetime", [
       '@username' => $this->loggedInUser->getUsername(),
       '@datetime' => format_date($node->getCreatedTime()),
-    ));
+    ]);
 
     $this->drupalGet('node/' . $node->id());
     $this->assertText($submitted_by);
@@ -115,16 +115,16 @@ class SimpleTestExampleTest extends WebTestBase {
    */
   public function testSimpleTestExampleEdit() {
     // Create a user with our special permission.
-    $user = $this->drupalCreateUser(array('extra special edit any simpletest_example'));
+    $user = $this->drupalCreateUser(['extra special edit any simpletest_example']);
     // Log in our user.
     $this->drupalLogin($user);
 
     // Create a node with our user as the creator.
     // drupalCreateNode() uses the logged-in user by default.
-    $settings = array(
+    $settings = [
       'type' => 'simpletest_example',
       'title' => $this->randomMachineName(32),
-    );
+    ];
     $node = $this->drupalCreateNode($settings);
 
     // For debugging, we might output some information using $this->verbose()
@@ -145,7 +145,7 @@ class SimpleTestExampleTest extends WebTestBase {
 
       // Looking for title text in the page to determine whether we were
       // successful opening edit form.
-      $this->assertText(t("@title", array('@title' => $settings['title'])), "Found title in edit form");
+      $this->assertText(t("@title", ['@title' => $settings['title']]), "Found title in edit form");
     }
   }
 
diff --git a/src/Tests/ExamplesTest.php b/src/Tests/ExamplesTest.php
index cf9dc5c..4028220 100644
--- a/src/Tests/ExamplesTest.php
+++ b/src/Tests/ExamplesTest.php
@@ -18,14 +18,14 @@ class ExamplesTest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array('examples', 'toolbar');
+  public static $modules = ['examples', 'toolbar'];
 
   /**
    * Test whether the module was installed.
    */
   public function testExamples() {
     // Verify that the toolbar tab and tray are showing and functioning.
-    $user = $this->drupalCreateUser(array('access toolbar'));
+    $user = $this->drupalCreateUser(['access toolbar']);
     $this->drupalLogin($user);
 
     // Check for the 'Examples' tab.
@@ -53,7 +53,7 @@ class ExamplesTest extends WebTestBase {
 
     // Install phpunit_example and see if it appears in the toolbar. We use
     // phpunit_example because it's very light-weight.
-    $this->container->get('module_installer')->install(array('phpunit_example'), TRUE);
+    $this->container->get('module_installer')->install(['phpunit_example'], TRUE);
     // SimpleTest needs for us to reset all the caches.
     $this->resetAll();
 
diff --git a/stream_wrapper_example/src/StreamWrapper/FileExampleSessionStreamWrapper.php b/stream_wrapper_example/src/StreamWrapper/FileExampleSessionStreamWrapper.php
index 635e746..4c89960 100644
--- a/stream_wrapper_example/src/StreamWrapper/FileExampleSessionStreamWrapper.php
+++ b/stream_wrapper_example/src/StreamWrapper/FileExampleSessionStreamWrapper.php
@@ -570,9 +570,9 @@ class FileExampleSessionStreamWrapper implements StreamWrapperInterface {
    * @see http://php.net/manual/en/streamwrapper.stream-stat.php
    */
   public function stream_stat() {
-    return array(
+    return [
       'size' => strlen($this->sessionContent),
-    );
+    ];
   }
 
   /**
@@ -769,7 +769,7 @@ class FileExampleSessionStreamWrapper implements StreamWrapperInterface {
 
       // There are no protections on this, so all writable.
       $mode |= 0777;
-      $return = array(
+      $return = [
         'dev' => 0,
         'ino' => 0,
         'mode' => $mode,
@@ -783,7 +783,7 @@ class FileExampleSessionStreamWrapper implements StreamWrapperInterface {
         'ctime' => 0,
         'blksize' => 0,
         'blocks' => 0,
-      );
+      ];
     }
     return $return;
   }
diff --git a/tablesort_example/src/Controller/TableSortExampleController.php b/tablesort_example/src/Controller/TableSortExampleController.php
index 049074f..7a600c2 100644
--- a/tablesort_example/src/Controller/TableSortExampleController.php
+++ b/tablesort_example/src/Controller/TableSortExampleController.php
@@ -42,14 +42,14 @@ class TableSortExampleController extends ControllerBase {
    */
   public function description() {
     // We are going to output the results in a table with a nice header.
-    $header = array(
+    $header = [
       // The header gives the table the information it needs in order to make
       // the query calls for ordering. TableSort uses the field information
       // to know what database column to sort by.
-      array('data' => t('Numbers'), 'field' => 't.numbers'),
-      array('data' => t('Letters'), 'field' => 't.alpha'),
-      array('data' => t('Mixture'), 'field' => 't.random'),
-    );
+      ['data' => t('Numbers'), 'field' => 't.numbers'],
+      ['data' => t('Letters'), 'field' => 't.alpha'],
+      ['data' => t('Mixture'), 'field' => 't.random'],
+    ];
 
     // Using the TableSort Extender is what tells  the query object that we
     // are sorting.
@@ -62,24 +62,24 @@ class TableSortExampleController extends ControllerBase {
       ->orderByHeader($header)
       ->execute();
 
-    $rows = array();
+    $rows = [];
     foreach ($result as $row) {
       // Normally we would add some nice formatting to our rows
       // but for our purpose we are simply going to add our row
       // to the array.
-      $rows[] = array('data' => (array) $row);
+      $rows[] = ['data' => (array) $row];
     }
 
     // Build the table for the nice output.
-    $build = array(
+    $build = [
       '#markup' => '<p>' . t('The layout here is a themed as a table
            that is sortable by clicking the header name.') . '</p>',
-    );
-    $build['tablesort_table'] = array(
+    ];
+    $build['tablesort_table'] = [
       '#theme' => 'table',
       '#header' => $header,
       '#rows' => $rows,
-    );
+    ];
 
     return $build;
   }
diff --git a/tablesort_example/tablesort_example.install b/tablesort_example/tablesort_example.install
index 5cf07ad..ac909f8 100644
--- a/tablesort_example/tablesort_example.install
+++ b/tablesort_example/tablesort_example.install
@@ -15,15 +15,15 @@
  */
 function tablesort_example_install() {
   // Let's fill the database with some values for sorting.
-  $rows = array(
-    array('numbers' => 1, 'alpha' => 'e', 'random' => '912cv21'),
-    array('numbers' => 2, 'alpha' => 'a', 'random' => '0kuykuh'),
-    array('numbers' => 3, 'alpha' => 'm', 'random' => 'fuye8734h'),
-    array('numbers' => 4, 'alpha' => 'w', 'random' => '80jsv772'),
-    array('numbers' => 5, 'alpha' => 'o', 'random' => 'd82sf-csj'),
-    array('numbers' => 6, 'alpha' => 's', 'random' => 'au832'),
-    array('numbers' => 7, 'alpha' => 'e', 'random' => 't982hkv'),
-  );
+  $rows = [
+    ['numbers' => 1, 'alpha' => 'e', 'random' => '912cv21'],
+    ['numbers' => 2, 'alpha' => 'a', 'random' => '0kuykuh'],
+    ['numbers' => 3, 'alpha' => 'm', 'random' => 'fuye8734h'],
+    ['numbers' => 4, 'alpha' => 'w', 'random' => '80jsv772'],
+    ['numbers' => 5, 'alpha' => 'o', 'random' => 'd82sf-csj'],
+    ['numbers' => 6, 'alpha' => 's', 'random' => 'au832'],
+    ['numbers' => 7, 'alpha' => 'e', 'random' => 't982hkv'],
+  ];
 
   $db_connection = \Drupal::database();
   if ($db_connection->schema()->tableExists('tablesort_example')) {
@@ -51,30 +51,30 @@ function tablesort_example_uninstall() {
  * @ingroup tablesort_example
  */
 function tablesort_example_schema() {
-  $schema['tablesort_example'] = array(
+  $schema['tablesort_example'] = [
     'description' => 'Stores some values for sorting fun.',
-    'fields' => array(
-      'numbers' => array(
+    'fields' => [
+      'numbers' => [
         'description' => 'This column simply holds numbers values',
         'type' => 'varchar',
         'length' => 2,
         'not null' => TRUE,
-      ),
-      'alpha' => array(
+      ],
+      'alpha' => [
         'description' => 'This column simply holds alpha values',
         'type' => 'varchar',
         'length' => 2,
         'not null' => TRUE,
-      ),
-      'random' => array(
+      ],
+      'random' => [
         'description' => 'This column simply holds random values',
         'type' => 'varchar',
         'length' => 12,
         'not null' => TRUE,
-      ),
-    ),
-    'primary key' => array('numbers'),
-  );
+      ],
+    ],
+    'primary key' => ['numbers'],
+  ];
 
   return $schema;
 }
diff --git a/tablesort_example/tests/src/Functional/TableSortExampleTest.php b/tablesort_example/tests/src/Functional/TableSortExampleTest.php
index dd03eea..201bc02 100644
--- a/tablesort_example/tests/src/Functional/TableSortExampleTest.php
+++ b/tablesort_example/tests/src/Functional/TableSortExampleTest.php
@@ -17,7 +17,7 @@ class TableSortExampleTest extends ExamplesBrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = array('tablesort_example');
+  public static $modules = ['tablesort_example'];
 
   /**
    * The installation profile to use with this test.
@@ -36,39 +36,39 @@ class TableSortExampleTest extends ExamplesBrowserTestBase {
     $assert = $this->assertSession();
 
     // No need to login for this test.
-    $this->drupalGet('/examples/tablesort-example', array('query' => array('sort' => 'desc', 'order' => 'Numbers')));
+    $this->drupalGet('/examples/tablesort-example', ['query' => ['sort' => 'desc', 'order' => 'Numbers']]);
     $assert->statusCodeEquals(200);
     // Ordered by number decending.
     $item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[1]');
     $this->assertEquals(7, $item->getText(), 'Ordered by number decending.');
 
-    $this->drupalGet('/examples/tablesort-example', array('query' => array('sort' => 'asc', 'order' => 'Numbers')));
+    $this->drupalGet('/examples/tablesort-example', ['query' => ['sort' => 'asc', 'order' => 'Numbers']]);
     $assert->statusCodeEquals(200);
     // Ordered by Number ascending.
     $item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[1]');
     $this->assertEquals(1, $item->getText(), 'Ordered by Number ascending.');
 
     // Sort by Letters.
-    $this->drupalGet('/examples/tablesort-example', array('query' => array('sort' => 'desc', 'order' => 'Letters')));
+    $this->drupalGet('/examples/tablesort-example', ['query' => ['sort' => 'desc', 'order' => 'Letters']]);
     $assert->statusCodeEquals(200);
     // Ordered by Letters decending.
     $item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[2]');
     $this->assertEquals('w', $item->getText(), 'Ordered by Letters decending.');
 
-    $this->drupalGet('/examples/tablesort-example', array('query' => array('sort' => 'asc', 'order' => 'Letters')));
+    $this->drupalGet('/examples/tablesort-example', ['query' => ['sort' => 'asc', 'order' => 'Letters']]);
     $assert->statusCodeEquals(200);
     // Ordered by Letters ascending.
     $item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[2]');
     $this->assertEquals('a', $item->getText(), 'Ordered by Letters ascending.');
 
     // Sort by Mixture.
-    $this->drupalGet('/examples/tablesort-example', array('query' => array('sort' => 'desc', 'order' => 'Mixture')));
+    $this->drupalGet('/examples/tablesort-example', ['query' => ['sort' => 'desc', 'order' => 'Mixture']]);
     $assert->statusCodeEquals(200);
     // Ordered by Mixture decending.
     $item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[3]');
     $this->assertEquals('t982hkv', $item->getText(), 'Ordered by Mixture decending.');
 
-    $this->drupalGet('/examples/tablesort-example', array('query' => array('sort' => 'asc', 'order' => 'Mixture')));
+    $this->drupalGet('/examples/tablesort-example', ['query' => ['sort' => 'asc', 'order' => 'Mixture']]);
     $assert->statusCodeEquals(200);
     // Ordered by Mixture ascending.
     $item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[3]');
@@ -85,9 +85,9 @@ class TableSortExampleTest extends ExamplesBrowserTestBase {
    *   The value is the link that should appear on that page.
    */
   protected function providerMenuLinks() {
-    return array(
+    return [
       '' => '/examples/tablesort-example',
-    );
+    ];
   }
 
   /**
diff --git a/tests/src/Functional/ExamplesBrowserTestBase.php b/tests/src/Functional/ExamplesBrowserTestBase.php
index 00cbfec..70c599d 100644
--- a/tests/src/Functional/ExamplesBrowserTestBase.php
+++ b/tests/src/Functional/ExamplesBrowserTestBase.php
@@ -17,7 +17,7 @@ abstract class ExamplesBrowserTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('examples', 'block');
+  public static $modules = ['examples', 'block'];
 
   /**
    * {@inheritdoc}
diff --git a/tests/src/Functional/ExamplesTest.php b/tests/src/Functional/ExamplesTest.php
index 9536000..66c35a0 100644
--- a/tests/src/Functional/ExamplesTest.php
+++ b/tests/src/Functional/ExamplesTest.php
@@ -16,7 +16,7 @@ class ExamplesTest extends ExamplesBrowserTestBase {
    *
    * @var array
    */
-  public static $modules = array('examples', 'toolbar');
+  public static $modules = ['examples', 'toolbar'];
 
   /**
    * Test whether the module was installed.
@@ -25,7 +25,7 @@ class ExamplesTest extends ExamplesBrowserTestBase {
     $assert = $this->assertSession();
 
     // Verify that the toolbar tab and tray are showing and functioning.
-    $user = $this->drupalCreateUser(array('access toolbar'));
+    $user = $this->drupalCreateUser(['access toolbar']);
     $this->drupalLogin($user);
 
     // Check for the 'Examples' tab.
@@ -54,7 +54,7 @@ class ExamplesTest extends ExamplesBrowserTestBase {
 
     // Install phpunit_example and see if it appears in the toolbar. We use
     // phpunit_example because it's very light-weight.
-    $this->container->get('module_installer')->install(array('phpunit_example'), TRUE);
+    $this->container->get('module_installer')->install(['phpunit_example'], TRUE);
     // SimpleTest needs for us to reset all the caches.
     $this->resetAll();
 
diff --git a/tour_example/tests/src/Functional/TourExampleTest.php b/tour_example/tests/src/Functional/TourExampleTest.php
index 0b7defb..672406b 100644
--- a/tour_example/tests/src/Functional/TourExampleTest.php
+++ b/tour_example/tests/src/Functional/TourExampleTest.php
@@ -19,7 +19,7 @@ class TourExampleTest extends TourTestBasic {
    *
    * @var array
    */
-  public static $modules = array('tour', 'tour_example');
+  public static $modules = ['tour', 'tour_example'];
 
   /**
    * The installation profile to use with this test.
diff --git a/tour_example/tests/src/Functional/TourTestBase.php b/tour_example/tests/src/Functional/TourTestBase.php
index 8d813d9..d9c703f 100644
--- a/tour_example/tests/src/Functional/TourTestBase.php
+++ b/tour_example/tests/src/Functional/TourTestBase.php
@@ -31,7 +31,7 @@ abstract class TourTestBase extends ExamplesBrowserTestBase {
    * $this->assertTourTips($tips);
    * @endcode
    */
-  public function assertTourTips(array $tips = array()) {
+  public function assertTourTips(array $tips = []) {
     $assert = $this->assertSession();
     // Get the rendered tips and their data-id and data-class attributes.
     if (empty($tips)) {
@@ -62,12 +62,12 @@ abstract class TourTestBase extends ExamplesBrowserTestBase {
       foreach ($tips as $tip) {
         if (!empty($tip['data-id'])) {
           $elements = $this->getSession()->getPage()->find('css', "#{$tip['data-id']}");
-          $this->assertTrue(!empty($elements) && count($elements) === 1, format_string('Found corresponding page element for tour tip with id #%data-id', array('%data-id' => $tip['data-id'])));
+          $this->assertTrue(!empty($elements) && count($elements) === 1, format_string('Found corresponding page element for tour tip with id #%data-id', ['%data-id' => $tip['data-id']]));
         }
         elseif (!empty($tip['data-class'])) {
           $elements = $this->getSession()->getPage()->find('css', "#{$tip['data-class']}");
 
-          $this->assertFalse(empty($elements), format_string('Found corresponding page element for tour tip with class .%data-class', array('%data-class' => $tip['data-class'])));
+          $this->assertFalse(empty($elements), format_string('Found corresponding page element for tour tip with class .%data-class', ['%data-class' => $tip['data-class']]));
         }
         else {
           // It's a modal.
@@ -75,7 +75,7 @@ abstract class TourTestBase extends ExamplesBrowserTestBase {
         }
         $total++;
       }
-      $this->verbose(format_string('Total %total Tips tested of which %modals modal(s).', array('%total' => $total, '%modals' => $modals)));
+      $this->verbose(format_string('Total %total Tips tested of which %modals modal(s).', ['%total' => $total, '%modals' => $modals]));
     }
   }
 
diff --git a/tour_example/tests/src/Functional/TourTestBasic.php b/tour_example/tests/src/Functional/TourTestBasic.php
index 8b11c19..a206378 100644
--- a/tour_example/tests/src/Functional/TourTestBasic.php
+++ b/tour_example/tests/src/Functional/TourTestBasic.php
@@ -25,7 +25,7 @@ abstract class TourTestBasic extends TourTestBase {
    * );
    * @endcode
    */
-  protected $tips = array();
+  protected $tips = [];
 
   /**
    * An admin user with administrative permissions for tour.
@@ -40,7 +40,7 @@ abstract class TourTestBasic extends TourTestBase {
    * @var array
    *   A list of permissions.
    */
-  protected $permissions = array('access tour');
+  protected $permissions = ['access tour'];
 
   /**
    * {@inheritdoc}
@@ -50,7 +50,7 @@ abstract class TourTestBasic extends TourTestBase {
 
     // Make sure we are using distinct default and administrative themes for
     // the duration of these tests.
-    $this->container->get('theme_handler')->install(array('bartik', 'seven'));
+    $this->container->get('theme_handler')->install(['bartik', 'seven']);
     $this->config('system.theme')
       ->set('default', 'bartik')
       ->set('admin', 'seven')
