@@ -32,26 +32,34 @@ public function __construct(EntityFieldManagerInterface $entityFieldManager) {
3232
3333 /**
3434 * Implements hook_webform_element_default_properties_alter().
35+ *
36+ * @phpstan-param array<string, mixed> $properties
37+ * @phpstan-param array<string, mixed> $definition
3538 */
36- public function alterDefaultProperties (array &$ properties , array &$ definition ) {
39+ public function alterDefaultProperties (array &$ properties , array &$ definition ): void {
3740 if ('os2forms_user_field_lookup ' === ($ definition ['provider ' ] ?? NULL )) {
3841 $ properties ['os2forms_user_field_lookup_field_name ' ] = '' ;
3942 }
4043 }
4144
4245 /**
4346 * Implements hook_webform_element_translatable_properties_alter().
47+ *
48+ * @phpstan-param array<string, mixed> $properties
49+ * @phpstan-param array<string, mixed> $definition
4450 */
45- public function alterTranslatableProperties (array &$ properties , array &$ definition ) {
51+ public function alterTranslatableProperties (array &$ properties , array &$ definition ): void {
4652 // Make the custom data property translatable.
4753 $ properties [] = 'os2forms_user_field_lookup_field_name ' ;
4854 }
4955
5056 /**
5157 * Implements hook_webform_element_configuration_form_alter().
58+ *
59+ * @phpstan-param array<string, mixed> $form
5260 */
53- public function alterConfigurationForm (&$ form , FormStateInterface $ form_state ) {
54- /** @var Drupal\webform_ui\Form\WebformUiElementEditForm $formObject */
61+ public function alterConfigurationForm (&$ form , FormStateInterface $ form_state ): void {
62+ /** @var \ Drupal\webform_ui\Form\WebformUiElementEditForm $formObject */
5563 $ formObject = $ form_state ->getFormObject ();
5664 $ elementPlugin = $ formObject ->getWebformElementPlugin ();
5765 $ pluginDefinition = $ elementPlugin ->getPluginDefinition ();
@@ -77,8 +85,10 @@ public function alterConfigurationForm(&$form, FormStateInterface $form_state) {
7785
7886 /**
7987 * Get filter for user field definitions.
88+ *
89+ * @phpstan-param array<string, mixed> $pluginDefinition
8090 */
81- private function getUserFieldDefinitionFilter (array $ pluginDefinition ) {
91+ private function getUserFieldDefinitionFilter (array $ pluginDefinition ): mixed {
8292 switch ($ pluginDefinition ['class ' ]) {
8393 case UserFieldElementCheckbox::class:
8494 // Get all custom boolean fields.
0 commit comments