diff --git a/core/modules/taxonomy/src/Controller/TermAutocompleteController.php b/core/modules/taxonomy/src/Controller/TermAutocompleteController.php
index d701c90..0609018 100644
--- a/core/modules/taxonomy/src/Controller/TermAutocompleteController.php
+++ b/core/modules/taxonomy/src/Controller/TermAutocompleteController.php
@@ -39,7 +39,8 @@ class TermAutocompleteController implements ContainerInjectionInterface {
   protected $entityManager;
 
   /**
-   * Constructs a new \Drupal\taxonomy\Controller\TermAutocompleteController object.
+   * Constructs a new \Drupal\taxonomy\Controller\TermAutocompleteController
+   * object.
    *
    * @param \Drupal\Core\Entity\Query\QueryInterface $term_entity_query
    *   The entity query service.
@@ -161,7 +162,7 @@ public function autocompletePerVid(Request $request, VocabularyInterface $taxono
    *   The full typed tags string.
    * @param array $vids
    *   An array of vocabulary IDs which
-   * @param $tag_last
+   * @param string $tag_last
    *   The lasted typed tag.
    *
    * @return array
diff --git a/core/modules/taxonomy/src/Form/OverviewTerms.php b/core/modules/taxonomy/src/Form/OverviewTerms.php
index 95e6178..5465f28 100644
--- a/core/modules/taxonomy/src/Form/OverviewTerms.php
+++ b/core/modules/taxonomy/src/Form/OverviewTerms.php
@@ -212,7 +212,7 @@ public function buildForm(array $form, FormStateInterface $form_state, Vocabular
       ),
     );
     foreach ($current_page as $key => $term) {
-      /** @var $term \Drupal\Core\Entity\EntityInterface */
+      // @var $term \Drupal\Core\Entity\EntityInterface
       $form['terms'][$key]['#term'] = $term;
       $indentation = array();
       if (isset($term->depth) && $term->depth > 0) {
@@ -410,12 +410,14 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
     foreach ($form_state->getValue('terms') as $tid => $values) {
       if (isset($form['terms'][$tid]['#term'])) {
         $term = $form['terms'][$tid]['#term'];
-        // Give terms at the root level a weight in sequence with terms on previous pages.
+        // Give terms at the root level a weight in sequence with terms on
+        // previous pages.
         if ($values['term']['parent'] == 0 && $term->getWeight() != $weight) {
           $term->setWeight($weight);
           $changed_terms[$term->id()] = $term;
         }
-        // Terms not at the root level can safely start from 0 because they're all on this page.
+        // Terms not at the root level can safely start from 0 because they're
+        // all on this page.
         elseif ($values['term']['parent'] > 0) {
           $level_weights[$values['term']['parent']] = isset($level_weights[$values['term']['parent']]) ? $level_weights[$values['term']['parent']] + 1 : 0;
           if ($level_weights[$values['term']['parent']] != $term->getWeight()) {
@@ -459,6 +461,8 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
 
   /**
    * Redirects to confirmation form for the reset action.
+   *
+   * @var $vocabulary \Drupal\taxonomy\VocabularyInterface
    */
   public function submitReset(array &$form, FormStateInterface $form_state) {
     /** @var $vocabulary \Drupal\taxonomy\VocabularyInterface */
diff --git a/core/modules/taxonomy/src/Plugin/Field/FieldFormatter/LinkFormatter.php b/core/modules/taxonomy/src/Plugin/Field/FieldFormatter/LinkFormatter.php
index 856b73e..e26afb6 100644
--- a/core/modules/taxonomy/src/Plugin/Field/FieldFormatter/LinkFormatter.php
+++ b/core/modules/taxonomy/src/Plugin/Field/FieldFormatter/LinkFormatter.php
@@ -37,7 +37,7 @@ public function viewElements(FieldItemListInterface $items) {
         );
       }
       else {
-        /** @var $term \Drupal\taxonomy\TermInterface */
+        // @var $term \Drupal\taxonomy\TermInterface
         $term = $item->entity;
         $elements[$delta] = array(
           '#type' => 'link',
diff --git a/core/modules/taxonomy/src/Plugin/Field/FieldFormatter/RSSCategoryFormatter.php b/core/modules/taxonomy/src/Plugin/Field/FieldFormatter/RSSCategoryFormatter.php
index 927370d..01ec752 100644
--- a/core/modules/taxonomy/src/Plugin/Field/FieldFormatter/RSSCategoryFormatter.php
+++ b/core/modules/taxonomy/src/Plugin/Field/FieldFormatter/RSSCategoryFormatter.php
@@ -10,7 +10,8 @@
 use Drupal\Core\Field\FieldItemListInterface;
 
 /**
- * Plugin implementation of the 'taxonomy_term_reference_rss_category' formatter.
+ * Plugin implementation of the 'taxonomy_term_reference_rss_category'
+ * formatter.
  *
  * @FieldFormatter(
  *   id = "taxonomy_term_reference_rss_category",
diff --git a/core/modules/taxonomy/src/Plugin/Field/FieldWidget/TaxonomyAutocompleteWidget.php b/core/modules/taxonomy/src/Plugin/Field/FieldWidget/TaxonomyAutocompleteWidget.php
index b3500fa..df65ee4 100644
--- a/core/modules/taxonomy/src/Plugin/Field/FieldWidget/TaxonomyAutocompleteWidget.php
+++ b/core/modules/taxonomy/src/Plugin/Field/FieldWidget/TaxonomyAutocompleteWidget.php
@@ -110,7 +110,7 @@ public function massageFormValues(array $values, array $form, FormStateInterface
     }
 
     // Translate term names into actual terms.
-    foreach($values as $value) {
+    foreach ($values as $value) {
       // See if the term exists in the chosen vocabulary and return the tid;
       // otherwise, create a new term.
       if ($possibilities = entity_load_multiple_by_properties('taxonomy_term', array('name' => trim($value), 'vid' => array_keys($vocabularies)))) {
diff --git a/core/modules/taxonomy/src/Plugin/entity_reference/selection/TermSelection.php b/core/modules/taxonomy/src/Plugin/entity_reference/selection/TermSelection.php
index 50f3bc1..1dbe921 100644
--- a/core/modules/taxonomy/src/Plugin/entity_reference/selection/TermSelection.php
+++ b/core/modules/taxonomy/src/Plugin/entity_reference/selection/TermSelection.php
@@ -54,7 +54,7 @@ public static function settingsForm(FieldDefinitionInterface $field_definition)
    */
   public function getReferenceableEntities($match = NULL, $match_operator = 'CONTAINS', $limit = 0) {
     if ($match || $limit) {
-      return parent::getReferenceableEntities($match , $match_operator, $limit);
+      return parent::getReferenceableEntities($match, $match_operator, $limit);
     }
 
     $options = array();
diff --git a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php
index 05f6229..bbc94a9 100644
--- a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php
+++ b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php
@@ -112,12 +112,12 @@ public function query($group_by = FALSE) {
     $this->query->addWhere(0, "$this->tableAlias.$this->realField", $subquery, 'IN');
   }
 
-  function title() {
+  public function title() {
     $term = entity_load('taxonomy_term', $this->argument);
     if (!empty($term)) {
       return String::checkPlain($term->getName());
     }
-    // TODO review text
+    // TODO review text.
     return $this->t('No name');
   }
 
diff --git a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php
index 077b1fd..5c41bd2 100644
--- a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php
+++ b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php
@@ -24,7 +24,7 @@ class IndexTidDepthModifier extends ArgumentPluginBase {
 
   public function buildOptionsForm(&$form, FormStateInterface $form_state) { }
 
-  public function query($group_by = FALSE) { }
+  public function query($group_by = FALSE) {}
 
   public function preQuery() {
     // We don't know our argument yet, but it's based upon our position:
@@ -41,7 +41,7 @@ public function preQuery() {
       $argument = -10;
     }
 
-    // figure out which argument preceded us.
+    // Figure out which argument preceded us.
     $keys = array_reverse(array_keys($this->view->argument));
     $skip = TRUE;
     foreach ($keys as $key) {
diff --git a/core/modules/taxonomy/src/Plugin/views/argument/Taxonomy.php b/core/modules/taxonomy/src/Plugin/views/argument/Taxonomy.php
index 30440bd..9ed9fb6 100644
--- a/core/modules/taxonomy/src/Plugin/views/argument/Taxonomy.php
+++ b/core/modules/taxonomy/src/Plugin/views/argument/Taxonomy.php
@@ -22,7 +22,7 @@ class Taxonomy extends Numeric {
   /**
    * Override the behavior of title(). Get the title of the node.
    */
-  function title() {
+  public function title() {
     // There might be no valid argument.
     if ($this->argument) {
       $term = entity_load('taxonomy_term', $this->argument);
@@ -30,7 +30,7 @@ function title() {
         return String::checkPlain($term->getName());
       }
     }
-    // TODO review text
+    // TODO review text.
     return $this->t('No name');
   }
 
diff --git a/core/modules/taxonomy/src/Plugin/views/argument/VocabularyVid.php b/core/modules/taxonomy/src/Plugin/views/argument/VocabularyVid.php
index a8dab74..218e279 100644
--- a/core/modules/taxonomy/src/Plugin/views/argument/VocabularyVid.php
+++ b/core/modules/taxonomy/src/Plugin/views/argument/VocabularyVid.php
@@ -22,7 +22,7 @@ class VocabularyVid extends Numeric {
   /**
    * Override the behavior of title(). Get the name of the vocabulary.
    */
-  function title() {
+  public function title() {
     $vocabulary = entity_load('taxonomy_vocabulary', $this->argument);
     if ($vocabulary) {
       return String::checkPlain($vocabulary->label());
diff --git a/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php b/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php
index e9ba713..da483c6 100644
--- a/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php
+++ b/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php
@@ -144,7 +144,7 @@ public function getArgument() {
         }
         if (!empty($this->options['limit'])) {
           $tids = array();
-          // filter by vocabulary
+          // Filter by vocabulary.
           foreach ($taxonomy as $tid => $vocab) {
             if (!empty($this->options['vids'][$vocab])) {
               $tids[] = $tid;
diff --git a/core/modules/taxonomy/src/Plugin/views/field/Taxonomy.php b/core/modules/taxonomy/src/Plugin/views/field/Taxonomy.php
index 6dc7e12..069f75e 100644
--- a/core/modules/taxonomy/src/Plugin/views/field/Taxonomy.php
+++ b/core/modules/taxonomy/src/Plugin/views/field/Taxonomy.php
@@ -47,7 +47,7 @@ protected function defineOptions() {
   }
 
   /**
-   * Provide link to taxonomy option
+   * Provide link to taxonomy option.
    */
   public function buildOptionsForm(&$form, FormStateInterface $form_state) {
     $form['link_to_taxonomy'] = array(
@@ -56,7 +56,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
       '#type' => 'checkbox',
       '#default_value' => !empty($this->options['link_to_taxonomy']),
     );
-     $form['convert_spaces'] = array(
+    $form['convert_spaces'] = array(
       '#title' => $this->t('Convert spaces in term names to hyphens'),
       '#description' => $this->t('This allows links to work with Views taxonomy term arguments.'),
       '#type' => 'checkbox',
diff --git a/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php
index 33acaa8..7ffa38c 100644
--- a/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php
+++ b/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php
@@ -86,7 +86,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
   }
 
   /**
-   * Add this term to the query
+   * Add this term to the query.
    */
   public function query() {
     $this->addAdditionalFields();
@@ -125,7 +125,7 @@ public function preRender(&$values) {
     }
   }
 
-  function render_item($count, $item) {
+  protected function render_item($count, $item) {
     return $item['name'];
   }
 
diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
index d1b7278..1919469 100644
--- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
+++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
@@ -25,7 +25,7 @@
 class TaxonomyIndexTid extends ManyToOne {
 
   // Stores the exposed input for this filter.
-  var $validated_exposed_input = NULL;
+  public $validated_exposed_input = NULL;
 
   /**
    * Overrides \Drupal\views\Plugin\views\filter\ManyToOne::init().
@@ -38,9 +38,13 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
     }
   }
 
-  public function hasExtraOptions() { return TRUE; }
+  public function hasExtraOptions() {
+    return TRUE;
+  }
 
-  public function getValueOptions() { /* don't overwrite the value options */ }
+  public function getValueOptions() {
+    // Don't overwrite the value options.
+  }
 
   protected function defineOptions() {
     $options = parent::defineOptions();
@@ -180,8 +184,8 @@ protected function valueForm(&$form, FormStateInterface $form_state) {
             $keys = array_keys($options);
             $default_value = array_shift($keys);
           }
-          // Due to #1464174 there is a chance that array('') was saved in the admin ui.
-          // Let's choose a safe default value.
+          // Due to #1464174 there is a chance that array('') was saved in the
+          // admin ui. Let's choose a safe default value.
           elseif ($default_value == array('')) {
             $default_value = 'All';
           }
@@ -208,7 +212,7 @@ protected function valueForm(&$form, FormStateInterface $form_state) {
     }
 
     if (!$form_state->get('exposed')) {
-      // Retain the helper option
+      // Retain the helper option.
       $this->helper->buildOptionsForm($form, $form_state);
     }
   }
@@ -231,7 +235,7 @@ public function acceptExposedInput($input) {
     }
 
     // If view is an attachment and is inheriting exposed filters, then assume
-    // exposed input has already been validated
+    // exposed input has already been validated.
     if (!empty($this->view->is_attachment) && $this->view->display_handler->usesExposed()) {
       $this->validated_exposed_input = (array) $this->view->exposed_raw_input[$this->options['expose']['identifier']];
     }
@@ -261,7 +265,7 @@ public function validateExposed(&$form, FormStateInterface $form_state) {
 
     // We only validate if they've chosen the text field style.
     if ($this->options['type'] != 'textfield') {
-      if ($form_state->getValue($identifier) != 'All')  {
+      if ($form_state->getValue($identifier) != 'All') {
         $this->validated_exposed_input = (array) $form_state->getValue($identifier);
       }
       return;
@@ -284,9 +288,9 @@ public function validateExposed(&$form, FormStateInterface $form_state) {
    * or the exposed filter, this is abstracted out a bit so it can
    * handle the multiple input sources.
    *
-   * @param $form
+   * @param object $form
    *   The form which is used, either the views ui or the exposed filters.
-   * @param $values
+   * @param array $values
    *   The taxonomy names which will be converted to tids.
    * @param \Drupal\Core\Form\FormStateInterface $form_state
    *   The current state of the form.
@@ -348,7 +352,7 @@ public function buildExposeForm(&$form, FormStateInterface $form_state) {
   }
 
   public function adminSummary() {
-    // set up $this->valueOptions for the parent summary
+    // Set up $this->valueOptions for the parent summary.
     $this->valueOptions = array();
 
     if ($this->value) {
diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php
index eee3a75..562caf8 100644
--- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php
+++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php
@@ -59,7 +59,8 @@ public function query() {
       $operator = '=';
     }
     else {
-      $operator = 'IN';# " IN (" . implode(', ', array_fill(0, sizeof($this->value), '%d')) . ")";
+      // " IN (" . implode(', ', array_fill(0, sizeof($this->value), '%d')) . ")";
+      $operator = 'IN';
     }
 
     // The normal use of ensureMyTable() here breaks Views.
diff --git a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
index c0629c9..d507172 100644
--- a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
+++ b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
@@ -79,7 +79,7 @@ public function query() {
       $def['type'] = empty($this->options['required']) ? 'LEFT' : 'INNER';
     }
     else {
-      // If vocabularies are supplied join a subselect instead
+      // If vocabularies are supplied join a subselect instead.
       $def['left_table'] = $this->tableAlias;
       $def['left_field'] = 'nid';
       $def['field'] = 'nid';
@@ -97,7 +97,7 @@ public function query() {
 
     $join = \Drupal::service('plugin.manager.views.join')->createInstance('standard', $def);
 
-    // use a short alias for this:
+    // Use a short alias for this.
     $alias = $def['table'] . '_' . $this->table;
 
     $this->alias = $this->query->addRelationship($alias, $join, 'taxonomy_term_data', $this->relationship);
diff --git a/core/modules/taxonomy/src/Plugin/views/wizard/TaxonomyTerm.php b/core/modules/taxonomy/src/Plugin/views/wizard/TaxonomyTerm.php
index 480dc26..e276b2a 100644
--- a/core/modules/taxonomy/src/Plugin/views/wizard/TaxonomyTerm.php
+++ b/core/modules/taxonomy/src/Plugin/views/wizard/TaxonomyTerm.php
@@ -30,8 +30,8 @@ class TaxonomyTerm extends WizardPluginBase {
     'exclude' => TRUE,
     'alter' => array(
       'alter_text' => TRUE,
-      'text' => 'taxonomy/term/[tid]'
-    )
+      'text' => 'taxonomy/term/[tid]',
+    ),
   );
 
   /**
diff --git a/core/modules/taxonomy/src/TermForm.php b/core/modules/taxonomy/src/TermForm.php
index 65f1cfd..2b1319c 100644
--- a/core/modules/taxonomy/src/TermForm.php
+++ b/core/modules/taxonomy/src/TermForm.php
@@ -142,6 +142,7 @@ public function save(array $form, FormStateInterface $form_state) {
         drupal_set_message($this->t('Created new term %term.', array('%term' => $term->getName())));
         $this->logger('taxonomy')->notice('Created new term %term.', array('%term' => $term->getName(), 'link' => $link));
         break;
+
       case SAVED_UPDATED:
         drupal_set_message($this->t('Updated term %term.', array('%term' => $term->getName())));
         $this->logger('taxonomy')->notice('Updated term %term.', array('%term' => $term->getName(), 'link' => $link));
diff --git a/core/modules/taxonomy/src/TermStorageInterface.php b/core/modules/taxonomy/src/TermStorageInterface.php
index f60d7a2..d3ab491 100644
--- a/core/modules/taxonomy/src/TermStorageInterface.php
+++ b/core/modules/taxonomy/src/TermStorageInterface.php
@@ -3,7 +3,7 @@
 /**
  * @file
  * Contains \Drupal\taxonomy\TermStorageInterface.
-*/
+ */
 
 namespace Drupal\taxonomy;
 
diff --git a/core/modules/taxonomy/src/TermTranslationHandler.php b/core/modules/taxonomy/src/TermTranslationHandler.php
index ec4bfe6..4217484 100644
--- a/core/modules/taxonomy/src/TermTranslationHandler.php
+++ b/core/modules/taxonomy/src/TermTranslationHandler.php
@@ -29,9 +29,9 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En
    *
    * This handles the save action.
    *
-   * @see \Drupal\Core\Entity\EntityForm::build().
+   * @see \Drupal\Core\Entity\EntityFormController::build().
    */
-  function entityFormSave(array $form, FormStateInterface $form_state) {
+  public function entityFormSave(array $form, FormStateInterface $form_state) {
     if ($this->getSourceLangcode($form_state)) {
       $entity = $form_state->getFormObject()->getEntity();
       // We need a redirect here, otherwise we would get an access denied page,
diff --git a/core/modules/taxonomy/src/TermViewsData.php b/core/modules/taxonomy/src/TermViewsData.php
index 2e3a831..574a6d9 100644
--- a/core/modules/taxonomy/src/TermViewsData.php
+++ b/core/modules/taxonomy/src/TermViewsData.php
@@ -214,7 +214,6 @@ public function getViewsData() {
       ),
     );
 
-
     $data['taxonomy_index']['sticky'] = [
       'title' => t('Sticky status'),
       'help' => t('Whether or not the content related to a term is sticky.'),
diff --git a/core/modules/taxonomy/src/Tests/EfqTest.php b/core/modules/taxonomy/src/Tests/EfqTest.php
index ec184b3..5d59f28 100644
--- a/core/modules/taxonomy/src/Tests/EfqTest.php
+++ b/core/modules/taxonomy/src/Tests/EfqTest.php
@@ -25,7 +25,7 @@ protected function setUp() {
   /**
    * Tests that a basic taxonomy entity query works.
    */
-  function testTaxonomyEfq() {
+  public function testTaxonomyEfq() {
     $terms = array();
     for ($i = 0; $i < 5; $i++) {
       $term = $this->createTerm($this->vocabulary);
diff --git a/core/modules/taxonomy/src/Tests/LegacyTest.php b/core/modules/taxonomy/src/Tests/LegacyTest.php
index 2d11900..97ce4fd 100644
--- a/core/modules/taxonomy/src/Tests/LegacyTest.php
+++ b/core/modules/taxonomy/src/Tests/LegacyTest.php
@@ -62,14 +62,18 @@ protected function setUp() {
       ))
       ->save();
 
-    $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'administer nodes', 'bypass node access'));
+    $this->admin_user = $this->drupalCreateUser(array(
+      'administer taxonomy',
+      'administer nodes',
+      'bypass node access',
+    ));
     $this->drupalLogin($this->admin_user);
   }
 
   /**
    * Test taxonomy functionality with nodes prior to 1970.
    */
-  function testTaxonomyLegacyNode() {
+  public function testTaxonomyLegacyNode() {
     // Posts an article with a taxonomy term and a date prior to 1970.
     $date = new DrupalDateTime('1969-01-01 00:00:00');
     $edit = array();
diff --git a/core/modules/taxonomy/src/Tests/LoadMultipleTest.php b/core/modules/taxonomy/src/Tests/LoadMultipleTest.php
index e83d16b..289098c 100644
--- a/core/modules/taxonomy/src/Tests/LoadMultipleTest.php
+++ b/core/modules/taxonomy/src/Tests/LoadMultipleTest.php
@@ -24,7 +24,7 @@ protected function setUp() {
    * Create a vocabulary and some taxonomy terms, ensuring they're loaded
    * correctly using entity_load_multiple().
    */
-  function testTaxonomyTermMultipleLoad() {
+  public function testTaxonomyTermMultipleLoad() {
     // Create a vocabulary.
     $vocabulary = $this->createVocabulary();
 
diff --git a/core/modules/taxonomy/src/Tests/RssTest.php b/core/modules/taxonomy/src/Tests/RssTest.php
index acfc4ae..eebc43c 100644
--- a/core/modules/taxonomy/src/Tests/RssTest.php
+++ b/core/modules/taxonomy/src/Tests/RssTest.php
@@ -27,7 +27,12 @@ class RssTest extends TaxonomyTestBase {
   protected function setUp() {
     parent::setUp();
 
-    $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'bypass node access', 'administer content types', 'administer node display'));
+    $this->admin_user = $this->drupalCreateUser(array(
+      'administer taxonomy',
+      'bypass node access',
+      'administer content types',
+      'administer node display',
+    ));
     $this->drupalLogin($this->admin_user);
     $this->vocabulary = $this->createVocabulary();
     $this->field_name = 'taxonomy_' . $this->vocabulary->id();
@@ -68,7 +73,7 @@ protected function setUp() {
    *
    * Create a node and assert that taxonomy terms appear in rss.xml.
    */
-  function testTaxonomyRss() {
+  public function testTaxonomyRss() {
     // Create two taxonomy terms.
     $term1 = $this->createTerm($this->vocabulary);
 
diff --git a/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php b/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
index 9cb3372..da2dfb6 100644
--- a/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
+++ b/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
@@ -67,7 +67,10 @@ protected function setUp() {
   }
 
   public function testTaxonomyImageAccess() {
-    $user = $this->drupalCreateUser(array('administer site configuration', 'administer taxonomy', 'access user profiles'));
+    $user = $this->drupalCreateUser(array('administer site configuration',
+      'administer taxonomy',
+      'access user profiles',
+    ));
     $this->drupalLogin($user);
 
     // Create a term and upload the image.
diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTermIndentationTest.php b/core/modules/taxonomy/src/Tests/TaxonomyTermIndentationTest.php
index 1952b5d..e3d2125 100644
--- a/core/modules/taxonomy/src/Tests/TaxonomyTermIndentationTest.php
+++ b/core/modules/taxonomy/src/Tests/TaxonomyTermIndentationTest.php
@@ -31,7 +31,7 @@ protected function setUp() {
   /**
    * Tests term indentation.
    */
-  function testTermIndentation() {
+  public function testTermIndentation() {
     // Create three taxonomy terms.
     $term1 = $this->createTerm($this->vocabulary);
     $term2 = $this->createTerm($this->vocabulary);
@@ -61,7 +61,7 @@ function testTermIndentation() {
       'terms[tid:' . $term2->id() . ':0][weight]' => 1,
     );
 
-    $this->drupalPostForm('admin/structure/taxonomy/manage/' . $this->vocabulary->get('vid' ) . '/overview', $edit, t('Save'));
+    $this->drupalPostForm('admin/structure/taxonomy/manage/' . $this->vocabulary->get('vid') . '/overview', $edit, t('Save'));
     // All terms back at the root level, no identation should be present.
     $this->assertNoPattern('|<div class="indentation">&nbsp;</div>|');
 
@@ -72,4 +72,3 @@ function testTermIndentation() {
   }
 
 }
-
diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php
index ae791da..49590d1 100644
--- a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php
+++ b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php
@@ -35,7 +35,7 @@ protected function setUp() {
   /**
    * Returns a new vocabulary with random properties.
    */
-  function createVocabulary() {
+  public function createVocabulary() {
     // Create a vocabulary.
     $vocabulary = entity_create('taxonomy_vocabulary', array(
       'name' => $this->randomMachineName(),
@@ -60,7 +60,7 @@ function createVocabulary() {
    * @return \Drupal\taxonomy\Entity\Term
    *   The new taxonomy term object.
    */
-  function createTerm(Vocabulary $vocabulary, $values = array()) {
+  public function createTerm(Vocabulary $vocabulary, $values = array()) {
     $filter_formats = filter_formats();
     $format = array_pop($filter_formats);
     $term = entity_create('taxonomy_term', $values + array(
diff --git a/core/modules/taxonomy/src/Tests/TermCacheTagsTest.php b/core/modules/taxonomy/src/Tests/TermCacheTagsTest.php
index 5acaf7f..23bcef1 100644
--- a/core/modules/taxonomy/src/Tests/TermCacheTagsTest.php
+++ b/core/modules/taxonomy/src/Tests/TermCacheTagsTest.php
@@ -26,7 +26,7 @@ class TermCacheTagsTest extends EntityWithUriCacheTagsTestBase {
    */
   protected function createEntity() {
     // Create a "Camelids" vocabulary.
-    $vocabulary = entity_create('taxonomy_vocabulary',  array(
+    $vocabulary = entity_create('taxonomy_vocabulary', array(
       'name' => 'Camelids',
       'vid' => 'camelids',
     ));
diff --git a/core/modules/taxonomy/src/Tests/TermFieldMultipleVocabularyTest.php b/core/modules/taxonomy/src/Tests/TermFieldMultipleVocabularyTest.php
index d7ee8a1..2f680a1 100644
--- a/core/modules/taxonomy/src/Tests/TermFieldMultipleVocabularyTest.php
+++ b/core/modules/taxonomy/src/Tests/TermFieldMultipleVocabularyTest.php
@@ -30,7 +30,10 @@ class TermFieldMultipleVocabularyTest extends TaxonomyTestBase {
   protected function setUp() {
     parent::setUp();
 
-    $web_user = $this->drupalCreateUser(array('view test entity', 'administer entity_test content', 'administer taxonomy'));
+    $web_user = $this->drupalCreateUser(array('view test entity',
+      'administer entity_test content',
+      'administer taxonomy',
+    ));
     $this->drupalLogin($web_user);
     $this->vocabulary1 = $this->createVocabulary();
     $this->vocabulary2 = $this->createVocabulary();
@@ -53,7 +56,7 @@ protected function setUp() {
             'parent' => '0',
           ),
         ),
-      )
+      ),
     ))->save();
     entity_create('field_config', array(
       'field_name' => $this->field_name,
@@ -75,7 +78,7 @@ protected function setUp() {
   /**
    * Tests term reference field and widget with multiple vocabularies.
    */
-  function testTaxonomyTermFieldMultipleVocabularies() {
+  public function testTaxonomyTermFieldMultipleVocabularies() {
     // Create a term in each vocabulary.
     $term1 = $this->createTerm($this->vocabulary1);
     $term2 = $this->createTerm($this->vocabulary2);
diff --git a/core/modules/taxonomy/src/Tests/TermFieldTest.php b/core/modules/taxonomy/src/Tests/TermFieldTest.php
index 10c950c..446e1aa 100644
--- a/core/modules/taxonomy/src/Tests/TermFieldTest.php
+++ b/core/modules/taxonomy/src/Tests/TermFieldTest.php
@@ -57,7 +57,7 @@ protected function setUp() {
             'parent' => '0',
           ),
         ),
-      )
+      ),
     ));
     $this->field_storage->save();
     entity_create('field_config', array(
@@ -79,26 +79,26 @@ protected function setUp() {
   /**
    * Test term field validation.
    */
-  function testTaxonomyTermFieldValidation() {
+  public function testTaxonomyTermFieldValidation() {
     // Test validation with a valid value.
     $term = $this->createTerm($this->vocabulary);
     $entity = entity_create('entity_test');
     $entity->{$this->field_name}->target_id = $term->id();
     $violations = $entity->{$this->field_name}->validate();
-    $this->assertEqual(count($violations) , 0, 'Correct term does not cause validation error.');
+    $this->assertEqual(count($violations), 0, 'Correct term does not cause validation error.');
 
     // Test validation with an invalid valid value (wrong vocabulary).
     $bad_term = $this->createTerm($this->createVocabulary());
     $entity = entity_create('entity_test');
     $entity->{$this->field_name}->target_id = $bad_term->id();
     $violations = $entity->{$this->field_name}->validate();
-    $this->assertEqual(count($violations) , 1, 'Wrong term causes validation error.');
+    $this->assertEqual(count($violations), 1, 'Wrong term causes validation error.');
   }
 
   /**
    * Test widgets.
    */
-  function testTaxonomyTermFieldWidgets() {
+  public function testTaxonomyTermFieldWidgets() {
     // Create a term in the vocabulary.
     $term = $this->createTerm($this->vocabulary);
 
@@ -131,7 +131,7 @@ function testTaxonomyTermFieldWidgets() {
   /**
    * No php error message on the field setting page for autocomplete widget.
    */
-  function testTaxonomyTermFieldSettingsAutocompleteWidget() {
+  public function testTaxonomyTermFieldSettingsAutocompleteWidget() {
     entity_get_form_display('entity_test', 'entity_test', 'default')
       ->setComponent($this->field_name, array(
         'type' => 'taxonomy_autocomplete',
@@ -143,9 +143,10 @@ function testTaxonomyTermFieldSettingsAutocompleteWidget() {
   }
 
   /**
-   * Tests that vocabulary machine name changes are mirrored in field definitions.
+   * Tests that vocabulary machine name changes are mirrored in field
+   * definitions.
    */
-  function testTaxonomyTermFieldChangeMachineName() {
+  public function testTaxonomyTermFieldChangeMachineName() {
     // Add several entries in the 'allowed_values' setting, to make sure that
     // they all get updated.
     $this->field_storage->settings['allowed_values'] = array(
diff --git a/core/modules/taxonomy/src/Tests/TermIndexTest.php b/core/modules/taxonomy/src/Tests/TermIndexTest.php
index 26e423b..9f4f323 100644
--- a/core/modules/taxonomy/src/Tests/TermIndexTest.php
+++ b/core/modules/taxonomy/src/Tests/TermIndexTest.php
@@ -100,7 +100,7 @@ protected function setUp() {
   /**
    * Tests that the taxonomy index is maintained properly.
    */
-  function testTaxonomyIndex() {
+  public function testTaxonomyIndex() {
     // Create terms in the vocabulary.
     $term_1 = $this->createTerm($this->vocabulary);
     $term_2 = $this->createTerm($this->vocabulary);
@@ -208,7 +208,7 @@ function testTaxonomyIndex() {
   /**
    * Tests that there is a link to the parent term on the child term page.
    */
-  function testTaxonomyTermHierarchyBreadcrumbs() {
+  public function testTaxonomyTermHierarchyBreadcrumbs() {
     // Create two taxonomy terms and set term2 as the parent of term1.
     $term1 = $this->createTerm($this->vocabulary);
     $term2 = $this->createTerm($this->vocabulary);
diff --git a/core/modules/taxonomy/src/Tests/TermLanguageTest.php b/core/modules/taxonomy/src/Tests/TermLanguageTest.php
index cb64143..3d45edf 100644
--- a/core/modules/taxonomy/src/Tests/TermLanguageTest.php
+++ b/core/modules/taxonomy/src/Tests/TermLanguageTest.php
@@ -37,7 +37,7 @@ protected function setUp() {
     }
   }
 
-  function testTermLanguage() {
+  public function testTermLanguage() {
     // Configure the vocabulary to not hide the language selector.
     $edit = array(
       'default_language[language_show]' => TRUE,
@@ -71,7 +71,7 @@ function testTermLanguage() {
     $this->assertOptionSelected('edit-langcode', $edit['langcode'], 'The term language was correctly selected.');
   }
 
-  function testDefaultTermLanguage() {
+  public function testDefaultTermLanguage() {
     // Configure the vocabulary to not hide the language selector, and make the
     // default language of the terms fixed.
     $edit = array(
diff --git a/core/modules/taxonomy/src/Tests/TermTest.php b/core/modules/taxonomy/src/Tests/TermTest.php
index bb7ec06..42d4f10 100644
--- a/core/modules/taxonomy/src/Tests/TermTest.php
+++ b/core/modules/taxonomy/src/Tests/TermTest.php
@@ -63,7 +63,7 @@ protected function setUp() {
   /**
    * Test terms in a single and multiple hierarchy.
    */
-  function testTaxonomyTermHierarchy() {
+  public function testTaxonomyTermHierarchy() {
     // Create two taxonomy terms.
     $term1 = $this->createTerm($this->vocabulary);
     $term2 = $this->createTerm($this->vocabulary);
@@ -100,7 +100,7 @@ function testTaxonomyTermHierarchy() {
   /**
    * Tests that many terms with parents show on each page
    */
-  function testTaxonomyTermChildTerms() {
+  public function testTaxonomyTermChildTerms() {
     // Set limit to 10 terms per page. Set variable to 9 so 10 terms appear.
     \Drupal::config('taxonomy.settings')->set('terms_per_page_admin', '9')->save();
     $term1 = $this->createTerm($this->vocabulary);
@@ -151,9 +151,10 @@ function testTaxonomyTermChildTerms() {
   /**
    * Test that hook_node_$op implementations work correctly.
    *
-   * Save & edit a node and assert that taxonomy terms are saved/loaded properly.
+   * Save & edit a node and assert that taxonomy terms are saved/loaded
+   * properly.
    */
-  function testTaxonomyNode() {
+  public function testTaxonomyNode() {
     // Create two taxonomy terms.
     $term1 = $this->createTerm($this->vocabulary);
     $term2 = $this->createTerm($this->vocabulary);
@@ -192,7 +193,7 @@ function testTaxonomyNode() {
   /**
    * Test term creation with a free-tagging vocabulary from the node form.
    */
-  function testNodeTermCreationAndDeletion() {
+  public function testNodeTermCreationAndDeletion() {
     // Enable tags in the vocabulary.
     $field = $this->field;
     entity_get_form_display($field->entity_type, $field->bundle, 'default')
@@ -261,7 +262,11 @@ function testNodeTermCreationAndDeletion() {
     $this->drupalGet('node/' . $node->id());
 
     foreach ($term_names as $term_name) {
-      $this->assertText($term_name, format_string('The term %name appears on the node page after two terms, %deleted1 and %deleted2, were deleted.', array('%name' => $term_name, '%deleted1' => $term_objects['term1']->getName(), '%deleted2' => $term_objects['term2']->getName())));
+      $this->assertText($term_name, format_string('The term %name appears on the node page after two terms, %deleted1 and %deleted2, were deleted.', array(
+        '%name' => $term_name,
+        '%deleted1' => $term_objects['term1']->getName(),
+        '%deleted2' => $term_objects['term2']->getName(),
+      )));
     }
     $this->assertNoText($term_objects['term1']->getName(), format_string('The deleted term %name does not appear on the node page.', array('%name' => $term_objects['term1']->getName())));
     $this->assertNoText($term_objects['term2']->getName(), format_string('The deleted term %name does not appear on the node page.', array('%name' => $term_objects['term2']->getName())));
@@ -290,7 +295,7 @@ function testNodeTermCreationAndDeletion() {
   /**
    * Tests term autocompletion edge cases with slashes in the names.
    */
-  function testTermAutocompletion() {
+  public function testTermAutocompletion() {
     // Add a term with a slash in the name.
     $first_term = $this->createTerm($this->vocabulary);
     $first_term->setName('10/16/2011');
@@ -324,10 +329,12 @@ function testTermAutocompletion() {
     $input = '10/16';
     $path = 'taxonomy/autocomplete/node/taxonomy_' . $this->vocabulary->id();
     $this->drupalGet($path, array('query' => array('q' => $input)));
-    $target = array(array(
-      'value' => String::checkPlain($first_term->getName()),
-      'label' => $first_term->getName(),
-    ));
+    $target = array(
+      array(
+        'value' => String::checkPlain($first_term->getName()),
+        'label' => $first_term->getName(),
+      ),
+    );
     $this->assertRaw(Json::encode($target), 'Autocomplete returns only the expected matching term.');
 
     // Try to autocomplete a term name with both a comma and a slash.
@@ -336,17 +343,19 @@ function testTermAutocompletion() {
     $this->drupalGet($path, array('query' => array('q' => $input)));
     // Term names containing commas or quotes must be wrapped in quotes.
     $n = Tags::encode($third_term->getName());
-    $target = array(array(
-      'value' => $n,
-      'label' => String::checkPlain($third_term->getName()),
-    ));
+    $target = array(
+      array(
+        'value' => $n,
+        'label' => String::checkPlain($third_term->getName()),
+      ),
+    );
     $this->assertRaw(Json::encode($target), 'Autocomplete returns a term containing a comma and a slash.');
   }
 
   /**
    * Save, edit and delete a term using the user interface.
    */
-  function testTermInterface() {
+  public function testTermInterface() {
     \Drupal::moduleHandler()->install(array('views'));
     $edit = array(
       'name[0][value]' => $this->randomMachineName(12),
@@ -426,7 +435,7 @@ function testTermInterface() {
   /**
    * Save, edit and delete a term using the user interface.
    */
-  function testTermReorder() {
+  public function testTermReorder() {
     $this->createTerm($this->vocabulary);
     $this->createTerm($this->vocabulary);
     $this->createTerm($this->vocabulary);
@@ -481,7 +490,7 @@ function testTermReorder() {
   /**
    * Test saving a term with multiple parents through the UI.
    */
-  function testTermMultipleParentsInterface() {
+  public function testTermMultipleParentsInterface() {
     // Add a new term to the vocabulary so that we can have multiple parents.
     $parent = $this->createTerm($this->vocabulary);
 
@@ -510,7 +519,7 @@ function testTermMultipleParentsInterface() {
   /**
    * Test taxonomy_term_load_multiple_by_name().
    */
-  function testTaxonomyGetTermByName() {
+  public function testTaxonomyGetTermByName() {
     $term = $this->createTerm($this->vocabulary);
 
     // Load the term with the exact name.
@@ -570,7 +579,7 @@ function testTaxonomyGetTermByName() {
   /**
    * Tests that editing and saving a node with no changes works correctly.
    */
-  function testReSavingTags() {
+  public function testReSavingTags() {
     // Enable tags in the vocabulary.
     $field = $this->field;
     entity_get_form_display($field->entity_type, $field->bundle, 'default')
diff --git a/core/modules/taxonomy/src/Tests/TermTranslationUITest.php b/core/modules/taxonomy/src/Tests/TermTranslationUITest.php
index f96f357..526119f 100644
--- a/core/modules/taxonomy/src/Tests/TermTranslationUITest.php
+++ b/core/modules/taxonomy/src/Tests/TermTranslationUITest.php
@@ -104,7 +104,7 @@ public function testTranslationUI() {
   /**
    * Tests translate link on vocabulary term list.
    */
-  function testTranslateLinkVocabularyAdminPage() {
+  public function testTranslateLinkVocabularyAdminPage() {
     $this->admin_user = $this->drupalCreateUser(array_merge(parent::getTranslatorPermissions(), array('access administration pages', 'administer taxonomy')));
     $this->drupalLogin($this->admin_user);
 
diff --git a/core/modules/taxonomy/src/Tests/TermUnitTest.php b/core/modules/taxonomy/src/Tests/TermUnitTest.php
index 545bc4a..17992d1 100644
--- a/core/modules/taxonomy/src/Tests/TermUnitTest.php
+++ b/core/modules/taxonomy/src/Tests/TermUnitTest.php
@@ -14,7 +14,7 @@
  */
 class TermUnitTest extends TaxonomyTestBase {
 
-  function testTermDelete() {
+  public function testTermDelete() {
     $vocabulary = $this->createVocabulary();
     $valid_term = $this->createTerm($vocabulary);
     // Delete a valid term.
@@ -29,7 +29,7 @@ function testTermDelete() {
   /**
    * Deleting a parent of a term with multiple parents does not delete the term.
    */
-  function testMultipleParentDelete() {
+  public function testMultipleParentDelete() {
     $vocabulary = $this->createVocabulary();
     $parent_term1 = $this->createTerm($vocabulary);
     $parent_term2 = $this->createTerm($vocabulary);
@@ -50,7 +50,7 @@ function testMultipleParentDelete() {
   /**
    * Test a taxonomy with terms that have multiple parents of different depths.
    */
-  function testTaxonomyVocabularyTree() {
+  public function testTaxonomyVocabularyTree() {
     // Create a new vocabulary with 6 terms.
     $vocabulary = $this->createVocabulary();
     $term = array();
@@ -68,17 +68,15 @@ function testTaxonomyVocabularyTree() {
     $term[5]->parent = array($term[4]->id());
     $term[5]->save();
 
-    /**
-     * Expected tree:
-     * term[0] | depth: 0
-     * term[1] | depth: 0
-     * -- term[2] | depth: 1
-     * ---- term[3] | depth: 2
-     * term[4] | depth: 0
-     * -- term[5] | depth: 1
-     * ---- term[2] | depth: 2
-     * ------ term[3] | depth: 3
-     */
+    // Expected tree:
+    // term[0] | depth: 0
+    // term[1] | depth: 0
+    // -- term[2] | depth: 1
+    // ---- term[3] | depth: 2
+    // term[4] | depth: 0
+    // -- term[5] | depth: 1
+    // ---- term[2] | depth: 2
+    // ------ term[3] | depth: 3
     // Count $term[1] parents with $max_depth = 1.
     $tree = taxonomy_get_tree($vocabulary->id(), $term[1]->id(), 1);
     $this->assertEqual(1, count($tree), 'We have one parent with depth 1.');
diff --git a/core/modules/taxonomy/src/Tests/ThemeTest.php b/core/modules/taxonomy/src/Tests/ThemeTest.php
index 9ababed..05c612b 100644
--- a/core/modules/taxonomy/src/Tests/ThemeTest.php
+++ b/core/modules/taxonomy/src/Tests/ThemeTest.php
@@ -34,7 +34,7 @@ protected function setUp() {
   /**
    * Test the theme used when adding, viewing and editing taxonomy terms.
    */
-  function testTaxonomyTermThemes() {
+  public function testTaxonomyTermThemes() {
     // Adding a term to a vocabulary is considered an administrative action and
     // should use the administrative theme.
     $vocabulary = $this->createVocabulary();
diff --git a/core/modules/taxonomy/src/Tests/TokenReplaceTest.php b/core/modules/taxonomy/src/Tests/TokenReplaceTest.php
index d343995..37c99eb 100644
--- a/core/modules/taxonomy/src/Tests/TokenReplaceTest.php
+++ b/core/modules/taxonomy/src/Tests/TokenReplaceTest.php
@@ -60,7 +60,7 @@ protected function setUp() {
   /**
    * Creates some terms and a node, then tests the tokens generated from them.
    */
-  function testTaxonomyTokenReplacement() {
+  public function testTaxonomyTokenReplacement() {
     $token_service = \Drupal::token();
     $language_interface = \Drupal::languageManager()->getCurrentLanguage();
 
@@ -152,4 +152,3 @@ function testTaxonomyTokenReplacement() {
     }
   }
 }
-
diff --git a/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php b/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php
index 930990f..ed24b32 100644
--- a/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php
+++ b/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php
@@ -23,7 +23,7 @@ class RelationshipNodeTermDataTest extends TaxonomyTestBase {
    */
   public static $testViews = array('test_taxonomy_node_term_data');
 
-  function testViewsHandlerRelationshipNodeTermData() {
+  public function testViewsHandlerRelationshipNodeTermData() {
     $view = Views::getView('test_taxonomy_node_term_data');
     $this->executeView($view, array($this->term1->id(), $this->term2->id()));
     $expected_result = array(
diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldFilterTest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldFilterTest.php
index 5536703..fe46c6d 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldFilterTest.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldFilterTest.php
@@ -38,7 +38,7 @@ class TaxonomyFieldFilterTest extends ViewTestBase {
    */
   public $term_names = array();
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
     // Add two new languages.
@@ -53,7 +53,7 @@ function setUp() {
     );
 
     // Create a vocabulary.
-    $this->vocabulary = entity_create('taxonomy_vocabulary',  array(
+    $this->vocabulary = entity_create('taxonomy_vocabulary', array(
       'name' => 'Views testing tags',
       'vid' => 'views_testing_tags',
     ));
diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php
index 0289049..11f1ce8 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php
@@ -23,7 +23,7 @@ class TaxonomyFieldTidTest extends TaxonomyTestBase {
    */
   public static $testViews = array('test_taxonomy_tid_field');
 
-  function testViewsHandlerTidField() {
+  public function testViewsHandlerTidField() {
     $view = Views::getView('test_taxonomy_tid_field');
     $this->executeView($view);
 
diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php
index fb4cad2..bd988c4 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php
@@ -35,7 +35,7 @@ class TaxonomyIndexTidUiTest extends UITestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  public function setUp() {
     parent::setUp();
 
     ViewTestData::createTestViews(get_class($this), array('taxonomy_test_views'));
diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php
index ec0d257..739ceec 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php
@@ -72,7 +72,7 @@ protected function mockStandardInstall() {
       'type' => 'article',
     ));
     // Create the vocabulary for the tag field.
-    $this->vocabulary = entity_create('taxonomy_vocabulary',  array(
+    $this->vocabulary = entity_create('taxonomy_vocabulary', array(
       'name' => 'Views testing tags',
       'vid' => 'views_testing_tags',
     ));
diff --git a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
index adb35f7..57b2dd1 100644
--- a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
+++ b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
@@ -34,7 +34,7 @@ protected function setUp() {
   /**
    * Test deleting a taxonomy that contains terms.
    */
-  function testTaxonomyVocabularyDeleteWithTerms() {
+  public function testTaxonomyVocabularyDeleteWithTerms() {
     // Delete any existing vocabularies.
     foreach (entity_load_multiple('taxonomy_vocabulary') as $vocabulary) {
       $vocabulary->delete();
@@ -66,7 +66,7 @@ function testTaxonomyVocabularyDeleteWithTerms() {
   /**
    * Ensure that the vocabulary static reset works correctly.
    */
-  function testTaxonomyVocabularyLoadStaticReset() {
+  public function testTaxonomyVocabularyLoadStaticReset() {
     $original_vocabulary = entity_load('taxonomy_vocabulary', $this->vocabulary->id());
     $this->assertTrue(is_object($original_vocabulary), 'Vocabulary loaded successfully.');
     $this->assertEqual($this->vocabulary->name, $original_vocabulary->name, 'Vocabulary loaded successfully.');
@@ -90,7 +90,7 @@ function testTaxonomyVocabularyLoadStaticReset() {
   /**
    * Tests for loading multiple vocabularies.
    */
-  function testTaxonomyVocabularyLoadMultiple() {
+  public function testTaxonomyVocabularyLoadMultiple() {
 
     // Delete any existing vocabularies.
     foreach (entity_load_multiple('taxonomy_vocabulary') as $vocabulary) {
@@ -120,9 +120,17 @@ function testTaxonomyVocabularyLoadMultiple() {
 
     // Fetch the vocabularies with entity_load_multiple(), specifying IDs.
     // Ensure they are returned in the same order as the original array.
-    $vocabularies = entity_load_multiple('taxonomy_vocabulary', array($vocabulary3->id(), $vocabulary2->id(), $vocabulary1->id()));
+    $vocabularies = entity_load_multiple('taxonomy_vocabulary', array(
+      $vocabulary3->id(),
+      $vocabulary2->id(),
+      $vocabulary1->id(),
+    ));
     $loaded_order = array_keys($vocabularies);
-    $expected_order = array($vocabulary3->id(), $vocabulary2->id(), $vocabulary1->id());
+    $expected_order = array(
+      $vocabulary3->id(),
+      $vocabulary2->id(),
+      $vocabulary1->id(),
+    );
     $this->assertIdentical($loaded_order, $expected_order);
 
     // Test loading vocabularies by their properties.
@@ -142,7 +150,7 @@ function testTaxonomyVocabularyLoadMultiple() {
   /**
    * Tests that machine name changes are properly reflected.
    */
-  function testTaxonomyVocabularyChangeMachineName() {
+  public function testTaxonomyVocabularyChangeMachineName() {
     // Add a field to the vocabulary.
     entity_create('field_storage_config', array(
       'field_name' => 'field_test',
@@ -173,7 +181,7 @@ function testTaxonomyVocabularyChangeMachineName() {
   /**
    * Test uninstall and reinstall of the taxonomy module.
    */
-  function testUninstallReinstall() {
+  public function testUninstallReinstall() {
     // Field storages and fields attached to taxonomy term bundles should be
     // removed when the module is uninstalled.
     $field_name = drupal_strtolower($this->randomMachineName() . '_field_name');
@@ -181,7 +189,7 @@ function testUninstallReinstall() {
       'field_name' => $field_name,
       'entity_type' => 'taxonomy_term',
       'type' => 'text',
-      'cardinality' => 4
+      'cardinality' => 4,
     );
     entity_create('field_storage_config', $storage_definition)->save();
     $field_definition = array(
diff --git a/core/modules/taxonomy/src/Tests/VocabularyLanguageTest.php b/core/modules/taxonomy/src/Tests/VocabularyLanguageTest.php
index 0b400e7..58606e7 100644
--- a/core/modules/taxonomy/src/Tests/VocabularyLanguageTest.php
+++ b/core/modules/taxonomy/src/Tests/VocabularyLanguageTest.php
@@ -18,7 +18,7 @@ class VocabularyLanguageTest extends TaxonomyTestBase {
 
   public static $modules = array('language');
 
-  protected function setUp() {
+  public protected function setUp() {
     parent::setUp();
 
     // Create an administrative user.
@@ -40,7 +40,7 @@ protected function setUp() {
   /**
    * Tests language settings for vocabularies.
    */
-  function testVocabularyLanguage() {
+  public function testVocabularyLanguage() {
     $this->drupalGet('admin/structure/taxonomy/add');
 
     // Check that we have the language selector available.
@@ -71,7 +71,7 @@ function testVocabularyLanguage() {
   /**
    * Tests term language settings for vocabulary terms are saved and updated.
    */
-  function testVocabularyDefaultLanguageForTerms() {
+  public function testVocabularyDefaultLanguageForTerms() {
     // Add a new vocabulary and check that the default language settings are for
     // the terms are saved.
     $edit = array(
diff --git a/core/modules/taxonomy/src/Tests/VocabularyPermissionsTest.php b/core/modules/taxonomy/src/Tests/VocabularyPermissionsTest.php
index f6c7480..51e5a24 100644
--- a/core/modules/taxonomy/src/Tests/VocabularyPermissionsTest.php
+++ b/core/modules/taxonomy/src/Tests/VocabularyPermissionsTest.php
@@ -17,7 +17,7 @@ class VocabularyPermissionsTest extends TaxonomyTestBase {
   /**
    * Create, edit and delete a taxonomy term via the user interface.
    */
-  function testVocabularyPermissionsTaxonomyTerm() {
+  public function testVocabularyPermissionsTaxonomyTerm() {
     // Vocabulary used for creating, removing and editing terms.
     $vocabulary = $this->createVocabulary();
 
diff --git a/core/modules/taxonomy/src/Tests/VocabularyUiTest.php b/core/modules/taxonomy/src/Tests/VocabularyUiTest.php
index 6e3700a..2819768 100644
--- a/core/modules/taxonomy/src/Tests/VocabularyUiTest.php
+++ b/core/modules/taxonomy/src/Tests/VocabularyUiTest.php
@@ -24,7 +24,7 @@ protected function setUp() {
   /**
    * Create, edit and delete a vocabulary via the user interface.
    */
-  function testVocabularyInterface() {
+  public function testVocabularyInterface() {
     // Visit the main taxonomy administration page.
     $this->drupalGet('admin/structure/taxonomy');
 
@@ -73,7 +73,7 @@ function testVocabularyInterface() {
   /**
    * Changing weights on the vocabulary overview with two or more vocabularies.
    */
-  function testTaxonomyAdminChangingWeights() {
+  public function testTaxonomyAdminChangingWeights() {
     // Create some vocabularies.
     for ($i = 0; $i < 10; $i++) {
       $this->createVocabulary();
@@ -102,7 +102,7 @@ function testTaxonomyAdminChangingWeights() {
   /**
    * Test the vocabulary overview with no vocabularies.
    */
-  function testTaxonomyAdminNoVocabularies() {
+  public function testTaxonomyAdminNoVocabularies() {
     // Delete all vocabularies.
     $vocabularies = entity_load_multiple('taxonomy_vocabulary');
     foreach ($vocabularies as $key => $vocabulary) {
@@ -118,7 +118,7 @@ function testTaxonomyAdminNoVocabularies() {
   /**
    * Deleting a vocabulary.
    */
-  function testTaxonomyAdminDeletingVocabulary() {
+  public function testTaxonomyAdminDeletingVocabulary() {
     // Create a vocabulary.
     $vid = drupal_strtolower($this->randomMachineName());
     $edit = array(
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index a715c0a..280e389 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -55,7 +55,7 @@ function taxonomy_help($route_name, RouteMatchInterface $route_match) {
       $output .= '<h3>' . t('Uses') . '</h3>';
       $output .= '<dl>';
       $output .= '<dt>' . t('Creating vocabularies') . '</dt>';
-      $output .= '<dd>' . t('Users with sufficient <a href="@perm">permissions</a> can create <em>vocabularies</em> and <em>terms</em> through the <a href="@taxo">Taxonomy page</a>. The page listing the terms provides a drag-and-drop interface for controlling the order of the terms and sub-terms within a vocabulary, in a hierarchical fashion. A <em>controlled vocabulary</em> classifying music by genre with terms and sub-terms could look as follows:', array('@taxo' => \Drupal::url('taxonomy.vocabulary_list'), '@perm' => \Drupal::url('user.admin_permissions', [], array('fragment'=>'module-taxonomy'))));
+      $output .= '<dd>' . t('Users with sufficient <a href="@perm">permissions</a> can create <em>vocabularies</em> and <em>terms</em> through the <a href="@taxo">Taxonomy page</a>. The page listing the terms provides a drag-and-drop interface for controlling the order of the terms and sub-terms within a vocabulary, in a hierarchical fashion. A <em>controlled vocabulary</em> classifying music by genre with terms and sub-terms could look as follows:', array('@taxo' => \Drupal::url('taxonomy.vocabulary_list'), '@perm' => \Drupal::url('user.admin_permissions', [], array('fragment' => 'module-taxonomy'))));
       $output .= '<ul><li>' . t('<em>vocabulary</em>: Music') . '</li>';
       $output .= '<ul><li>' . t('<em>term</em>: Jazz') . '</li>';
       $output .= '<ul><li>' . t('<em>sub-term</em>: Swing') . '</li>';
@@ -85,8 +85,10 @@ function taxonomy_help($route_name, RouteMatchInterface $route_match) {
       switch ($vocabulary->hierarchy) {
         case TAXONOMY_HIERARCHY_DISABLED:
           return '<p>' . t('You can reorganize the terms in %capital_name using their drag-and-drop handles, and group terms under a parent term by sliding them under and to the right of the parent.', array('%capital_name' => drupal_ucfirst($vocabulary->name), '%name' => $vocabulary->name)) . '</p>';
+
         case TAXONOMY_HIERARCHY_SINGLE:
           return '<p>' . t('%capital_name contains terms grouped under parent terms. You can reorganize the terms in %capital_name using their drag-and-drop handles.', array('%capital_name' => drupal_ucfirst($vocabulary->name), '%name' => $vocabulary->name)) . '</p>';
+
         case TAXONOMY_HIERARCHY_MULTIPLE:
           return '<p>' . t('%capital_name contains terms with multiple parents. Drag and drop of terms with multiple parents is not supported, but you can re-enable drag-and-drop support by editing each term to include only a single parent.', array('%capital_name' => drupal_ucfirst($vocabulary->name))) . '</p>';
       }
@@ -140,17 +142,17 @@ function taxonomy_page_build(&$page) {
  * and will return an empty array if it is not. If using other field storage
  * methods alternatives methods for listing terms will need to be used.
  *
- * @param $tid
+ * @param int $tid
  *   The term ID.
- * @param $pager
+ * @param bool $pager
  *   Boolean to indicate whether a pager should be used.
- * @param $limit
+ * @param int $limit
  *   Integer. The maximum number of nodes to find.
  *   Set to FALSE for no limit.
- * @param $order
+ * @param array $order
  *   An array of fields and directions.
  *
- * @return
+ * @return array
  *   An array of nids matching the query.
  */
 function taxonomy_select_nodes($tid, $pager = TRUE, $limit = FALSE, $order = array('t.sticky' => 'DESC', 't.created' => 'DESC')) {
@@ -213,10 +215,10 @@ function taxonomy_theme() {
  *
  * @param \Drupal\taxonomy\VocabularyInterface $vocabulary
  *   A taxonomy vocabulary entity.
- * @param $changed_term
+ * @param array $changed_term
  *   An array of the term structure that was updated.
  *
- * @return
+ * @return int
  *   An integer that represents the level of the vocabulary's hierarchy.
  */
 function taxonomy_check_vocabulary_hierarchy(VocabularyInterface $vocabulary, $changed_term) {
@@ -267,7 +269,8 @@ function taxonomy_term_view(Term $term, $view_mode = 'full', $langcode = NULL) {
  * Constructs a drupal_render() style array from an array of loaded terms.
  *
  * @param array $terms
- *   An array of taxonomy terms as returned by entity_load_multiple('taxonomy_term').
+  *   An array of taxonomy terms as returned by
+  *   entity_load_multiple('taxonomy_term').
  * @param string $view_mode
  *   View mode, e.g. 'full', 'teaser'...
  * @param string $langcode
@@ -287,7 +290,7 @@ function taxonomy_term_view_multiple(array $terms, $view_mode = 'full', $langcod
 function taxonomy_theme_suggestions_taxonomy_term(array $variables) {
   $suggestions = array();
 
-  /** @var \Drupal\taxonomy\TermInterface $term */
+  // @var \Drupal\taxonomy\TermInterface $term
   $term = $variables['elements']['#taxonomy_term'];
 
   $suggestions[] = 'taxonomy_term__' . $term->bundle();
@@ -313,7 +316,7 @@ function taxonomy_theme_suggestions_taxonomy_term(array $variables) {
 function template_preprocess_taxonomy_term(&$variables) {
   $variables['view_mode'] = $variables['elements']['#view_mode'];
   $variables['term'] = $variables['elements']['#taxonomy_term'];
-  /** @var \Drupal\taxonomy\TermInterface $term */
+  // @var \Drupal\taxonomy\TermInterface $term
   $term = $variables['term'];
 
   $variables['url'] = $term->url();
@@ -383,10 +386,10 @@ function taxonomy_vocabulary_get_names() {
 /**
  * Finds all parents of a given term ID.
  *
- * @param $tid
+ * @param int $tid
  *   A taxonomy term ID.
  *
- * @return
+ * @return array
  *   An array of term objects which are the parents of the term $tid, or an
  *   empty array if parents are not found.
  *
@@ -410,10 +413,10 @@ function taxonomy_term_load_parents_all($tid) {
 /**
  * Finds all children of a term ID.
  *
- * @param $tid
+ * @param int $tid
  *   A taxonomy term ID.
  *
- * @return
+ * @return array
  *   An array of term objects that are the children of the term $tid, or an
  *   empty array when no children exist.
  *
@@ -427,20 +430,21 @@ function taxonomy_term_load_children($tid) {
 /**
  * Create a hierarchical representation of a vocabulary.
  *
- * @param $vid
+ * @param int $vid
  *   The vocabulary ID to generate the tree for.
- * @param $parent
+ * @param int $parent
  *   The term ID under which to generate the tree. If 0, generate the tree
  *   for the entire vocabulary.
- * @param $max_depth
- *   The number of levels of the tree to return. Leave NULL to return all levels.
- * @param $load_entities
+ * @param int $max_depth
+ *   The number of levels of the tree to return. Leave NULL to return all
+ *   levels.
+ * @param bool $load_entities
  *   If TRUE, a full entity load will occur on the term objects. Otherwise they
  *   are partial objects queried directly from the {taxonomy_term_field_data}
  *   table to save execution time and memory consumption when listing large
  *   numbers of terms. Defaults to FALSE.
  *
- * @return
+ * @return array
  *   An array of all term objects in the tree. Each term object is extended
  *   to have "depth" and "parents" attributes in addition to its normal ones.
  *   Results are statically cached. Term objects will be partial or complete
@@ -459,19 +463,19 @@ function taxonomy_get_tree($vid, $parent = 0, $max_depth = NULL, $load_entities
  * Provides a case-insensitive and trimmed mapping, to maximize the
  * likelihood of a successful match.
  *
- * @param $name
+ * @param string $name
  *   Name of the term to search for.
- * @param $vocabulary
+ * @param string $vocabulary
  *   (optional) Vocabulary machine name to limit the search. Defaults to NULL.
  *
- * @return
+ * @return array
  *   An array of matching term objects.
  */
 function taxonomy_term_load_multiple_by_name($name, $vocabulary = NULL) {
   $values = array('name' => trim($name));
   if (isset($vocabulary)) {
     $vocabularies = taxonomy_vocabulary_get_names();
-    if (isset($vocabularies[$vocabulary])){
+    if (isset($vocabularies[$vocabulary])) {
       $values['vid'] = $vocabulary;
     }
     else {
@@ -522,7 +526,7 @@ function taxonomy_term_load_multiple(array $tids = NULL) {
  *   (optional) An array of entity IDs. If omitted, all entities are loaded.
  *
  * @return array
- *  An array of vocabulary objects, indexed by vid.
+ *   An array of vocabulary objects, indexed by vid.
  */
 function taxonomy_vocabulary_load_multiple(array $vids = NULL) {
   return Vocabulary::loadMultiple($vids);
@@ -551,7 +555,7 @@ function taxonomy_vocabulary_load($vid) {
  * @deprecated in Drupal 8.x, will be removed before Drupal 9.0.
  *   Use \Drupal\taxonomy\Entity\Term::load().
  *
- * @param $tid
+ * @param int $tid
  *   A term's ID
  *
  * @return \Drupal\taxonomy\Entity\Term|null
@@ -612,7 +616,7 @@ function taxonomy_field_formatter_info_alter(array &$info) {
  * @param \Drupal\taxonomy\Entity\Term $term
  *   A taxonomy term entity.
  *
- * @return
+ * @return string
  *   The term name to be used as the page title.
  */
 function taxonomy_term_title(Term $term) {
diff --git a/core/modules/taxonomy/taxonomy.tokens.inc b/core/modules/taxonomy/taxonomy.tokens.inc
index aa1505c..f6c120f 100644
--- a/core/modules/taxonomy/taxonomy.tokens.inc
+++ b/core/modules/taxonomy/taxonomy.tokens.inc
@@ -67,7 +67,7 @@ function taxonomy_token_info() {
     'description' => t("The number of terms belonging to the taxonomy vocabulary."),
   );
 
-  // Chained tokens for taxonomies
+  // Chained tokens for taxonomies.
   $term['vocabulary'] = array(
     'name' => t("Vocabulary"),
     'description' => t("The vocabulary the taxonomy term belongs to."),
diff --git a/core/modules/taxonomy/taxonomy.views.inc b/core/modules/taxonomy/taxonomy.views.inc
index 4de1876..21a9faf 100644
--- a/core/modules/taxonomy/taxonomy.views.inc
+++ b/core/modules/taxonomy/taxonomy.views.inc
@@ -54,8 +54,8 @@ function taxonomy_views_data_alter(&$data) {
 /**
  * Implements hook_field_views_data().
  *
- * Views integration for taxonomy_term_reference fields. Adds a term relationship to the default
- * field data.
+ * Views integration for taxonomy_term_reference fields. Adds a term
+ * relationship to the default field data.
  *
  * @see field_views_field_default_views_data()
  */
diff --git a/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php b/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php
index be3dd53..617b292 100644
--- a/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php
+++ b/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php
@@ -30,7 +30,9 @@ public function testTaxonomyPageLocalTasks($route, $subtask = array()) {
     $tasks = array(
       0 => array('entity.taxonomy_term.canonical', 'entity.taxonomy_term.edit_form'),
     );
-    if ($subtask) $tasks[] = $subtask;
+    if ($subtask) {
+      $tasks[] = $subtask;
+    }
     $this->assertLocalTasks($route, $tasks);
   }
 
