From c3b6db065945bb0bc14279b7940c17d255be0a1a Mon Sep 17 00:00:00 2001 From: Joshua Fernandes <“joshua.1234511@yahoo.in”> Date: Thu, 3 Oct 2024 16:43:49 +0530 Subject: [PATCH] Code updates. --- .../custom/civictheme_dev/src/Form/StyleguideForm.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/modules/custom/civictheme_dev/src/Form/StyleguideForm.php b/web/modules/custom/civictheme_dev/src/Form/StyleguideForm.php index 3d48c6ae1..79933e353 100644 --- a/web/modules/custom/civictheme_dev/src/Form/StyleguideForm.php +++ b/web/modules/custom/civictheme_dev/src/Form/StyleguideForm.php @@ -87,6 +87,8 @@ public function buildForm(array $form, FormStateInterface $form_state): array { * * @return array * Form element. + * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function createFormElement(string $id, FormElement $element): array { $form_element = [ @@ -153,6 +155,8 @@ public function submitForm(array &$form, FormStateInterface $form_state) { * * @return array * Form element. + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function createEntityAutoCompleteFormElement(array $form_element, FormElement $element): array { $form_element['#type'] = 'entity_autocomplete'; @@ -174,6 +178,8 @@ protected function createEntityAutoCompleteFormElement(array $form_element, Form * * @return array * Form element. + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function createOptionsFormElement(array $form_element, FormElement $element): array { $form_element['#options'] = [ @@ -195,6 +201,8 @@ protected function createOptionsFormElement(array $form_element, FormElement $el * * @return array * Form element. + * + * @SuppressWarnings(PHPMD.ElseExpression) */ protected function createTableFormElement(array $form_element, FormElement $element): array { $form_element['#header'] = ['Header 1', 'Header 2', 'Header 3']; @@ -251,6 +259,7 @@ protected function createImageButton(array $form_element, FormElement $element): * Form element. * * @phpstan-ignore-next-line + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function createButton(array $form_element, FormElement $element): array { $form_element['#value'] = $form_element['#title'];