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
/** Get database collation
* @param string
- * @param array result of collations()
+ * @param list<string>[] result of collations()
* @return string
*/
function db_collation($db, $collations) {
}
/** Count tables in all databases
- * @param array
+ * @param list<string>
* @return int[] [$db => $tables]
*/
function count_tables($databases) {
}
/** Drop databases
- * @param array
+ * @param list<string>
* @return bool
*/
function drop_databases($databases) {
* @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
/** 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) {
}
/** Run commands to truncate tables
- * @param array
+ * @param list<string>
* @return bool
*/
function truncate_tables($tables) {
}
/** Drop views
- * @param array
+ * @param list<string>
* @return bool
*/
function drop_views($views) {
}
/** Drop tables
- * @param array
+ * @param list<string>
* @return bool
*/
function drop_tables($tables) {
}
/** Move tables to other schema
- * @param array
- * @param array
+ * @param list<string>
+ * @param list<string>
* @param string
* @return bool
*/
}
/** Copy tables to other schema
- * @param array
- * @param array
+ * @param list<string>
+ * @param list<string>
* @param string
* @return bool
*/
/** 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) {
/** 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
}
/** Print backward keys for row
- * @param array result of $this->backwardKeys()
- * @param array
+ * @param array[] result of $this->backwardKeys()
+ * @param string[]
* @return null
*/
function backwardKeysPrint($backwardKeys, $row) {
}
/** Get descriptions of selected data
- * @param array all data to print
- * @param array
+ * @param list<string[]> all data to print
+ * @param array[]
* @return list<string[]>
*/
function rowDescriptions($rows, $foreignKeys) {
* @param string HTML-escaped value to print
* @param string link to foreign key
* @param array single field returned from fields()
- * @param array original value before applying editVal() and escaping
+ * @param string original value before applying editVal() and escaping
* @return string
*/
function selectVal($val, $link, $field, $original) {
}
/** Print table structure in tabular format
- * @param array data about individual fields
+ * @param array[] data about individual fields
* @param array
* @return null
*/
}
/** Print list of indexes on table in tabular format
- * @param array data about all indexes on a table
+ * @param array[] data about all indexes on a table
* @return null
*/
function tableIndexesPrint($indexes) {
}
/** Print columns box in select
- * @param array result of selectColumnsProcess()[0]
- * @param array selectable columns
+ * @param list<string> result of selectColumnsProcess()[0]
+ * @param string[] selectable columns
* @return null
*/
function selectColumnsPrint($select, $columns) {
}
/** Print search box in select
- * @param array result of selectSearchProcess()
- * @param array selectable columns
- * @param array
+ * @param list<string> result of selectSearchProcess()
+ * @param string[] selectable columns
+ * @param array[]
* @return null
*/
function selectSearchPrint($where, $columns, $indexes) {
}
/** Print order box in select
- * @param array result of selectOrderProcess()
- * @param array selectable columns
- * @param array
+ * @param list<string> result of selectOrderProcess()
+ * @param string[] selectable columns
+ * @param array[]
* @return null
*/
function selectOrderPrint($order, $columns, $indexes) {
}
/** Print action box in select
- * @param array
+ * @param array[]
* @return null
*/
function selectActionPrint($indexes) {
}
/** Print extra text in the end of a select form
- * @param array fields holding e-mails
- * @param array selectable columns
+ * @param string[] fields holding e-mails
+ * @param string[] selectable columns
* @return null
*/
function selectEmailPrint($emailFields, $columns) {
}
/** Process columns box in select
- * @param array selectable columns
- * @param array
+ * @param string[] selectable columns
+ * @param array[]
* @return list<list<string>> [[select_expressions], [group_expressions]]
*/
function selectColumnsProcess($columns, $indexes) {
}
/** Process search box in select
- * @param array
- * @param array
+ * @param array[]
+ * @param array[]
* @return list<string> expressions to join by AND
*/
function selectSearchProcess($fields, $indexes) {
}
/** Process order box in select
- * @param array
- * @param array
+ * @param array[]
+ * @param array[]
* @return list<string> expressions to join by comma
*/
function selectOrderProcess($fields, $indexes) {
}
/** Process extras in select form
- * @param array AND conditions
- * @param array
+ * @param string[] AND conditions
+ * @param array[]
* @return bool true if processed, false to process other parts of form
*/
function selectEmailProcess($where, $foreignKeys) {
}
/** Build SQL query used in select
- * @param array result of selectColumnsProcess()[0]
- * @param array result of selectSearchProcess()
- * @param array result of selectColumnsProcess()[1]
- * @param array result of selectOrderProcess()
+ * @param list<string> result of selectColumnsProcess()[0]
+ * @param list<string> result of selectSearchProcess()
+ * @param list<string> result of selectColumnsProcess()[1]
+ * @param list<string> result of selectOrderProcess()
* @param int result of selectLimitProcess()
* @param int index of page starting at zero
* @return string empty string to use default query
/** Print before edit form
* @param string
- * @param array
+ * @param array[]
* @param mixed
* @param bool
* @return null
}
/** Set up syntax highlight for code and <textarea>
- * @param array result of table_status()
+ * @param array[] result of table_status()
*/
function syntaxHighlighting($tables) {
global $connection;
/** Select data from table
* @param string
- * @param array result of $adminer->selectColumnsProcess()[0]
- * @param array result of $adminer->selectSearchProcess()
- * @param array result of $adminer->selectColumnsProcess()[1]
- * @param array result of $adminer->selectOrderProcess()
+ * @param list<string> result of $adminer->selectColumnsProcess()[0]
+ * @param list<string> result of $adminer->selectSearchProcess()
+ * @param list<string> result of $adminer->selectColumnsProcess()[1]
+ * @param list<string> result of $adminer->selectOrderProcess()
* @param int result of $adminer->selectLimitProcess()
* @param int index of page starting at zero
* @param bool whether to print the query
/** Update data in table
* @param string
- * @param array escaped columns in keys, quoted data in values
+ * @param string[] escaped columns in keys, quoted data in values
* @param string " WHERE ..."
* @param int 0 or 1
* @param string
/** Insert data into table
* @param string
- * @param array escaped columns in keys, quoted data in values
+ * @param string[] escaped columns in keys, quoted data in values
* @return bool
*/
function insert($table, $set) {
/** Insert or update data in table
* @param string
- * @param array
- * @param array of arrays with escaped columns in keys and quoted data in values
+ * @param list<string[]> of arrays with escaped columns in keys and quoted data in values
+ * @param int[] column names in keys
* @return bool
*/
function insertUpdate($table, $rows, $primary) {
/** Generate HTML <select> or <input> if $options are empty
* @param string
-* @param array
+* @param string[]
* @param string
* @param string
* @param string
/** Print table columns for type edit
* @param string
-* @param array
-* @param array
-* @param array returned by referencable_primary()
-* @param array extra types to prepend
+* @param list<string>[]
+* @param array[]
+* @param array[] returned by referencable_primary()
+* @param list<string> extra types to prepend
* @return null
*/
function edit_type($key, $field, $collations, $foreign_keys = array(), $extra_types = array()) {
}
/** Print table interior for fields editing
-* @param array
-* @param array
+* @param array[]
+* @param list<string>[]
* @param string TABLE or PROCEDURE
-* @param array returned by referencable_primary()
+* @param array[] returned by referencable_primary()
* @return null
*/
function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = array()) {
}
/** Move fields up and down or add field
-* @param array
+* @param array[]
* @return bool
*/
function process_fields(&$fields) {
}
/** Callback used in routine()
-* @param array
+* @param list<array>
* @return string
*/
function normalize_enum($match) {
/** Issue grant or revoke commands
* @param string GRANT or REVOKE
-* @param array
+* @param list<string>
* @param string
* @param string
* @return bool
/** Generate SQL query for creating routine
* @param string "PROCEDURE" or "FUNCTION"
-* @param array result of routine()
+* @param string[] result of routine()
* @return string
*/
function create_routine($routine, $row) {
}
/** Create link to database documentation
-* @param array JUSH => $path
+* @param string[] JUSH => $path
* @param string HTML code
* @return string HTML code
*/
}
/** Disable magic_quotes_gpc
-* @param array e.g. (&$_GET, &$_POST, &$_COOKIE)
+* @param list<array> e.g. (&$_GET, &$_POST, &$_COOKIE)
* @param bool whether to leave values as is
* @return null modified in place
*/
}
/** Find unique identifier of a row
-* @param array
-* @param array result of indexes()
+* @param string[]
+* @param array[] result of indexes()
* @return string[] or null if there is no unique identifier
*/
function unique_array($row, $indexes) {
/** Create SQL condition from parsed query string
* @param array parsed query string
-* @param array
+* @param array[]
* @return string
*/
function where($where, $fields = array()) {
/** Create SQL condition from query string
* @param string
-* @param array
+* @param array[]
* @return string
*/
function where_check($val, $fields = array()) {
}
/** Get select clause for convertible fields
-* @param array
-* @param array
-* @param array
+* @param string[]
+* @param array[]
+* @param list<string>
* @return string
*/
function convert_fields($columns, $fields, $select = array()) {
/** Apply command to all array items
* @param string
-* @param array
+* @param list<string>
* @param callback
* @return bool
*/
}
/** Print CSV row
-* @param array
+* @param string[]
* @return null
*/
function dump_csv($row) {
/** Get query to compute number of found rows
* @param string
-* @param array
+* @param list<string>
* @param bool
-* @param array
+* @param list<string>
* @return string
*/
function count_rows($table, $where, $is_group, $group) {
}
/** Generate list of HTML options
-* @param array array of strings or arrays (creates optgroup)
+* @param string[]|string[][] array of strings or arrays (creates optgroup)
* @param mixed
* @param bool always use array keys for value="", otherwise only string keys are used
* @return string
/** Generate HTML <select>
* @param string
-* @param array
+* @param string[]
* @param string
* @param string
* @param string
/** Generate HTML radio list
* @param string
-* @param array
+* @param string[]
* @param string
* @return string
*/
/** Print hidden fields
* @param array
-* @param array
+* @param list<string>
* @param string
* @return bool
*/
/** Print edit data form
* @param string
-* @param array
+* @param array[]
* @param mixed
* @param bool
* @return null
public $plugins; ///< @var protected(set) array
/** Register plugins
- * @param array object instances or null to autoload plugins from adminer-plugins/
+ * @param list<object> object instances or null to autoload plugins from adminer-plugins/
*/
function __construct($plugins) {
if ($plugins === null) {
* @param string
* @param string
* @param string
-* @param array
+* @param array[]
* @return bool
*/
function send_mail($email, $subject, $message, $from = "", $files = array()) {
protected $disabled;
/**
- * @param array case insensitive database names in values
+ * @param list<string> case insensitive database names in values
*/
function __construct($disabled) {
$this->disabled = array_map('strtolower', $disabled);
protected $designs;
/**
- * @param array URL in key, name in value
+ * @param list<string> URL in key, name in value
*/
function __construct($designs) {
$this->designs = $designs;
protected $ips, $forwarded_for;
/** Set allowed IP addresses
- * @param array IP address prefixes
- * @param array X-Forwarded-For prefixes if IP address matches, empty array means anything
+ * @param list<string> IP address prefixes
+ * @param list<string> X-Forwarded-For prefixes if IP address matches, empty array means anything
*/
function __construct($ips, $forwarded_for = array()) {
$this->ips = $ips;
protected $servers;
/** Set supported servers
- * @param array [$description => ["server" => , "driver" => "server|pgsql|sqlite|..."]]
+ * @param array[] [$description => ["server" => , "driver" => "server|pgsql|sqlite|..."]]
*/
function __construct($servers) {
$this->servers = $servers;
private $masters = array();
/**
- * @param array [$slave => $master]
+ * @param string[] [$slave => $master]
*/
function __construct($masters) {
$this->masters = $masters;
class AdminerTableIndexesStructure {
/** Print table structure in tabular format
- * @Param array data about all indexes on a table
+ * @param array[] data about all indexes on a table
* @return bool
*/
function tableIndexesPrint($indexes) {
class AdminerTableStructure {
/** Print table structure in tabular format
- * @param array data about individual fields
+ * @param array[] data about individual fields
* @return bool
*/
function tableStructurePrint($fields, $tableStatus = null) {
protected $scripts, $options;
/**
- * @param array
+ * @param list<string>
* @param string in format "skin: 'custom', preInit: function () { }"
*/
function __construct($scripts = array("jquery/jquery.js", "wymeditor/jquery.wymeditor.min.js"), $options = "") {