mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 00:54:08 +02:00
Doc-comment: Improve array @param
This uses syntax from https://phpstan.org/writing-php-code/phpdoc-types#general-arrays. int[] means an array of ints with arbitrary keys (usually strings) list<string> means an array of strings with sequential integer keys starting at 0 list<string>[] means an arbitrary array of string lists list<string[]> means list of arbitrary string arrays string[][] means two dimensional array with arbitrary keys in both dimensions array was left in the comments for https://phpstan.org/writing-php-code/phpdoc-types#array-shapes
This commit is contained in:
@@ -505,7 +505,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
|
||||
/** Get database collation
|
||||
* @param string
|
||||
* @param array result of collations()
|
||||
* @param list<string>[] result of collations()
|
||||
* @return string
|
||||
*/
|
||||
function db_collation($db, $collations) {
|
||||
@@ -535,7 +535,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
}
|
||||
|
||||
/** Count tables in all databases
|
||||
* @param array
|
||||
* @param list<string>
|
||||
* @return int[] [$db => $tables]
|
||||
*/
|
||||
function count_tables($databases) {
|
||||
@@ -752,7 +752,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
}
|
||||
|
||||
/** Drop databases
|
||||
* @param array
|
||||
* @param list<string>
|
||||
* @return bool
|
||||
*/
|
||||
function drop_databases($databases) {
|
||||
@@ -809,7 +809,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
* @param string "" to create
|
||||
* @param string new name
|
||||
* @param array of [$orig, $process_field, $after]
|
||||
* @param array of strings
|
||||
* @param list<string>
|
||||
* @param string
|
||||
* @param string
|
||||
* @param string
|
||||
@@ -853,7 +853,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
|
||||
/** Run commands to alter indexes
|
||||
* @param string escaped table name
|
||||
* @param array of ["index type", "name", ["column definition", ...]] or ["index type", "name", "DROP"]
|
||||
* @param array[] of ["index type", "name", ["column definition", ...]] or ["index type", "name", "DROP"]
|
||||
* @return bool
|
||||
*/
|
||||
function alter_indexes($table, $alter) {
|
||||
@@ -867,7 +867,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
}
|
||||
|
||||
/** Run commands to truncate tables
|
||||
* @param array
|
||||
* @param list<string>
|
||||
* @return bool
|
||||
*/
|
||||
function truncate_tables($tables) {
|
||||
@@ -875,7 +875,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
}
|
||||
|
||||
/** Drop views
|
||||
* @param array
|
||||
* @param list<string>
|
||||
* @return bool
|
||||
*/
|
||||
function drop_views($views) {
|
||||
@@ -883,7 +883,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
}
|
||||
|
||||
/** Drop tables
|
||||
* @param array
|
||||
* @param list<string>
|
||||
* @return bool
|
||||
*/
|
||||
function drop_tables($tables) {
|
||||
@@ -891,8 +891,8 @@ if (!defined('Adminer\DRIVER')) {
|
||||
}
|
||||
|
||||
/** Move tables to other schema
|
||||
* @param array
|
||||
* @param array
|
||||
* @param list<string>
|
||||
* @param list<string>
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
@@ -921,8 +921,8 @@ if (!defined('Adminer\DRIVER')) {
|
||||
}
|
||||
|
||||
/** Copy tables to other schema
|
||||
* @param array
|
||||
* @param array
|
||||
* @param list<string>
|
||||
* @param list<string>
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
@@ -1073,7 +1073,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
|
||||
/** Get approximate number of rows
|
||||
* @param array
|
||||
* @param array
|
||||
* @param list<string>
|
||||
* @return int or null if approximate number can't be retrieved
|
||||
*/
|
||||
function found_rows($table_status, $where) {
|
||||
|
@@ -467,11 +467,11 @@ if (isset($_GET["sqlite"])) {
|
||||
/** Recreate table
|
||||
* @param string original name
|
||||
* @param string new name
|
||||
* @param array [process_field()], empty to preserve
|
||||
* @param array [$original => idf_escape($new_column)], empty to preserve
|
||||
* @param list<list<string>> [process_field()], empty to preserve
|
||||
* @param string[] [$original => idf_escape($new_column)], empty to preserve
|
||||
* @param string [format_foreign_key()], empty to preserve
|
||||
* @param int set auto_increment to this value, 0 to preserve
|
||||
* @param array [[$type, $name, $columns]], empty to preserve
|
||||
* @param array[] [[$type, $name, $columns]], empty to preserve
|
||||
* @param string CHECK constraint to drop
|
||||
* @param string CHECK constraint to add
|
||||
* @return bool
|
||||
|
Reference in New Issue
Block a user