2323 *
2424 * Creates the opening portion of the form.
2525 *
26- * @param string $action the URI segments of the form destination
27- * @param array| string $attributes a key/value pair of attributes, or string representation
28- * @param array $hidden a key/value pair hidden data
26+ * @param string $action The URI segments of the form destination
27+ * @param array<string, scalar|null>| string $attributes A key/value pair of attributes, or string representation
28+ * @param array<string, mixed> $hidden A key/value pair hidden data
2929 */
3030 function form_open (string $ action = '' , $ attributes = [], array $ hidden = []): string
3131 {
@@ -80,9 +80,9 @@ function form_open(string $action = '', $attributes = [], array $hidden = []): s
8080 *
8181 * Creates the opening portion of the form, but with "multipart/form-data".
8282 *
83- * @param string $action The URI segments of the form destination
84- * @param array|string $attributes A key/value pair of attributes, or the same as a string
85- * @param array $hidden A key/value pair hidden data
83+ * @param string $action The URI segments of the form destination
84+ * @param array<string, scalar|null> |string $attributes A key/value pair of attributes, or the same as a string
85+ * @param array<string, mixed> $hidden A key/value pair hidden data
8686 */
8787 function form_open_multipart (string $ action = '' , $ attributes = [], array $ hidden = []): string
8888 {
@@ -103,8 +103,8 @@ function form_open_multipart(string $action = '', $attributes = [], array $hidde
103103 * Generates hidden fields. You can pass a simple key/value string or
104104 * an associative array with multiple values.
105105 *
106- * @param array|string $name Field name or associative array to create multiple fields
107- * @param array|string $value Field value
106+ * @param array<string, mixed> |string $name Field name or associative array to create multiple fields
107+ * @param array<array-key, mixed> |string|null $value Field value
108108 */
109109 function form_hidden ($ name , $ value = '' , bool $ recursing = false ): string
110110 {
@@ -140,8 +140,8 @@ function form_hidden($name, $value = '', bool $recursing = false): string
140140 * Text Input Field. If 'type' is passed in the $type field, it will be
141141 * used as the input type, for making 'email', 'phone', etc input fields.
142142 *
143- * @param array|string $data
144- * @param array| object|string $extra string , array, object that can be cast to array
143+ * @param array<string, scalar|null> |string $data
144+ * @param array<string, scalar|null>| object|string $extra String , array, object that can be cast to array
145145 */
146146 function form_input ($ data = '' , string $ value = '' , $ extra = '' , string $ type = 'text ' ): string
147147 {
@@ -161,8 +161,8 @@ function form_input($data = '', string $value = '', $extra = '', string $type =
161161 *
162162 * Identical to the input function but adds the "password" type
163163 *
164- * @param array|string $data
165- * @param array| object|string $extra string , array, object that can be cast to array
164+ * @param array<string, scalar|null> |string $data
165+ * @param array<string, scalar|null>| object|string $extra String , array, object that can be cast to array
166166 */
167167 function form_password ($ data = '' , string $ value = '' , $ extra = '' ): string
168168 {
@@ -181,8 +181,8 @@ function form_password($data = '', string $value = '', $extra = ''): string
181181 *
182182 * Identical to the input function but adds the "file" type
183183 *
184- * @param array|string $data
185- * @param array| object|string $extra string , array, object that can be cast to array
184+ * @param array<string, scalar|null> |string $data
185+ * @param array<string, scalar|null>| object|string $extra String , array, object that can be cast to array
186186 */
187187 function form_upload ($ data = '' , string $ value = '' , $ extra = '' ): string
188188 {
@@ -205,8 +205,8 @@ function form_upload($data = '', string $value = '', $extra = ''): string
205205 /**
206206 * Textarea field
207207 *
208- * @param array|string $data
209- * @param array| object|string $extra string , array, object that can be cast to array
208+ * @param array<string, scalar|null> |string $data
209+ * @param array<string, scalar|null>| object|string $extra String , array, object that can be cast to array
210210 */
211211 function form_textarea ($ data = '' , string $ value = '' , $ extra = '' ): string
212212 {
@@ -241,8 +241,10 @@ function form_textarea($data = '', string $value = '', $extra = ''): string
241241 /**
242242 * Multi-select menu
243243 *
244- * @param array|string $name
245- * @param array|object|string $extra string, array, object that can be cast to array
244+ * @param array<string, mixed>|string $name
245+ * @param array<array-key, array<array-key, string>|string> $options
246+ * @param array<array-key, int|string> $selected
247+ * @param array<string, scalar|null>|object|string $extra String, array, object that can be cast to array
246248 */
247249 function form_multiselect ($ name = '' , array $ options = [], array $ selected = [], $ extra = '' ): string
248250 {
@@ -260,10 +262,10 @@ function form_multiselect($name = '', array $options = [], array $selected = [],
260262 /**
261263 * Drop-down Menu
262264 *
263- * @param array|string $data
264- * @param array|string $options
265- * @param array|string $selected
266- * @param array| object|string $extra string , array, object that can be cast to array
265+ * @param array<string, mixed> |string $data
266+ * @param array<array-key, array<array-key, string>|string>|string $options
267+ * @param array<array-key, int |string>|string $selected
268+ * @param array<string, scalar|null>| object|string $extra String , array, object that can be cast to array
267269 */
268270 function form_dropdown ($ data = '' , $ options = [], $ selected = [], $ extra = '' ): string
269271 {
@@ -348,8 +350,8 @@ function form_dropdown($data = '', $options = [], $selected = [], $extra = ''):
348350 /**
349351 * Checkbox Field
350352 *
351- * @param array|string $data
352- * @param array| object|string $extra string , array, object that can be cast to array
353+ * @param array<string, scalar|null> |string $data
354+ * @param array<string, scalar|null>| object|string $extra String , array, object that can be cast to array
353355 */
354356 function form_checkbox ($ data = '' , string $ value = '' , bool $ checked = false , $ extra = '' ): string
355357 {
@@ -381,8 +383,8 @@ function form_checkbox($data = '', string $value = '', bool $checked = false, $e
381383 /**
382384 * Radio Button
383385 *
384- * @param array|string $data
385- * @param array| object|string $extra string , array, object that can be cast to array
386+ * @param array<string, scalar|null> |string $data
387+ * @param array<string, scalar|null>| object|string $extra String , array, object that can be cast to array
386388 */
387389 function form_radio ($ data = '' , string $ value = '' , bool $ checked = false , $ extra = '' ): string
388390 {
@@ -399,8 +401,8 @@ function form_radio($data = '', string $value = '', bool $checked = false, $extr
399401 /**
400402 * Submit Button
401403 *
402- * @param array|string $data
403- * @param array| object|string $extra string , array, object that can be cast to array
404+ * @param array<string, scalar|null> |string $data
405+ * @param array<string, scalar|null>| object|string $extra String , array, object that can be cast to array
404406 */
405407 function form_submit ($ data = '' , string $ value = '' , $ extra = '' ): string
406408 {
@@ -412,8 +414,8 @@ function form_submit($data = '', string $value = '', $extra = ''): string
412414 /**
413415 * Reset Button
414416 *
415- * @param array|string $data
416- * @param array| object|string $extra string , array, object that can be cast to array
417+ * @param array<string, scalar|null> |string $data
418+ * @param array<string, scalar|null>| object|string $extra String , array, object that can be cast to array
417419 */
418420 function form_reset ($ data = '' , string $ value = '' , $ extra = '' ): string
419421 {
@@ -425,8 +427,8 @@ function form_reset($data = '', string $value = '', $extra = ''): string
425427 /**
426428 * Form Button
427429 *
428- * @param array|string $data
429- * @param array| object|string $extra string , array, object that can be cast to array
430+ * @param array<string, scalar|null> |string $data
431+ * @param array<string, scalar|null>| object|string $extra String , array, object that can be cast to array
430432 */
431433 function form_button ($ data = '' , string $ content = '' , $ extra = '' ): string
432434 {
@@ -450,9 +452,9 @@ function form_button($data = '', string $content = '', $extra = ''): string
450452 /**
451453 * Form Label Tag
452454 *
453- * @param string $labelText The text to appear onscreen
454- * @param string $id The id the label applies to
455- * @param array $attributes Additional attributes
455+ * @param string $labelText The text to appear onscreen
456+ * @param string $id The id the label applies to
457+ * @param array<string, scalar|null> $attributes Additional attributes
456458 */
457459 function form_label (string $ labelText = '' , string $ id = '' , array $ attributes = []): string
458460 {
@@ -477,6 +479,8 @@ function form_label(string $labelText = '', string $id = '', array $attributes =
477479 * The <datalist> element specifies a list of pre-defined options for an <input> element.
478480 * Users will see a drop-down list of pre-defined options as they input data.
479481 * The list attribute of the <input> element, must refer to the id attribute of the <datalist> element.
482+ *
483+ * @param list<string> $options
480484 */
481485 function form_datalist (string $ name , string $ value , array $ options ): string
482486 {
@@ -506,8 +510,8 @@ function form_datalist(string $name, string $value, array $options): string
506510 * Used to produce <fieldset><legend>text</legend>. To close fieldset
507511 * use form_fieldset_close()
508512 *
509- * @param string $legendText The legend text
510- * @param array $attributes Additional attributes
513+ * @param string $legendText The legend text
514+ * @param array<string, scalar|null> $attributes Additional attributes
511515 */
512516 function form_fieldset (string $ legendText = '' , array $ attributes = []): string
513517 {
@@ -770,8 +774,8 @@ function validation_show_error(string $field, string $template = 'single'): stri
770774 *
771775 * @internal
772776 *
773- * @param array|string $attributes List of attributes
774- * @param array $default Default values
777+ * @param array<string, scalar|null> |string $attributes List of attributes
778+ * @param array<string, scalar|null> $default Default values
775779 */
776780 function parse_form_attributes ($ attributes , array $ default ): string
777781 {
0 commit comments