diff --git a/core/modules/forum/src/Form/Overview.php b/core/modules/forum/src/Form/Overview.php index 0262eee489..801888aabf 100644 --- a/core/modules/forum/src/Form/Overview.php +++ b/core/modules/forum/src/Form/Overview.php @@ -78,7 +78,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { 'edit' => [ 'title' => $title, 'url' => $url, - ] + ], ], ]; diff --git a/core/modules/taxonomy/src/Form/OverviewTerms.php b/core/modules/taxonomy/src/Form/OverviewTerms.php index f22cfd5f45..d73598d672 100644 --- a/core/modules/taxonomy/src/Form/OverviewTerms.php +++ b/core/modules/taxonomy/src/Form/OverviewTerms.php @@ -231,7 +231,7 @@ public function buildForm(array $form, FormStateInterface $form_state, Vocabular $access_control_handler = $this->entityManager->getAccessControlHandler('taxonomy_term'); $create_access = $access_control_handler->createAccess($taxonomy_vocabulary->id(), NULL, [], TRUE); if ($create_access->isAllowed()) { - $empty = $this->t('No terms available. Add term.', ['@link' => Url::fromRoute('entity.taxonomy_term.add_form', ['taxonomy_vocabulary' => $taxonomy_vocabulary->id()])->toString()]); + $empty = $this->t('No terms available. Add term.', [':link' => Url::fromRoute('entity.taxonomy_term.add_form', ['taxonomy_vocabulary' => $taxonomy_vocabulary->id()])->toString()]); } else { $empty = $this->t('No terms available.'); @@ -377,7 +377,7 @@ public function buildForm(array $form, FormStateInterface $form_state, Vocabular $form['terms']['#header'][] = $this->t('Operations'); - if (($taxonomy_vocabulary->getHierarchy() != VocabularyInterface::HIERARCHY_MULTIPLE && count($tree) > 1) && $change_weight_access->isAllowed()) { + if (($taxonomy_vocabulary->getHierarchy() !== VocabularyInterface::HIERARCHY_MULTIPLE && count($tree) > 1) && $change_weight_access->isAllowed()) { $form['actions'] = ['#type' => 'actions', '#tree' => FALSE]; $form['actions']['submit'] = [ '#type' => 'submit', diff --git a/core/modules/taxonomy/src/TaxonomyPermissions.php b/core/modules/taxonomy/src/TaxonomyPermissions.php index c3c43bc504..1772a34f97 100644 --- a/core/modules/taxonomy/src/TaxonomyPermissions.php +++ b/core/modules/taxonomy/src/TaxonomyPermissions.php @@ -58,13 +58,13 @@ public function permissions() { /** * Builds a standard list of taxonomy term permissions for a given vocabulary. * - * @param \Drupal\taxonomy\Entity\Vocabulary $vocabulary + * @param \Drupal\taxonomy\VocabularyInterface $vocabulary * The vocabulary. * * @return array * An array of permission names and descriptions. */ - protected function buildPermissions(Vocabulary $vocabulary) { + protected function buildPermissions(VocabularyInterface $vocabulary) { $id = $vocabulary->id(); $args = ['%vocabulary' => $vocabulary->label()]; diff --git a/core/modules/taxonomy/src/VocabularyListBuilder.php b/core/modules/taxonomy/src/VocabularyListBuilder.php index caf8442cd0..e7c021b4d7 100644 --- a/core/modules/taxonomy/src/VocabularyListBuilder.php +++ b/core/modules/taxonomy/src/VocabularyListBuilder.php @@ -160,8 +160,8 @@ public function render() { $create_access = $access_control_handler->createAccess(NULL, NULL, [], TRUE); $this->renderer->addCacheableDependency($build['table'], $create_access); if ($create_access->isAllowed()) { - $build['table']['#empty'] = t('No vocabularies available. Add vocabulary.', [ - '@link' => Url::fromRoute('entity.taxonomy_vocabulary.add_form')->toString() + $build['table']['#empty'] = t('No vocabularies available. Add vocabulary.', [ + ':link' => Url::fromRoute('entity.taxonomy_vocabulary.add_form')->toString() ]); } else { diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php index f2245816cd..989398e62f 100644 --- a/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php +++ b/core/modules/taxonomy/tests/src/Functional/VocabularyPermissionsTest.php @@ -57,7 +57,7 @@ public function testVocabularyPermissionsVocabulary() { /** * Test the vocabulary overview permission. */ - function testTaxonomyVocabularyOverviewPermissions() { + public function testTaxonomyVocabularyOverviewPermissions() { // Create two vocabularies, one with two terms, the other without any term. /** @var \Drupal\taxonomy\Entity\Vocabulary $vocabulary1 , $vocabulary2 */ $vocabulary1 = $this->createVocabulary();