Doc-comment: Use type aliases for arrays

Type aliases could be defined either globally (https://phpstan.org/writing-php-code/phpdoc-types#global-type-aliases) or just for a class.
I prefer having them at the place where they are created.
This commit is contained in:
Jakub Vrana
2025-03-26 02:23:29 +01:00
parent cd5ccddd22
commit 41aad5bc37
12 changed files with 89 additions and 82 deletions

View File

@@ -229,7 +229,7 @@ function hidden_fields_get() {
/** Print enum or set input field
* @param string "radio"|"checkbox"
* @param string
* @param array
* @param Field
* @param mixed string|array
* @param string
* @return null
@@ -247,7 +247,7 @@ function enum_input($type, $attrs, $field, $value, $empty = null) {
}
/** Print edit input field
* @param array one field from fields()
* @param Field one field from fields()
* @param mixed
* @param string
* @param bool
@@ -426,7 +426,7 @@ function on_help($command, $side = 0) {
/** Print edit data form
* @param string
* @param array[]
* @param Field[]
* @param mixed
* @param bool
* @return null