diff --git a/API.txt b/API.txt
index 729f701..bc49504 100644
--- a/API.txt
+++ b/API.txt
@@ -103,7 +103,7 @@ VotingAPI provides Views Relationship connections for votes cast on nodes and co
 
 
 function mymodule_votingapi_relationships() {
-  $relationships[] = array(
+  $relationships[] = [
     // 'description' is used to construct the field description in the Views UI.
     'description' => t('nodes'),
     // 'entity_type' contain the value that your module stores in the voting
@@ -123,7 +123,7 @@ function mymodule_votingapi_relationships() {
     // nedjo.
     'pseudo_vote' => 'votingapi_vote',
     'pseudo_cache' => 'votingapi_cache',
-  );
+  ];
   return $relationships;
 }
 
@@ -133,9 +133,9 @@ VotingAPI's Views integration can present vote results as simple numbers, but mo
 
 function mymodule_votingapi_views_formatters($field) {
   if ($field->field == 'value') {
-    return array('mymodule_funky_formatter' => t('MyModule value formatter'));
+    return ['mymodule_funky_formatter' => t('MyModule value formatter')];
   }
   if ($field->field == 'tag') {
-    return array('mymodule_funky_tags' => t('MyModule tag formatter'));
+    return ['mymodule_funky_tags' => t('MyModule tag formatter')];
   }
 }
diff --git a/src/Entity/Vote.php b/src/Entity/Vote.php
index 7e8ea06..57e9c91 100644
--- a/src/Entity/Vote.php
+++ b/src/Entity/Vote.php
@@ -180,9 +180,9 @@ class Vote extends ContentEntityBase implements VoteInterface {
       ->setLabel(t('Entity Type'))
       ->setDescription(t('The type from the voted entity.'))
       ->setDefaultValue('node')
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 64
-      ))
+      ])
       ->setRequired(TRUE);
 
     $fields['entity_id'] = BaseFieldDefinition::create('entity_reference')
@@ -199,9 +199,9 @@ class Vote extends ContentEntityBase implements VoteInterface {
 
     $fields['value_type'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Value Type'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 64
-      ))
+      ])
       ->setDefaultValue('percent');
 
     $fields['user_id'] = BaseFieldDefinition::create('entity_reference')
@@ -219,9 +219,9 @@ class Vote extends ContentEntityBase implements VoteInterface {
       ->setLabel(t('Vote Source'))
       ->setDescription(t('The IP from the user who submitted the vote.'))
       ->setDefaultValueCallback('Drupal\votingapi\Entity\Vote::getCurrentIp')
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 255
-      ));
+      ]);
 
     return $fields;
   }
diff --git a/src/Entity/VoteResult.php b/src/Entity/VoteResult.php
index f418d95..be90bec 100644
--- a/src/Entity/VoteResult.php
+++ b/src/Entity/VoteResult.php
@@ -167,9 +167,9 @@ class VoteResult extends ContentEntityBase implements VoteResultInterface {
     $fields['entity_type'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Entity Type'))
       ->setDescription(t('The type from the voted entity.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 64
-      ))
+      ])
       ->setRequired(TRUE);
 
     $fields['entity_id'] = BaseFieldDefinition::create('entity_reference')
@@ -184,17 +184,17 @@ class VoteResult extends ContentEntityBase implements VoteResultInterface {
 
     $fields['value_type'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Value Type'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 64
-      ))
+      ])
       ->setRequired(TRUE);
 
     $fields['function'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Function'))
       ->setDescription(t('Function to apply to the numbers.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 50
-      ))
+      ])
       ->setRequired(TRUE);
 
     $fields['timestamp'] = BaseFieldDefinition::create('created')
diff --git a/src/Entity/VoteViewsData.php b/src/Entity/VoteViewsData.php
index a0dfa07..7d9dac2 100644
--- a/src/Entity/VoteViewsData.php
+++ b/src/Entity/VoteViewsData.php
@@ -20,11 +20,11 @@ class VoteViewsData extends EntityViewsData implements EntityViewsDataInterface
   public function getViewsData() {
     $data = parent::getViewsData();
 
-    $data['votingapi_vote']['table']['base'] = array(
+    $data['votingapi_vote']['table']['base'] = [
       'field' => 'id',
       'title' => $this->t('Vote'),
       'help' => $this->t('The Vote ID.'),
-    );
+    ];
 
     return $data;
   }
