diff --git a/core/modules/taxonomy/src/Controller/TaxonomyController.php b/core/modules/taxonomy/src/Controller/TaxonomyController.php
index 0312a9d..2856804 100644
--- a/core/modules/taxonomy/src/Controller/TaxonomyController.php
+++ b/core/modules/taxonomy/src/Controller/TaxonomyController.php
@@ -19,7 +19,8 @@
 class TaxonomyController extends ControllerBase {
 
   /**
-   * Returns a rendered edit form to create a new term associated to the given vocabulary.
+   * Returns a rendered edit form to create a new term associated to the given
+   * vocabulary.
    *
    * @param \Drupal\taxonomy\VocabularyInterface $taxonomy_vocabulary
    *   The vocabulary this term will be added to.
@@ -41,7 +42,6 @@ public function addForm(VocabularyInterface $taxonomy_vocabulary) {
   public function termPage(TermInterface $taxonomy_term) {
     module_load_include('pages.inc', 'taxonomy');
     return taxonomy_term_page($taxonomy_term);
-
   }
 
   /**
diff --git a/core/modules/taxonomy/src/Controller/TermAutocompleteController.php b/core/modules/taxonomy/src/Controller/TermAutocompleteController.php
index b1450b5..1eaedf0 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 4ff067a..5621da2 100644
--- a/core/modules/taxonomy/src/Form/OverviewTerms.php
+++ b/core/modules/taxonomy/src/Form/OverviewTerms.php
@@ -192,14 +192,18 @@ public function buildForm(array $form, array &$form_state, VocabularyInterface $
     // Build the actual form.
     $form['terms'] = array(
       '#type' => 'table',
-      '#header' => array($this->t('Name'), $this->t('Weight'), $this->t('Operations')),
+      '#header' => array(
+        $this->t('Name'),
+        $this->t('Weight'),
+        $this->t('Operations'),
+      ),
       '#empty' => $this->t('No terms available. <a href="@link">Add term</a>.', array('@link' => url('admin/structure/taxonomy/manage/' . $taxonomy_vocabulary->id() . '/add'))),
       '#attributes' => array(
         'id' => 'taxonomy',
       ),
     );
     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) {
@@ -398,12 +402,14 @@ public function submitForm(array &$form, array &$form_state) {
     foreach ($form_state['values']['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()) {
@@ -447,9 +453,10 @@ public function submitForm(array &$form, array &$form_state) {
 
   /**
    * Redirects to confirmation form for the reset action.
+   *
+   * @var $vocabulary \Drupal\taxonomy\VocabularyInterface
    */
   public function submitReset(array &$form, array &$form_state) {
-    /** @var $vocabulary \Drupal\taxonomy\VocabularyInterface */
     $vocabulary = $form_state['taxonomy']['vocabulary'];
     $form_state['redirect_route'] = $vocabulary->urlInfo('reset');
   }
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 ae156a4..b064ccc 100644
--- a/core/modules/taxonomy/src/Plugin/Field/FieldWidget/TaxonomyAutocompleteWidget.php
+++ b/core/modules/taxonomy/src/Plugin/Field/FieldWidget/TaxonomyAutocompleteWidget.php
@@ -97,8 +97,8 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
    * {@inheritdoc}
    */
   public function massageFormValues(array $values, array $form, array &$form_state) {
-    // Autocomplete widgets do not send their tids in the form, so we must detect
-    // them here and process them independently.
+    // Autocomplete widgets do not send their tids in the form, so we must
+    // detect them here and process them independently.
     $items = array();
 
     // Collect candidate vocabularies.
@@ -109,7 +109,7 @@ public function massageFormValues(array $values, array $form, array &$form_state
     }
 
     // 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 d41e893..18ec43b 100644
--- a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php
+++ b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php
@@ -119,12 +119,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 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 ddfd1b9..dfd869d 100644
--- a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php
+++ b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php
@@ -21,9 +21,9 @@
  */
 class IndexTidDepthModifier extends ArgumentPluginBase {
 
-  public function buildOptionsForm(&$form, &$form_state) { }
+  public function buildOptionsForm(&$form, &$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:
@@ -40,7 +40,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 905c590..869c00b 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 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 b69d6e8..7ee1c84 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 6dfd7bd..6cf5781 100644
--- a/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php
+++ b/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php
@@ -143,7 +143,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/LinkEdit.php b/core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php
index 295bb9c..2ada9f8 100644
--- a/core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php
+++ b/core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php
@@ -67,7 +67,7 @@ public function render(ResultRow $values) {
       ));
       if ($term->access('update')) {
         $text = !empty($this->options['text']) ? $this->options['text'] : t('Edit');
-        return l($text, 'taxonomy/term/'. $tid . '/edit', array('query' => drupal_get_destination()));
+        return l($text, 'taxonomy/term/' . $tid . '/edit', array('query' => drupal_get_destination()));
       }
     }
   }
diff --git a/core/modules/taxonomy/src/Plugin/views/field/Taxonomy.php b/core/modules/taxonomy/src/Plugin/views/field/Taxonomy.php
index 7700b27..d1d8e9c 100644
--- a/core/modules/taxonomy/src/Plugin/views/field/Taxonomy.php
+++ b/core/modules/taxonomy/src/Plugin/views/field/Taxonomy.php
@@ -46,7 +46,7 @@ protected function defineOptions() {
   }
 
   /**
-   * Provide link to taxonomy option
+   * Provide link to taxonomy option.
    */
   public function buildOptionsForm(&$form, &$form_state) {
     $form['link_to_taxonomy'] = array(
@@ -55,7 +55,7 @@ public function buildOptionsForm(&$form, &$form_state) {
       '#type' => 'checkbox',
       '#default_value' => !empty($this->options['link_to_taxonomy']),
     );
-     $form['convert_spaces'] = array(
+    $form['convert_spaces'] = array(
       '#title' => t('Convert spaces in term names to hyphens'),
       '#description' => 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 90e8225..ac5b481 100644
--- a/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php
+++ b/core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php
@@ -85,7 +85,7 @@ public function buildOptionsForm(&$form, &$form_state) {
   }
 
   /**
-   * Add this term to the query
+   * Add this term to the query.
    */
   public function query() {
     $this->addAdditionalFields();
@@ -130,7 +130,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 2c708ea..6ed9a2e 100644
--- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
+++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
@@ -22,7 +22,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().
@@ -35,9 +35,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();
@@ -181,8 +185,8 @@ protected function valueForm(&$form, &$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';
           }
@@ -207,7 +211,7 @@ protected function valueForm(&$form, &$form_state) {
     }
 
     if (empty($form_state['exposed'])) {
-      // Retain the helper option
+      // Retain the helper option.
       $this->helper->buildOptionsForm($form, $form_state);
     }
   }
@@ -232,7 +236,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']];
     }
@@ -262,7 +266,7 @@ public function validateExposed(&$form, &$form_state) {
 
     // We only validate if they've chosen the text field style.
     if ($this->options['type'] != 'textfield') {
-      if ($form_state['values'][$identifier] != 'All')  {
+      if ($form_state['values'][$identifier] != 'All') {
         $this->validated_exposed_input = (array) $form_state['values'][$identifier];
       }
       return;
@@ -285,9 +289,9 @@ public function validateExposed(&$form, &$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.
    *
    * @return array
@@ -332,7 +336,7 @@ function validate_term_strings(&$form, $values) {
   }
 
   protected function valueSubmit($form, &$form_state) {
-    // prevent array_filter from messing up our arrays in parent submit.
+    // Prevent array_filter from messing up our arrays in parent submit.
   }
 
   public function buildExposeForm(&$form, &$form_state) {
@@ -348,7 +352,7 @@ public function buildExposeForm(&$form, &$form_state) {
   }
 
   public function adminSummary() {
-    // set up $this->value_options for the parent summary
+    // Set up $this->value_options for the parent summary.
     $this->value_options = 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 da0a61d..254d99a 100644
--- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php
+++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php
@@ -57,7 +57,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 c720ee9..2883309 100644
--- a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
+++ b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
@@ -78,7 +78,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';
@@ -96,7 +96,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 1c34511..42e32d0 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/TermAccessController.php b/core/modules/taxonomy/src/TermAccessController.php
index ca98dbb..9fd31d9 100644
--- a/core/modules/taxonomy/src/TermAccessController.php
+++ b/core/modules/taxonomy/src/TermAccessController.php
@@ -25,15 +25,12 @@ protected function checkAccess(EntityInterface $entity, $operation, $langcode, A
     switch ($operation) {
       case 'view':
         return $account->hasPermission('access content');
-        break;
 
       case 'update':
         return $account->hasPermission("edit terms in {$entity->bundle()}") || $account->hasPermission('administer taxonomy');
-        break;
 
       case 'delete':
         return $account->hasPermission("delete terms in {$entity->bundle()}") || $account->hasPermission('administer taxonomy');
-        break;
     }
   }
 
diff --git a/core/modules/taxonomy/src/TermForm.php b/core/modules/taxonomy/src/TermForm.php
index e3b048a..e98793b 100644
--- a/core/modules/taxonomy/src/TermForm.php
+++ b/core/modules/taxonomy/src/TermForm.php
@@ -143,6 +143,7 @@ public function save(array $form, array &$form_state) {
         drupal_set_message($this->t('Created new term %term.', array('%term' => $term->getName())));
         watchdog('taxonomy', 'Created new term %term.', array('%term' => $term->getName()), WATCHDOG_NOTICE, l($this->t('Edit'), 'taxonomy/term/' . $term->id() . '/edit'));
         break;
+
       case SAVED_UPDATED:
         drupal_set_message($this->t('Updated term %term.', array('%term' => $term->getName())));
         watchdog('taxonomy', 'Updated term %term.', array('%term' => $term->getName()), WATCHDOG_NOTICE, l($this->t('Edit'), 'taxonomy/term/' . $term->id() . '/edit'));
@@ -159,8 +160,8 @@ public function save(array $form, array &$form_state) {
       $form_state['values']['parent'] = array();
     }
 
-    // If the number of parents has been reduced to one or none, do a check on the
-    // parents of every term in the vocabulary value.
+    // If the number of parents has been reduced to one or none, do a check on
+    // the parents of every term in the vocabulary value.
     if ($current_parent_count < $previous_parent_count && $current_parent_count < 2) {
       taxonomy_check_vocabulary_hierarchy($form_state['taxonomy']['vocabulary'], $form_state['values']);
     }
diff --git a/core/modules/taxonomy/src/TermStorageInterface.php b/core/modules/taxonomy/src/TermStorageInterface.php
index 634ff3d..ca374a0 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 58cf864..5b546e2 100644
--- a/core/modules/taxonomy/src/TermTranslationHandler.php
+++ b/core/modules/taxonomy/src/TermTranslationHandler.php
@@ -28,9 +28,9 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac
    *
    * This handles the save action.
    *
-   * @see \Drupal\Core\Entity\EntityForm::build().
+   * @see \Drupal\Core\Entity\EntityFormController::build().
    */
-  function entityFormSave(array $form, array &$form_state) {
+  public function entityFormSave(array $form, array &$form_state) {
     if ($this->getSourceLangcode($form_state)) {
       $entity = content_translation_form_controller($form_state)->getEntity();
       // We need a redirect here, otherwise we would get an access denied page,
diff --git a/core/modules/taxonomy/src/Tests/EfqTest.php b/core/modules/taxonomy/src/Tests/EfqTest.php
index e664f67..ca571f6 100644
--- a/core/modules/taxonomy/src/Tests/EfqTest.php
+++ b/core/modules/taxonomy/src/Tests/EfqTest.php
@@ -21,7 +21,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
     $this->admin_user = $this->drupalCreateUser(array('administer taxonomy'));
     $this->drupalLogin($this->admin_user);
@@ -31,7 +31,7 @@ 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 c7035c9..304a651 100644
--- a/core/modules/taxonomy/src/Tests/LegacyTest.php
+++ b/core/modules/taxonomy/src/Tests/LegacyTest.php
@@ -30,7 +30,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
     // Create a tags vocabulary for the 'article' content type.
@@ -68,14 +68,18 @@ 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 2c538fe..22bb290 100644
--- a/core/modules/taxonomy/src/Tests/LoadMultipleTest.php
+++ b/core/modules/taxonomy/src/Tests/LoadMultipleTest.php
@@ -20,7 +20,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
     $this->taxonomy_admin = $this->drupalCreateUser(array('administer taxonomy'));
     $this->drupalLogin($this->taxonomy_admin);
@@ -30,7 +30,7 @@ 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 709d0fa..8b7c84b 100644
--- a/core/modules/taxonomy/src/Tests/RssTest.php
+++ b/core/modules/taxonomy/src/Tests/RssTest.php
@@ -29,10 +29,15 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public 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();
@@ -74,7 +79,7 @@ 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 576b9d1..06aaaa0 100644
--- a/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
+++ b/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
@@ -73,7 +73,10 @@ public 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 a19542b..7e14981 100644
--- a/core/modules/taxonomy/src/Tests/TaxonomyTermIndentationTest.php
+++ b/core/modules/taxonomy/src/Tests/TaxonomyTermIndentationTest.php
@@ -37,7 +37,7 @@ public function setUp() {
   /**
    * Tests term indentation.
    */
-  function testTermIndentation() {
+  public function testTermIndentation() {
     // Create three taxonomy terms.
     $term1 = $this->createTerm($this->vocabulary);
     $term2 = $this->createTerm($this->vocabulary);
@@ -67,7 +67,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>|');
 
@@ -78,4 +78,3 @@ function testTermIndentation() {
   }
 
 }
-
diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php
index 9fd5a34..8542710 100644
--- a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php
+++ b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php
@@ -22,7 +22,7 @@
    */
   public static $modules = array('taxonomy');
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
     // Create Basic page and Article node types.
@@ -34,7 +34,7 @@ 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->randomName(),
@@ -50,7 +50,7 @@ function createVocabulary() {
   /**
    * Returns a new term with random properties in vocabulary $vid.
    */
-  function createTerm($vocabulary) {
+  public function createTerm($vocabulary) {
     $filter_formats = filter_formats();
     $format = array_pop($filter_formats);
     $term = entity_create('taxonomy_term', array(
diff --git a/core/modules/taxonomy/src/Tests/TermCacheTagsTest.php b/core/modules/taxonomy/src/Tests/TermCacheTagsTest.php
index 6cd6457..7612dba 100644
--- a/core/modules/taxonomy/src/Tests/TermCacheTagsTest.php
+++ b/core/modules/taxonomy/src/Tests/TermCacheTagsTest.php
@@ -31,7 +31,7 @@ public static function getInfo() {
    */
   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 8ec55e7..93f1090 100644
--- a/core/modules/taxonomy/src/Tests/TermFieldMultipleVocabularyTest.php
+++ b/core/modules/taxonomy/src/Tests/TermFieldMultipleVocabularyTest.php
@@ -33,10 +33,13 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public 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();
@@ -59,7 +62,7 @@ function setUp() {
             'parent' => '0',
           ),
         ),
-      )
+      ),
     ))->save();
     entity_create('field_instance_config', array(
       'field_name' => $this->field_name,
@@ -81,7 +84,7 @@ 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 f61b91e..6883efa 100644
--- a/core/modules/taxonomy/src/Tests/TermFieldTest.php
+++ b/core/modules/taxonomy/src/Tests/TermFieldTest.php
@@ -31,7 +31,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
     $web_user = $this->drupalCreateUser(array(
@@ -56,7 +56,7 @@ function setUp() {
             'parent' => '0',
           ),
         ),
-      )
+      ),
     ));
     $this->field->save();
     entity_create('field_instance_config', array(
@@ -79,26 +79,26 @@ 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);
 
@@ -133,7 +133,7 @@ function testTaxonomyTermFieldWidgets() {
   /**
    * No php error message on the field setting page for autocomplete widget.
    */
-  function testTaxonomyTermFieldInstanceSettingsAutocompleteWidget() {
+  public function testTaxonomyTermFieldInstanceSettingsAutocompleteWidget() {
     entity_get_form_display('entity_test', 'entity_test', 'default')
       ->setComponent($this->field_name, array(
         'type' => 'taxonomy_autocomplete',
@@ -145,9 +145,10 @@ function testTaxonomyTermFieldInstanceSettingsAutocompleteWidget() {
   }
 
   /**
-   * 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->settings['allowed_values'] = array(
diff --git a/core/modules/taxonomy/src/Tests/TermIndexTest.php b/core/modules/taxonomy/src/Tests/TermIndexTest.php
index e79d159..3f0e3ff 100644
--- a/core/modules/taxonomy/src/Tests/TermIndexTest.php
+++ b/core/modules/taxonomy/src/Tests/TermIndexTest.php
@@ -22,7 +22,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
     // Create an administrative user.
@@ -98,7 +98,7 @@ 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);
@@ -206,7 +206,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 256a0a0..65cdf84 100644
--- a/core/modules/taxonomy/src/Tests/TermLanguageTest.php
+++ b/core/modules/taxonomy/src/Tests/TermLanguageTest.php
@@ -24,7 +24,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
     // Create an administrative user.
@@ -44,7 +44,7 @@ function setUp() {
     }
   }
 
-  function testTermLanguage() {
+  public function testTermLanguage() {
     // Configure the vocabulary to not hide the language selector.
     $edit = array(
       'default_language[language_show]' => TRUE,
@@ -78,7 +78,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 d309e30..0a3fc99 100644
--- a/core/modules/taxonomy/src/Tests/TermTest.php
+++ b/core/modules/taxonomy/src/Tests/TermTest.php
@@ -26,7 +26,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
     $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'bypass node access'));
     $this->drupalLogin($this->admin_user);
@@ -70,7 +70,7 @@ 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);
@@ -107,9 +107,10 @@ function testTaxonomyTermHierarchy() {
   /**
    * 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);
@@ -148,7 +149,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.
     $instance = $this->instance;
     entity_get_form_display($instance->entity_type, $instance->bundle, 'default')
@@ -217,7 +218,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())));
@@ -246,7 +251,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');
@@ -280,10 +285,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.
@@ -292,17 +299,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() {
     $edit = array(
       'name[0][value]' => $this->randomName(12),
       'description[0][value]' => $this->randomName(100),
@@ -381,7 +390,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);
@@ -440,7 +449,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);
 
@@ -469,7 +478,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.
@@ -529,7 +538,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.
     $instance = $this->instance;
     entity_get_form_display($instance->entity_type, $instance->bundle, 'default')
diff --git a/core/modules/taxonomy/src/Tests/TermTranslationUITest.php b/core/modules/taxonomy/src/Tests/TermTranslationUITest.php
index c51428c..098862b 100644
--- a/core/modules/taxonomy/src/Tests/TermTranslationUITest.php
+++ b/core/modules/taxonomy/src/Tests/TermTranslationUITest.php
@@ -42,7 +42,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     $this->entityTypeId = 'taxonomy_term';
     $this->bundle = 'tags';
     $this->name = $this->randomName();
@@ -117,7 +117,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 83132c3..dc26b7f 100644
--- a/core/modules/taxonomy/src/Tests/TermUnitTest.php
+++ b/core/modules/taxonomy/src/Tests/TermUnitTest.php
@@ -20,7 +20,7 @@ public static function getInfo() {
     );
   }
 
-  function testTermDelete() {
+  public function testTermDelete() {
     $vocabulary = $this->createVocabulary();
     $valid_term = $this->createTerm($vocabulary);
     // Delete a valid term.
@@ -35,7 +35,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);
@@ -56,7 +56,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();
@@ -74,17 +74,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 ee8cc38..5fd3ff6 100644
--- a/core/modules/taxonomy/src/Tests/ThemeTest.php
+++ b/core/modules/taxonomy/src/Tests/ThemeTest.php
@@ -20,7 +20,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
     // Make sure we are using distinct default and administrative themes for
@@ -40,7 +40,7 @@ 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 a09cbc2..28ac645 100644
--- a/core/modules/taxonomy/src/Tests/TokenReplaceTest.php
+++ b/core/modules/taxonomy/src/Tests/TokenReplaceTest.php
@@ -25,7 +25,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
     $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'bypass node access'));
     $this->drupalLogin($this->admin_user);
@@ -66,7 +66,7 @@ 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();
 
@@ -158,4 +158,3 @@ function testTaxonomyTokenReplacement() {
     }
   }
 }
-
diff --git a/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php b/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php
index 2d891b7..e696e1a 100644
--- a/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php
+++ b/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php
@@ -29,7 +29,7 @@ public static function getInfo() {
     );
   }
 
-  function testViewsHandlerRelationshipNodeTermData() {
+  public function testViewsHandlerRelationshipNodeTermData() {
     $view = Views::getView('test_taxonomy_node_term_data');
     $this->executeView($view, array($this->term1->id(), $this->term2->id()));
     $resultset = array(
diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php
index d2b2fb3..def024e 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php
@@ -42,7 +42,7 @@ public static function getInfo() {
   /**
    * {@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/TaxonomyParentUITest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyParentUITest.php
index 3a0fe14..c3bf873 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyParentUITest.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyParentUITest.php
@@ -45,7 +45,7 @@ public static function getInfo() {
   /**
    * {@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 2cc992e..6deadf0 100644
--- a/core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php
+++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyTestBase.php
@@ -45,7 +45,7 @@
    */
   protected $term2;
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
     $this->mockStandardInstall();
 
@@ -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 5867695..9c2db73 100644
--- a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
+++ b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
@@ -29,7 +29,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
     $admin_user = $this->drupalCreateUser(array('create article content', 'administer taxonomy'));
@@ -40,7 +40,7 @@ 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();
@@ -74,7 +74,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.');
@@ -98,7 +98,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) {
@@ -123,9 +123,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.
@@ -145,7 +153,7 @@ function testTaxonomyVocabularyLoadMultiple() {
   /**
    * Tests that machine name changes are properly reflected.
    */
-  function testTaxonomyVocabularyChangeMachineName() {
+  public function testTaxonomyVocabularyChangeMachineName() {
     // Add a field instance to the vocabulary.
     entity_create('field_config', array(
       'name' => 'field_test',
@@ -176,7 +184,7 @@ function testTaxonomyVocabularyChangeMachineName() {
   /**
    * Test uninstall and reinstall of the taxonomy module.
    */
-  function testUninstallReinstall() {
+  public function testUninstallReinstall() {
     // Fields and field instances attached to taxonomy term bundles should be
     // removed when the module is uninstalled.
     $this->field_name = drupal_strtolower($this->randomName() . '_field_name');
@@ -184,7 +192,7 @@ function testUninstallReinstall() {
       'name' => $this->field_name,
       'entity_type' => 'taxonomy_term',
       'type' => 'text',
-      'cardinality' => 4
+      'cardinality' => 4,
     );
     entity_create('field_config', $this->field_definition)->save();
     $this->instance_definition = array(
diff --git a/core/modules/taxonomy/src/Tests/VocabularyLanguageTest.php b/core/modules/taxonomy/src/Tests/VocabularyLanguageTest.php
index 5503589..9549a1e 100644
--- a/core/modules/taxonomy/src/Tests/VocabularyLanguageTest.php
+++ b/core/modules/taxonomy/src/Tests/VocabularyLanguageTest.php
@@ -24,7 +24,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
     // Create an administrative user.
@@ -48,7 +48,7 @@ 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.
@@ -79,7 +79,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 6ed3e09..43c0bc3 100644
--- a/core/modules/taxonomy/src/Tests/VocabularyPermissionsTest.php
+++ b/core/modules/taxonomy/src/Tests/VocabularyPermissionsTest.php
@@ -23,7 +23,7 @@ public static function getInfo() {
   /**
    * 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 112a597..4d3f49d 100644
--- a/core/modules/taxonomy/src/Tests/VocabularyUiTest.php
+++ b/core/modules/taxonomy/src/Tests/VocabularyUiTest.php
@@ -20,7 +20,7 @@ public static function getInfo() {
     );
   }
 
-  function setUp() {
+  public function setUp() {
     parent::setUp();
     $this->admin_user = $this->drupalCreateUser(array('administer taxonomy'));
     $this->drupalLogin($this->admin_user);
@@ -30,7 +30,7 @@ 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');
 
@@ -79,7 +79,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();
@@ -108,7 +108,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) {
@@ -124,7 +124,7 @@ function testTaxonomyAdminNoVocabularies() {
   /**
    * Deleting a vocabulary.
    */
-  function testTaxonomyAdminDeletingVocabulary() {
+  public function testTaxonomyAdminDeletingVocabulary() {
     // Create a vocabulary.
     $vid = drupal_strtolower($this->randomName());
     $edit = array(
diff --git a/core/modules/taxonomy/taxonomy.api.php b/core/modules/taxonomy/taxonomy.api.php
index 9fa84c1..ff46360 100644
--- a/core/modules/taxonomy/taxonomy.api.php
+++ b/core/modules/taxonomy/taxonomy.api.php
@@ -1,12 +1,12 @@
 <?php
 
-use Drupal\Core\Entity\EntityInterface;
-
 /**
  * @file
  * Hooks provided by the Taxonomy module.
  */
 
+use Drupal\Core\Entity\EntityInterface;
+
 /**
  * @addtogroup hooks
  * @{
@@ -253,9 +253,9 @@ function hook_taxonomy_term_delete(Drupal\taxonomy\Term $term) {
  * @param \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display
  *   The entity view display holding the display options configured for the term
  *   components.
- * @param $view_mode
+ * @param string $view_mode
  *   The $view_mode parameter from taxonomy_term_view().
- * @param $langcode
+ * @param string $langcode
  *   The language code used for rendering.
  *
  * @see hook_entity_view()
@@ -285,7 +285,7 @@ function hook_taxonomy_term_view(array &$build, \Drupal\taxonomy\Entity\Term $te
  * hook_preprocess_HOOK() for taxonomy-term.html.twig. See drupal_render() and
  * _theme() documentation respectively for details.
  *
- * @param array &$build
+ * @param array $build
  *   A renderable array representing the taxonomy term content.
  * @param \Drupal\taxonomy\Entity\Term $term
  *   The taxonomy term being rendered.
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index fde291e..8f686fe 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -53,7 +53,11 @@ function taxonomy_help($route_name, Request $request) {
       $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' => url('admin/structure/taxonomy'), '@perm' => url('admin/people/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' => url('admin/structure/taxonomy'),
+        '@perm' => url('admin/people/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>';
@@ -83,8 +87,10 @@ function taxonomy_help($route_name, Request $request) {
       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>';
       }
@@ -107,8 +113,8 @@ function taxonomy_permission() {
       ),
     );
     $permissions += array(
-       'delete terms in ' . $vocabulary->id() => array(
-         'title' => t('Delete terms from %vocabulary', array('%vocabulary' => $vocabulary->name)),
+      'delete terms in ' . $vocabulary->id() => array(
+        'title' => t('Delete terms from %vocabulary', array('%vocabulary' => $vocabulary->name)),
       ),
     );
   }
@@ -131,17 +137,17 @@ function taxonomy_term_uri($term) {
  * 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')) {
@@ -204,10 +210,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) {
@@ -258,7 +264,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
@@ -278,7 +285,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();
@@ -304,7 +311,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();
@@ -350,7 +357,7 @@ function taxonomy_terms_static_reset() {
 /**
  * Clear all static cache variables for vocabularies.
  *
- * @param $ids
+ * @param array $ids
  *   An array of ids to reset in entity controller cache.
  */
 function taxonomy_vocabulary_static_reset(array $ids = NULL) {
@@ -381,10 +388,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.
  */
@@ -427,10 +434,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.
  */
@@ -448,20 +455,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_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
@@ -560,19 +568,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 {
@@ -623,7 +631,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);
@@ -652,7 +660,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
@@ -709,7 +717,7 @@ function taxonomy_field_widget_info_alter(&$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.pages.inc b/core/modules/taxonomy/taxonomy.pages.inc
index 294dabb..052b460 100644
--- a/core/modules/taxonomy/taxonomy.pages.inc
+++ b/core/modules/taxonomy/taxonomy.pages.inc
@@ -72,8 +72,8 @@ function taxonomy_term_page(Term $term) {
 function taxonomy_term_feed(Term $term) {
   $channel['link'] = url('taxonomy/term/' . $term->id(), array('absolute' => TRUE));
   $channel['title'] = \Drupal::config('system.site')->get('name') . ' - ' . $term->getName();
-  // Only display the description if we have a single term, to avoid clutter and confusion.
-  // HTML will be removed from feed description.
+  // Only display the description if we have a single term, to avoid clutter and
+  // confusion. HTML will be removed from feed description.
   $channel['description'] = $term->description->processed;
   $nids = taxonomy_select_nodes($term->id(), FALSE, \Drupal::config('system.rss')->get('items.limit'));
 
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 2dfa5b2..9ef29a6 100644
--- a/core/modules/taxonomy/taxonomy.views.inc
+++ b/core/modules/taxonomy/taxonomy.views.inc
@@ -14,7 +14,7 @@
 function taxonomy_views_data() {
   $data = array();
 
- // taxonomy_term_data table
+  // taxonomy_term_data table.
 
   $data['taxonomy_term_data']['table']['group']  = t('Taxonomy term');
   $data['taxonomy_term_data']['table']['base'] = array(
@@ -26,17 +26,16 @@ function taxonomy_views_data() {
   $data['taxonomy_term_data']['table']['entity type'] = 'taxonomy_term';
   $data['taxonomy_term_data']['table']['wizard_id'] = 'taxonomy_term';
 
-
-  // The term data table
+  // The term data table.
   $data['taxonomy_term_data']['table']['join'] = array(
-    // This is provided for many_to_one argument
+    // This is provided for many_to_one argument.
     'taxonomy_index' => array(
       'field' => 'tid',
       'left_field' => 'tid',
     ),
   );
 
-  // tid field
+  // Tid field.
   $data['taxonomy_term_data']['tid'] = array(
     'title' => t('Term ID'),
     'help' => t('The tid of a taxonomy term.'),
@@ -60,7 +59,7 @@ function taxonomy_views_data() {
     ),
   );
 
-  // raw tid field
+  // Raw tid field.
   $data['taxonomy_term_data']['tid_raw'] = array(
     'title' => t('Term ID'),
     'help' => t('The tid of a taxonomy term.'),
@@ -80,14 +79,14 @@ function taxonomy_views_data() {
       'relationship field' => 'tid',
       'outer field' => 'taxonomy_term_data.tid',
       'argument table' => 'taxonomy_term_data',
-      'argument field' =>  'tid',
+      'argument field' => 'tid',
       'base'   => 'node',
       'field'  => 'nid',
-      'relationship' => 'node:term_node_tid'
+      'relationship' => 'node:term_node_tid',
     ),
   );
 
-  // Term name field
+  // Term name field.
   $data['taxonomy_term_data']['name'] = array(
     'title' => t('Name'),
     'help' => t('The taxonomy term name.'),
@@ -109,7 +108,7 @@ function taxonomy_views_data() {
     ),
   );
 
-  // taxonomy weight
+  // Taxonomy weight.
   $data['taxonomy_term_data']['weight'] = array(
     'title' => t('Weight'),
     'help' => t('The term weight field'),
@@ -127,7 +126,7 @@ function taxonomy_views_data() {
     ),
   );
 
-  // Term description
+  // Term description.
   $data['taxonomy_term_data']['description__value'] = array(
     'title' => t('Term description'),
     'help' => t('The description associated with a taxonomy term.'),
@@ -141,7 +140,7 @@ function taxonomy_views_data() {
     ),
   );
 
-  // Term vocabulary
+  // Term vocabulary.
   $data['taxonomy_term_data']['vid'] = array(
     'title' => t('Vocabulary'),
     'help' => t('Filter the results of "Taxonomy: Term" to a particular vocabulary.'),
@@ -151,7 +150,8 @@ function taxonomy_views_data() {
   );
 
   $data['taxonomy_term_data']['langcode'] = array(
-    'title' => t('Language'), // The item it appears as on the UI,
+    // The item it appears as on the UI.
+    'title' => t('Language'),
     'help' => t('Language of the term'),
     'field' => array(
       'id' => 'taxonomy_term_language',
@@ -167,7 +167,7 @@ function taxonomy_views_data() {
     ),
   );
 
-  // Link to edit the term
+  // Link to edit the term.
   $data['taxonomy_term_data']['edit_term'] = array(
     'field' => array(
       'title' => t('Term edit link'),
@@ -184,7 +184,7 @@ function taxonomy_views_data() {
       'id' => 'date',
     ),
     'sort' => array(
-      'id' => 'date'
+      'id' => 'date',
     ),
     'filter' => array(
       'id' => 'date',
@@ -256,18 +256,18 @@ function taxonomy_views_data() {
     );
   }
 
-  // taxonomy_index table
+  // taxonomy_index table.
 
   $data['taxonomy_index']['table']['group']  = t('Taxonomy term');
 
   $data['taxonomy_index']['table']['join'] = array(
     'taxonomy_term_data' => array(
-      // links directly to taxonomy_term_data via tid
+      // Links directly to taxonomy_term_data via tid.
       'left_field' => 'tid',
       'field' => 'tid',
     ),
     'node' => array(
-      // links directly to node via nid
+      // Links directly to node via nid.
       'left_field' => 'nid',
       'field' => 'nid',
     ),
@@ -314,18 +314,18 @@ function taxonomy_views_data() {
     ),
   );
 
-  // term_hierarchy table
+  // term_hierarchy table.
 
   $data['taxonomy_term_hierarchy']['table']['group']  = t('Taxonomy term');
 
   $data['taxonomy_term_hierarchy']['table']['join'] = array(
     'taxonomy_term_hierarchy' => array(
-      // links to self through left.parent = right.tid (going down in depth)
+      // Links to self through left.parent = right.tid (going down in depth).
       'left_field' => 'tid',
       'field' => 'parent',
     ),
     'taxonomy_term_data' => array(
-      // links directly to taxonomy_term_data via tid
+      // Links directly to taxonomy_term_data via tid.
       'left_field' => 'tid',
       'field' => 'tid',
     ),
@@ -400,8 +400,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/Menu/TaxonomyLocalTasksTest.php b/core/modules/taxonomy/tests/src/Menu/TaxonomyLocalTasksTest.php
index d51ff7a..dbd64d0 100644
--- a/core/modules/taxonomy/tests/src/Menu/TaxonomyLocalTasksTest.php
+++ b/core/modules/taxonomy/tests/src/Menu/TaxonomyLocalTasksTest.php
@@ -39,7 +39,9 @@ public function testTaxonomyPageLocalTasks($route, $subtask = array()) {
     $tasks = array(
       0 => array('taxonomy.term_page', 'taxonomy.term_edit'),
     );
-    if ($subtask) $tasks[] = $subtask;
+    if ($subtask) {
+      $tasks[] = $subtask;
+    }
     $this->assertLocalTasks($route, $tasks);
   }
 
