Skip to content

Commit

Permalink
Code updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Fernandes committed Oct 3, 2024
1 parent 84a00e8 commit c3b6db0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions web/modules/custom/civictheme_dev/src/Form/StyleguideForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public function buildForm(array $form, FormStateInterface $form_state): array {
*
* @return array<int|string, mixed>
* Form element.
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
protected function createFormElement(string $id, FormElement $element): array {
$form_element = [
Expand Down Expand Up @@ -153,6 +155,8 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
*
* @return array<string, mixed>
* Form element.
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function createEntityAutoCompleteFormElement(array $form_element, FormElement $element): array {
$form_element['#type'] = 'entity_autocomplete';
Expand All @@ -174,6 +178,8 @@ protected function createEntityAutoCompleteFormElement(array $form_element, Form
*
* @return array<string, mixed>
* Form element.
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function createOptionsFormElement(array $form_element, FormElement $element): array {
$form_element['#options'] = [
Expand All @@ -195,6 +201,8 @@ protected function createOptionsFormElement(array $form_element, FormElement $el
*
* @return array<string, mixed>
* Form element.
*
* @SuppressWarnings(PHPMD.ElseExpression)
*/
protected function createTableFormElement(array $form_element, FormElement $element): array {
$form_element['#header'] = ['Header 1', 'Header 2', 'Header 3'];
Expand Down Expand Up @@ -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'];
Expand Down

0 comments on commit c3b6db0

Please sign in to comment.