diff --git a/src/Form/SettingsForm.php b/src/Form/SettingsForm.php
index 94f9172..e13b702 100644
--- a/src/Form/SettingsForm.php
+++ b/src/Form/SettingsForm.php
@@ -105,34 +105,34 @@ class SettingsForm extends ConfigFormBase {
       $options[$option] = $this->dateFormatter->formatInterval($option);;
     }
 
-    $form['anonymous_window'] = array(
+    $form['anonymous_window'] = [
       '#type' => 'select',
       '#title' => $this->t('Anonymous vote rollover'),
       '#description' => $this->t('The amount of time that must pass before two anonymous votes from the same computer are considered unique. Setting this to \'never\' will eliminate most double-voting, but will make it impossible for multiple anonymous on the same computer (like internet cafe customers) from casting votes.'),
       '#options' => $options,
       '#default_value' => $config->get('anonymous_window'),
-    );
+    ];
 
-    $form['user_window'] = array(
+    $form['user_window'] = [
       '#type' => 'select',
       '#title' => $this->t('Registered user vote rollover'),
       '#description' => $this->t('The amount of time that must pass before two registered user votes from the same user ID are considered unique. Setting this to \'never\' will eliminate most double-voting for registered users.'),
       '#options' => $options,
       '#default_value' => $config->get('user_window'),
-    );
+    ];
 
-    $form['calculation_schedule'] = array(
+    $form['calculation_schedule'] = [
       '#type' => 'radios',
       '#title' => $this->t('Calculation schedule'),
       '#description' => $this->t('On high-traffic sites, administrators can use this setting to postpone the calculation of vote results.'),
       '#default_value' => $config->get('calculation_schedule'),
-      '#options' => array(
+      '#options' => [
         'immediate' => $this->t('Tally results whenever a vote is cast'),
         'cron' => $this->t('Tally results at cron-time'),
         'manual' => $this->t('Do not tally results automatically: I am using a module that manages its own vote results.')
-      ),
+      ],
       '#required' => TRUE,
-    );
+    ];
 
     return parent::buildForm($form, $form_state);
   }
