diff --git a/src/Form/AddTermsToVocabularyForm.php b/src/Form/AddTermsToVocabularyForm.php index 1583d7e40a50fa91e80b2f2c9dcd4f5d85394f4a..c3a842d5ac7179249f66091050e02f94f27e9240 100644 --- a/src/Form/AddTermsToVocabularyForm.php +++ b/src/Form/AddTermsToVocabularyForm.php @@ -49,7 +49,7 @@ class AddTermsToVocabularyForm extends FormBase { /** * {@inheritdoc} */ - public function buildForm(array $form, FormStateInterface $form_state, VocabularyInterface $taxonomy_vocabulary = NULL, $parents = []) { + public function buildForm(array $form, FormStateInterface $form_state, ?VocabularyInterface $taxonomy_vocabulary = NULL, $parents = []) { // Cache form state so that we keep the parents in the modal dialog. // For non modals (non POST request), form state caching on is not allowed. // @see FormState::setCached() diff --git a/src/Form/DeleteTermsForm.php b/src/Form/DeleteTermsForm.php index 085c1d774858034bd61b13a905b9810cfc8f7c2f..a4544e883ecbd5d291169aaa5e820546955948dd 100644 --- a/src/Form/DeleteTermsForm.php +++ b/src/Form/DeleteTermsForm.php @@ -54,7 +54,7 @@ class DeleteTermsForm extends FormBase { /** * {@inheritdoc} */ - public function buildForm(array $form, FormStateInterface $form_state, VocabularyInterface $taxonomy_vocabulary = NULL, $selected_terms = []) { + public function buildForm(array $form, FormStateInterface $form_state, ?VocabularyInterface $taxonomy_vocabulary = NULL, $selected_terms = []) { if (empty($selected_terms)) { $form['info'] = [ '#markup' => $this->t('Please select the terms you want to delete.'), diff --git a/src/Form/ExportTermsMiniForm.php b/src/Form/ExportTermsMiniForm.php index 03b6720b4483d7fb3f2ab80342255bcedf884618..0f16250dfd93dcdbde85c776c7bb46724a7b7241 100644 --- a/src/Form/ExportTermsMiniForm.php +++ b/src/Form/ExportTermsMiniForm.php @@ -42,7 +42,7 @@ class ExportTermsMiniForm extends FormBase { /** * {@inheritdoc} */ - public function buildForm(array $form, FormStateInterface $form_state, VocabularyInterface $taxonomy_vocabulary = NULL, $selected_terms = []) { + public function buildForm(array $form, FormStateInterface $form_state, ?VocabularyInterface $taxonomy_vocabulary = NULL, $selected_terms = []) { $form['voc'] = [ '#type' => 'value', diff --git a/src/Form/MoveTermsForm.php b/src/Form/MoveTermsForm.php index 57bcdc041ec085d90064bb406f9a2a6e2b47d544..a5aaa770fa8fc39d024c201634f3387fdb56c56f 100644 --- a/src/Form/MoveTermsForm.php +++ b/src/Form/MoveTermsForm.php @@ -44,7 +44,7 @@ class MoveTermsForm extends FormBase { * * @todo Add autocomplete to select/add parent term. */ - public function buildForm(array $form, FormStateInterface $form_state, VocabularyInterface $taxonomy_vocabulary = NULL, $selected_terms = []) { + public function buildForm(array $form, FormStateInterface $form_state, ?VocabularyInterface $taxonomy_vocabulary = NULL, $selected_terms = []) { if (empty($selected_terms)) { $form['info'] = [ '#markup' => $this->t('Please select the terms you want to move.'), diff --git a/src/Form/TaxonomyManagerAdmin.php b/src/Form/TaxonomyManagerAdmin.php index 0d1d413d48775a53a14328e406451de1495a6a07..798a151fd33179d784cc428b5443355c89af1bde 100644 --- a/src/Form/TaxonomyManagerAdmin.php +++ b/src/Form/TaxonomyManagerAdmin.php @@ -2,10 +2,10 @@ namespace Drupal\taxonomy_manager\Form; -use Drupal\content_translation\ContentTranslationManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\FormStateInterface; +use Drupal\content_translation\ContentTranslationManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/src/Form/TaxonomyManagerForm.php b/src/Form/TaxonomyManagerForm.php index af15db64d52e07868fdcffc34a0fd05cd8758b32..344752f51777a9e71868c33e89d603f77b40e7c9 100644 --- a/src/Form/TaxonomyManagerForm.php +++ b/src/Form/TaxonomyManagerForm.php @@ -144,7 +144,7 @@ class TaxonomyManagerForm extends FormBase { * @return array * The form structure. */ - public function buildForm(array $form, FormStateInterface $form_state, VocabularyInterface $taxonomy_vocabulary = NULL) { + public function buildForm(array $form, FormStateInterface $form_state, ?VocabularyInterface $taxonomy_vocabulary = NULL) { $current_user = $this->currentUser(); $voc_list = []; $form['voc'] = [