Skip to content

Commit 5f2a03a

Browse files
committed
fix: return type error
1 parent 016ff1f commit 5f2a03a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Element/UKAddressLookup.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ public static function getCompositeElements(array $element) {
8585
/**
8686
* {@inheritdoc}
8787
*/
88-
public static function validateWebformComposite(&$element, FormStateInterface $form_state, &$complete_form): void {
88+
// @phpstan-ignore-next-line Ignore the next line for return type until webform give one.
89+
public static function validateWebformComposite(&$element, FormStateInterface $form_state, &$complete_form) {
8990
// IMPORTANT: Must get values from the $form_states since sub-elements
9091
// may call $form_state->setValueForElement() via their validation hook.
9192
// @see \Drupal\webform\Element\WebformEmailConfirm::validateWebformEmailConfirm
@@ -145,7 +146,7 @@ public static function validateWebformComposite(&$element, FormStateInterface $f
145146
// (it's cleared if search string is empty).
146147
// @See DRUP-1185.
147148
$form_state->setValueForElement($element['address_lookup']['address_search']['address_searchstring'], NULL);
148-
parent::validateWebformComposite($element, $form_state, $complete_form);
149+
return parent::validateWebformComposite($element, $form_state, $complete_form);
149150
}
150151

151152
// Only validate composite elements that are visible.

0 commit comments

Comments
 (0)