diff --git a/src/Form/VoteTypeDeleteConfirm.php b/src/Form/VoteTypeDeleteConfirm.php
index 211e54f..036d692 100644
--- a/src/Form/VoteTypeDeleteConfirm.php
+++ b/src/Form/VoteTypeDeleteConfirm.php
@@ -52,9 +52,9 @@ class VoteTypeDeleteConfirm extends EntityDeleteForm {
       ->count()
       ->execute();
     if ($num_nodes) {
-      $caption = '<p>' . $this->formatPlural($num_nodes, '%type is used by 1 piece of content on your site. You can not remove this vote type until you have removed that vote.', '%type is used by @count pieces of content on your site. You may not remove %type until you have removed all of the %type votes.', array('%type' => $this->entity->label())) . '</p>';
+      $caption = '<p>' . $this->formatPlural($num_nodes, '%type is used by 1 piece of content on your site. You can not remove this vote type until you have removed that vote.', '%type is used by @count pieces of content on your site. You may not remove %type until you have removed all of the %type votes.', ['%type' => $this->entity->label()]) . '</p>';
       $form['#title'] = $this->getQuestion();
-      $form['description'] = array('#markup' => $caption);
+      $form['description'] = ['#markup' => $caption];
       return $form;
     }
 
diff --git a/src/Tests/VoteCreationTest.php b/src/Tests/VoteCreationTest.php
index 8b8ab3d..a4c85ae 100644
--- a/src/Tests/VoteCreationTest.php
+++ b/src/Tests/VoteCreationTest.php
@@ -23,7 +23,7 @@ class VoteCreationTest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array('node', 'votingapi', 'votingapi_test');
+  public static $modules = ['node', 'votingapi', 'votingapi_test'];
 
   /**
    * A simple user with basic node and vote permissions
@@ -52,11 +52,11 @@ class VoteCreationTest extends WebTestBase {
 
     // Create Basic page and Article node types.
     if ($this->profile != 'standard') {
-      $node_type = $this->drupalCreateContentType(array(
+      $node_type = $this->drupalCreateContentType([
         'type' => 'page',
         'name' => 'Basic page',
         'display_submitted' => FALSE,
-      ));
+      ]);
       node_add_body_field($node_type);
     }
 
diff --git a/src/Tests/VoteTest.php b/src/Tests/VoteTest.php
index 4141c60..c66e181 100644
--- a/src/Tests/VoteTest.php
+++ b/src/Tests/VoteTest.php
@@ -38,13 +38,13 @@ class VoteTest extends WebTestBase {
 
     // Add a vote to a node.
     /** @var \Drupal\votingapi\VoteInterface $vote */
-    $vote = $vote_storage->create(array(
+    $vote = $vote_storage->create([
       'type' => 'type',
       'entity_id' => $node->id(),
       'entity_type' => 'node',
       'user_id' => $user->id(),
       'value' => -1,
-    ));
+    ]);
     $vote->save();
     $votes = $query->execute();
     $this->assertEqual(count($votes), 1, 'After a vote is cast on a node, it can be retrieved.');
@@ -55,11 +55,11 @@ class VoteTest extends WebTestBase {
     $this->assertNotEqual($vote->getSource(), '', 'A vote with no explicit source received the default value.');
 
     // Add a vote to a user
-    $vote = $vote_storage->create(array(
+    $vote = $vote_storage->create([
       'type' => 'vote',
       'entity_id' => $user->id(),
       'entity_type' => 'user',
-    ));
+    ]);
     $vote->save();
 
     $vote_query = $this->container->get('entity.query')->get('vote');
@@ -73,7 +73,7 @@ class VoteTest extends WebTestBase {
     $this->assertEqual($vote->getValue(), 0, 'A vote with no explicit value received the default value.');
 
     // Deleting entity deletes votes
-    entity_delete_multiple('user', array($user->id()));
+    entity_delete_multiple('user', [$user->id()]);
     $votes = $query->execute();
     $this->assertEqual(count($votes), 0, 'When an entity is deleted, the votes are also deleted.');
   }
@@ -88,15 +88,15 @@ class VoteTest extends WebTestBase {
     $manager = $this->container->get('plugin.manager.votingapi.resultfunction');
 
     // Save a few votes so that we have data.
-    $values = array(10, 20, 60);
+    $values = [10, 20, 60];
     foreach ($values as $value) {
-      $vote_storage->create(array(
+      $vote_storage->create([
         'type' => 'vote',
         'entity_id' => $node->id(),
         'entity_type' => 'node',
         'user_id' => $user->id(),
         'value' => $value,
-      ))->save();
+      ])->save();
     }
 
     $results = $manager->getResults('node', $node->id());
@@ -118,7 +118,7 @@ class VoteTest extends WebTestBase {
     // $this->assertEqual($results['vote']['zebra'], 10101, 'New result is correct.');
 
     // Deleting entity removes results
-    entity_delete_multiple('node', array($node->id()));
+    entity_delete_multiple('node', [$node->id()]);
     $results = $manager->getResults('node', $node->id());
     $this->assertTrue(empty($results), 'When an entity is deleted, the voting results are also deleted.');
   }
diff --git a/src/VoteResultFunctionManager.php b/src/VoteResultFunctionManager.php
index 084a79d..deaeb7d 100644
--- a/src/VoteResultFunctionManager.php
+++ b/src/VoteResultFunctionManager.php
@@ -53,10 +53,10 @@ class VoteResultFunctionManager extends DefaultPluginManager {
    *   An nested array
    */
   public function getResults($entity_type_id, $entity_id) {
-    $results = array();
+    $results = [];
 
     $result = db_select('votingapi_result', 'v')
-      ->fields('v', array('type', 'function', 'value'))
+      ->fields('v', ['type', 'function', 'value'])
       ->condition('entity_type', $entity_type_id)
       ->condition('entity_id', $entity_id)
       ->execute();
@@ -97,7 +97,7 @@ class VoteResultFunctionManager extends DefaultPluginManager {
       ->sort('type')
       ->execute();
     $vote_storage = \Drupal::entityManager()->getStorage('vote');
-    $votes = array();
+    $votes = [];
     $vote_type = '';
     if (!empty($vote_ids)) {
       foreach ($vote_ids as $vote_id) {
@@ -108,7 +108,7 @@ class VoteResultFunctionManager extends DefaultPluginManager {
         if (!empty($vote_type) && $vote_type != $vote->bundle()) {
           $this->performAndStore($votes);
           $vote_type = $vote->bundle();
-          $votes = array();
+          $votes = [];
         }
         $votes[] = $vote;
       }
@@ -133,14 +133,14 @@ class VoteResultFunctionManager extends DefaultPluginManager {
 
     foreach ($this->getDefinitions() as $plugin_id => $definition) {
       $plugin = $this->createInstance($plugin_id);
-      db_insert('votingapi_result')->fields(array(
+      db_insert('votingapi_result')->fields([
         'entity_id' => $entity_id,
         'entity_type' => $entity_type_id,
         'type' => $vote_type,
         'function' => $plugin_id,
         'value' => $plugin->calculateResult($votes),
         'timestamp' => REQUEST_TIME,
-      ))->execute();
+      ])->execute();
     }
   }
 }
\ No newline at end of file
diff --git a/src/VoteTypeForm.php b/src/VoteTypeForm.php
index dc639c4..e5839e4 100644
--- a/src/VoteTypeForm.php
+++ b/src/VoteTypeForm.php
@@ -55,46 +55,46 @@ class VoteTypeForm extends EntityForm {
       $form['#title'] = $this->t('Add vote type');
     }
     else {
-      $form['#title'] = $this->t('Edit %label vote type', array('%label' => $type->label()));
+      $form['#title'] = $this->t('Edit %label vote type', ['%label' => $type->label()]);
     }
 
-    $form['label'] = array(
+    $form['label'] = [
       '#title' => t('Name'),
       '#type' => 'textfield',
       '#default_value' => $type->label(),
       '#description' => t('The human-readable name of this vote type. This text will be displayed as part of the list on the <em>Add vote type</em> page. This name must be unique.'),
       '#required' => TRUE,
       '#size' => 30,
-    );
+    ];
 
-    $form['id'] = array(
+    $form['id'] = [
       '#type' => 'machine_name',
       '#default_value' => $type->id(),
       '#maxlength' => EntityTypeInterface::BUNDLE_MAX_LENGTH,
-      '#machine_name' => array(
+      '#machine_name' => [
         'exists' => ['Drupal\votingapi\Entity\VoteType', 'load'],
-        'source' => array('label'),
-      ),
-      '#description' => t('A unique machine-readable name for this vote type. It must only contain lowercase letters, numbers, and underscores.', array(
+        'source' => ['label'],
+      ],
+      '#description' => t('A unique machine-readable name for this vote type. It must only contain lowercase letters, numbers, and underscores.', [
         '%vote-add' => t('Add vote type'),
-      )),
-    );
+      ]),
+    ];
 
-    $form['value_type'] = array(
+    $form['value_type'] = [
       '#title' => t('Value type'),
       '#type' => 'textfield',
       '#default_value' => $type->getValueType() ? $type->getValueType() : 'points',
       '#description' => t('The type of value for this vote (percentage, points, etc.)'),
       '#required' => TRUE,
       '#size' => 30,
-    );
+    ];
 
-    $form['description'] = array(
+    $form['description'] = [
       '#title' => t('Description'),
       '#type' => 'textarea',
       '#default_value' => $type->getDescription(),
       '#description' => t('Describe this vote type. The text will be displayed on administrative pages.'),
-    );
+    ];
 
     return $form;
   }
@@ -118,7 +118,7 @@ class VoteTypeForm extends EntityForm {
     $id = trim($form_state->getValue('type'));
     // '0' is invalid, since elsewhere we check it using empty().
     if ($id == '0') {
-      $form_state->setErrorByName('type', $this->t("Invalid machine-readable name. Enter a name other than %invalid.", array('%invalid' => $id)));
+      $form_state->setErrorByName('type', $this->t("Invalid machine-readable name. Enter a name other than %invalid.", ['%invalid' => $id]));
     }
   }
 
@@ -134,14 +134,14 @@ class VoteTypeForm extends EntityForm {
 
     $status = $type->save();
 
-    $t_args = array('%name' => $type->label());
+    $t_args = ['%name' => $type->label()];
 
     if ($status == SAVED_UPDATED) {
       drupal_set_message(t('The vote type %name has been updated.', $t_args));
     }
     elseif ($status == SAVED_NEW) {
       drupal_set_message(t('The vote type %name has been added.', $t_args));
-      $context = array_merge($t_args, array('link' => $type->link($this->t('View'), 'collection')));
+      $context = array_merge($t_args, ['link' => $type->link($this->t('View'), 'collection')]);
       $this->logger('vote')->notice('Added vote type %name.', $context);
     }
 
diff --git a/src/VoteTypeListBuilder.php b/src/VoteTypeListBuilder.php
index 647bd24..384db6c 100644
--- a/src/VoteTypeListBuilder.php
+++ b/src/VoteTypeListBuilder.php
@@ -25,10 +25,10 @@ class VoteTypeListBuilder extends ConfigEntityListBuilder {
     $header['id'] = t('Id');
     $header['label'] = t('Label');
     $header['value_type'] = t('Value type');
-    $header['description'] = array(
+    $header['description'] = [
       'data' => t('Description'),
-      'class' => array(RESPONSIVE_PRIORITY_MEDIUM),
-    );
+      'class' => [RESPONSIVE_PRIORITY_MEDIUM],
+    ];
     return $header + parent::buildHeader();
   }
 
@@ -37,10 +37,10 @@ class VoteTypeListBuilder extends ConfigEntityListBuilder {
    */
   public function buildRow(EntityInterface $entity) {
     $row['id']['data'] = ['#markup' => $entity->id()];
-    $row['label'] = array(
+    $row['label'] = [
       'data' => $entity->label(),
-      'class' => array('menu-label'),
-    );
+      'class' => ['menu-label'],
+    ];
     $row['value_type']['data'] = ['#markup' => $entity->getValueType()];
     $row['description']['data'] = ['#markup' => $entity->getDescription()];
     return $row + parent::buildRow($entity);
diff --git a/votingapi.api.php b/votingapi.api.php
index 71ca653..16ea96c 100644
--- a/votingapi.api.php
+++ b/votingapi.api.php
@@ -87,29 +87,29 @@ function hook_votingapi_results_alter(&$vote_results, $content_type, $content_id
  */
 function hook_votingapi_metadata_alter(&$data) {
   // Document several custom tags for rating restaurants and meals.
-  $data['tags']['bread'] = array(
+  $data['tags']['bread'] = [
     'name' => t('Bread'),
     'description' => t('The quality of the food at a restaurant.'),
     'module' => 'mymodule',
     // This is optional; we can add it for our own purposes.
-  );
-  $data['tags']['circuses'] = array(
+  ];
+  $data['tags']['circuses'] = [
     'name' => t('Circuses'),
     'description' => t('The quality of the presentation and atmosphere at a restaurant.'),
     'module' => 'mymodule',
-  );
+  ];
 
   // Document two custom aggregate function.
-  $data['functions']['standard_deviation'] = array(
+  $data['functions']['standard_deviation'] = [
     'name' => t('Standard deviation'),
     'description' => t('The standard deviation of all votes cast on a given piece of content. Use this to find controversial content.'),
     'module' => 'mymodule',
-  );
-  $data['functions']['median'] = array(
+  ];
+  $data['functions']['median'] = [
     'name' => t('Median vote'),
     'description' => t('The median vote value cast on a given piece of content. More accurate than a pure average when there are a few outlying votes.'),
     'module' => 'mymodule',
-  );
+  ];
 }
 
 /**
@@ -131,10 +131,10 @@ function hook_votingapi_metadata_alter(&$data) {
  */
 function hook_votingapi_views_formatters($field) {
   if ($field->field == 'value') {
-    return array('mymodule_funky_formatter' => t('MyModule value formatter'));
+    return ['mymodule_funky_formatter' => t('MyModule value formatter')];
   }
   if ($field->field == 'tag') {
-    return array('mymodule_funky_tags' => t('MyModule tag formatter'));
+    return ['mymodule_funky_tags' => t('MyModule tag formatter')];
   }
 }
 
@@ -164,7 +164,7 @@ class Mongodb_VoteStorage {
    *   A list of the 'vote_id' values from $votes.
    */
   function deleteVotes($votes, $vids) {
-    mongodb_collection('votingapi_vote')->delete(array('vote_id' => array('$in' => array_map('intval', $vids))));
+    mongodb_collection('votingapi_vote')->delete(['vote_id' => ['$in' => array_map('intval', $vids)]]);
   }
 
   /**
@@ -178,15 +178,15 @@ class Mongodb_VoteStorage {
    *   An array of VotingApi_Vote objects matching the criteria.
    */
   function selectVotes($criteria, $limit) {
-    $find = array();
+    $find = [];
     foreach ($criteria as $key => $value) {
-      $find[$key] = is_array($value) ? array('$in' => $value) : $value;
+      $find[$key] = is_array($value) ? ['$in' => $value] : $value;
     }
     $cursor = mongodb_collection('votingapi_vote')->find($find);
     if (!empty($limit)) {
       $cursor->limit($limit);
     }
-    $votes = array();
+    $votes = [];
     foreach ($cursor as $vote) {
       $votes[] = $vote;
     }
diff --git a/votingapi.drush.inc b/votingapi.drush.inc
index 800fa98..107d6d8 100644
--- a/votingapi.drush.inc
+++ b/votingapi.drush.inc
@@ -24,36 +24,36 @@ function votingapi_drush_help($section) {
  * Implements of hook_drush_command().
  */
 function votingapi_drush_command() {
-  $items['generate-votes'] = array(
+  $items['generate-votes'] = [
     'description' => 'Creates dummy voting data.',
-    'arguments' => array(
+    'arguments' => [
       'entity_type' => 'The type of entity to generate votes for.',
       'vote_type' => 'The type of votes to generate, defaults to \'percent\'.',
-    ),
-    'drupal dependencies' => array('devel_generate'),
-    'options' => array(
+    ],
+    'drupal dependencies' => ['devel_generate'],
+    'options' => [
       'kill' => 'Specify \'kill\' to delete all existing votes before generating new ones.',
       'age' => 'The maximum age, in seconds, of each vote.',
       'node_types' => 'A comma delimited list of node types to generate votes for, if the entity type is \'node\'.',
-    ),
-    'aliases' => array('genv'),
-  );
-  $items['votingapi-recalculate'] = array(
+    ],
+    'aliases' => ['genv'],
+  ];
+  $items['votingapi-recalculate'] = [
     'description' => 'Regenerates voting results from raw vote data.',
     'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_LOGIN, // Various D7 code assumes we have a uid.
-    'arguments' => array(
+    'arguments' => [
       'entity_type' => 'The type of entity to recalculate vote results for.',
-    ),
-    'aliases' => array('vcalc'),
-  );
-  $items['votingapi-flush'] = array(
+    ],
+    'aliases' => ['vcalc'],
+  ];
+  $items['votingapi-flush'] = [
     'description' => 'Deletes all existing voting data.',
     'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_LOGIN, // Various D7 code assumes we have a uid.
-    'arguments' => array(
+    'arguments' => [
       'entity_type' => 'The type of entity whose voting data should be flushed.',
-    ),
-    'aliases' => array('vflush'),
-  );
+    ],
+    'aliases' => ['vflush'],
+  ];
   return $items;
 }
 
@@ -62,27 +62,27 @@ function votingapi_drush_command() {
  * Command callback. Generate a number of votes.
  */
 function drush_votingapi_generate_votes($entity_type = 'node', $vote_type = 'percent') {
-  $options = array(
+  $options = [
     'kill' => drush_get_option('kill'),
     'age' => drush_get_option('age'),
     'types' => drush_get_option('types'),
-  );
+  ];
 
   votingapi_generate_votes($entity_type, $vote_type, $options);
 
-  drush_log(t('Generating @vtype votes for @etype entities.', array('@vtype' => $vote_type, '@etype' => $entity_type)), 'success');
+  drush_log(t('Generating @vtype votes for @etype entities.', ['@vtype' => $vote_type, '@etype' => $entity_type]), 'success');
 }
 
 /**
  * Utility function to generate votes.
  */
-function votingapi_generate_votes($entity_type = 'node', $vote_type = 'percent', $options = array()) {
+function votingapi_generate_votes($entity_type = 'node', $vote_type = 'percent', $options = []) {
   module_load_include('inc', 'devel_generate');
-  $options += array(
+  $options += [
     'age' => 36000,
-    'types' => array(),
+    'types' => [],
     'kill' => FALSE,
-  );
+  ];
 
   if (!empty($options['kill_votes'])) {
     db_truncate('votingapi_vote');
@@ -98,7 +98,7 @@ function votingapi_generate_votes($entity_type = 'node', $vote_type = 'percent',
   }
   $uids = devel_get_users();
 
-  $query = db_select($entity_type, 'e')->fields('e', array($entity_id_column));
+  $query = db_select($entity_type, 'e')->fields('e', [$entity_id_column]);
   if ($entity_type == 'node' && !empty($options['types'])) {
     $query->condition('e.type', $options['types'], 'IN');
   }
@@ -112,8 +112,8 @@ function votingapi_generate_votes($entity_type = 'node', $vote_type = 'percent',
 /**
  * Utility function to generate votes on a node by a set of users.
  */
-function _votingapi_cast_votes($etype, $eid, $timestamp = 0, $uids = array(), $style = 'percent') {
-  $votes = array();
+function _votingapi_cast_votes($etype, $eid, $timestamp = 0, $uids = [], $style = 'percent') {
+  $votes = [];
   static $tags;
   if (!isset($tags)) {
     $tags = explode(' ', devel_create_greeking(30));
@@ -121,7 +121,7 @@ function _votingapi_cast_votes($etype, $eid, $timestamp = 0, $uids = array(), $s
   foreach ($uids as $uid) {
     switch ($style) {
       case 'percent':
-        $votes[] = array(
+        $votes[] = [
           'uid' => $uid,
           'entity_type' => $etype,
           'entity_id' => $eid,
@@ -129,23 +129,23 @@ function _votingapi_cast_votes($etype, $eid, $timestamp = 0, $uids = array(), $s
           'timestamp' => REQUEST_TIME - mt_rand(0, $timestamp),
           'value' => mt_rand(1, 5) * 20,
           'tag' => $tags[mt_rand(0, 30)],
-        );
+        ];
         break;
       case 'points':
         if (rand(0, 3)) {
-          $votes[] = array(
+          $votes[] = [
             'uid' => $uid,
             'entity_type' => $etype,
             'entity_id' => $eid,
             'value_type' => 'points',
             'timestamp' => REQUEST_TIME - mt_rand(0, $timestamp),
             'value' => rand(0, 1) ? 1 : -1,
-          );
+          ];
         }
         break;
     }
   }
-  votingapi_set_votes($votes, array());
+  votingapi_set_votes($votes, []);
 }
 
 /**
@@ -153,16 +153,16 @@ function _votingapi_cast_votes($etype, $eid, $timestamp = 0, $uids = array(), $s
  */
 function drush_votingapi_recalculate($entity_type = 'node', $entity_id = NULL) {
   // Prep some starter query objects.
-  $data = array();
+  $data = [];
   if (empty($entity_id)) {
     $votes = db_select('votingapi_vote', 'vv')
-      ->fields('vv', array('entity_type', 'entity_id'))
+      ->fields('vv', ['entity_type', 'entity_id'])
       ->condition('entity_type', $entity_type, '=')->distinct(TRUE)
       ->execute()->fetchAll(PDO::FETCH_ASSOC);
-      $message = t('Rebuilt voting results for @type votes.', array('@type' => $entity_type));
+      $message = t('Rebuilt voting results for @type votes.', ['@type' => $entity_type]);
   }
   else {
-    $votes[] = array('entity_type' => $entity_type, 'entity_id' => $entity_id);
+    $votes[] = ['entity_type' => $entity_type, 'entity_id' => $entity_id];
     $message = t('Rebuilt all voting results.');
   }
 
@@ -178,7 +178,7 @@ function drush_votingapi_recalculate($entity_type = 'node', $entity_id = NULL) {
  * Command callback. Flush votes and results.
  */
 function drush_votingapi_flush($entity_type = NULL, $entity_id = NULL) {
-  if (drush_confirm(dt("Delete @type voting data?", array('@type' => empty($entity_type) ? dt('all') : $entity_type)))) {
+  if (drush_confirm(dt("Delete @type voting data?", ['@type' => empty($entity_type) ? dt('all') : $entity_type]))) {
     $cache = db_delete('votingapi_cache');
     $votes = db_delete('votingapi_vote');
 
@@ -194,6 +194,6 @@ function drush_votingapi_flush($entity_type = NULL, $entity_id = NULL) {
     $cache->execute();
     $votes->execute();
 
-    drush_log(t('Flushed vote data for @type entities.', array('@type' => empty($entity_type) ? t('all') : $entity_type)), 'success');
+    drush_log(t('Flushed vote data for @type entities.', ['@type' => empty($entity_type) ? t('all') : $entity_type]), 'success');
   }
 }
