1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 23:27:17 +02:00

Use more [] in doc-comments

Follow up to 42de70d032
This commit is contained in:
Jan Tojnar
2025-03-02 03:17:14 +01:00
committed by Jakub Vrána
parent 160beb726a
commit 4cdcb44bee
6 changed files with 17 additions and 17 deletions

View File

@@ -501,7 +501,7 @@ if (!defined("DRIVER")) {
/** Count tables in all databases /** Count tables in all databases
* @param array * @param array
* @return array arra($db => $tables) * @return array [$db => $tables]
*/ */
function count_tables($databases) { function count_tables($databases) {
$return = array(); $return = array();
@@ -514,7 +514,7 @@ if (!defined("DRIVER")) {
/** Get table status /** Get table status
* @param string * @param string
* @param bool return only "Name", "Engine" and "Comment" fields * @param bool return only "Name", "Engine" and "Comment" fields
* @return array [$name => array("Name" => , "Engine" => , "Comment" => , "Oid" => , "Rows" => , "Collation" => , "Auto_increment" => , "Data_length" => , "Index_length" => , "Data_free" => )] or only inner array with $name * @return array [$name => ["Name" => , "Engine" => , "Comment" => , "Oid" => , "Rows" => , "Collation" => , "Auto_increment" => , "Data_length" => , "Index_length" => , "Data_free" => ]] or only inner array with $name
*/ */
function table_status($name = "", $fast = false) { function table_status($name = "", $fast = false) {
$return = array(); $return = array();
@@ -558,7 +558,7 @@ if (!defined("DRIVER")) {
/** Get information about fields /** Get information about fields
* @param string * @param string
* @return array [$name => array("field" => , "full_type" => , "type" => , "length" => , "unsigned" => , "default" => , "null" => , "auto_increment" => , "on_update" => , "collation" => , "privileges" => , "comment" => , "primary" => )] * @return array [$name => ["field" => , "full_type" => , "type" => , "length" => , "unsigned" => , "default" => , "null" => , "auto_increment" => , "on_update" => , "collation" => , "privileges" => , "comment" => , "primary" => ]]
*/ */
function fields($table) { function fields($table) {
$return = array(); $return = array();
@@ -588,7 +588,7 @@ if (!defined("DRIVER")) {
/** Get table indexes /** Get table indexes
* @param string * @param string
* @param string Min_DB to use * @param string Min_DB to use
* @return array [$key_name => array("type" => , "columns" => array(), "lengths" => array(), "descs" => array())] * @return array [$key_name => ["type" => , "columns" => [], "lengths" => [], "descs" => []]]
*/ */
function indexes($table, $connection2 = null) { function indexes($table, $connection2 = null) {
$return = array(); $return = array();
@@ -604,7 +604,7 @@ if (!defined("DRIVER")) {
/** Get foreign keys in table /** Get foreign keys in table
* @param string * @param string
* @return array [$name => array("db" => , "ns" => , "table" => , "source" => array(), "target" => array(), "on_delete" => , "on_update" => )] * @return array [$name => ["db" => , "ns" => , "table" => , "source" => [], "target" => [], "on_delete" => , "on_update" => ]]
*/ */
function foreign_keys($table) { function foreign_keys($table) {
global $connection, $on_actions; global $connection, $on_actions;
@@ -740,7 +740,7 @@ if (!defined("DRIVER")) {
/** Run commands to create or alter table /** Run commands to create or alter table
* @param string "" to create * @param string "" to create
* @param string new name * @param string new name
* @param array of array($orig, $process_field, $after) * @param array of [$orig, $process_field, $after]
* @param array of strings * @param array of strings
* @param string * @param string
* @param string * @param string
@@ -777,7 +777,7 @@ if (!defined("DRIVER")) {
/** Run commands to alter indexes /** Run commands to alter indexes
* @param string escaped table name * @param string escaped table name
* @param array of array("index type", "name", array("column definition", ...)) or array("index type", "name", "DROP") * @param array of ["index type", "name", ["column definition", ...]] or ["index type", "name", "DROP"]
* @return bool * @return bool
*/ */
function alter_indexes($table, $alter) { function alter_indexes($table, $alter) {
@@ -892,7 +892,7 @@ if (!defined("DRIVER")) {
/** Get defined triggers /** Get defined triggers
* @param string * @param string
* @return array [$name => array($timing, $event)] * @return array [$name => [$timing, $event]]
*/ */
function triggers($table) { function triggers($table) {
$return = array(); $return = array();
@@ -903,7 +903,7 @@ if (!defined("DRIVER")) {
} }
/** Get trigger options /** Get trigger options
* @return array ["Timing" => array(), "Event" => array(), "Type" => array()] * @return array ["Timing" => [], "Event" => [], "Type" => []]
*/ */
function trigger_options() { function trigger_options() {
return array( return array(
@@ -916,7 +916,7 @@ if (!defined("DRIVER")) {
/** Get information about stored routine /** Get information about stored routine
* @param string * @param string
* @param string "FUNCTION" or "PROCEDURE" * @param string "FUNCTION" or "PROCEDURE"
* @return array ["fields" => array("field" => , "type" => , "length" => , "unsigned" => , "inout" => , "collation" => ), "returns" => , "definition" => , "language" => ] * @return array ["fields" => ["field" => , "type" => , "length" => , "unsigned" => , "inout" => , "collation" => ], "returns" => , "definition" => , "language" => ]
*/ */
function routine($name, $type) { function routine($name, $type) {
global $connection, $enum_length, $inout, $types; global $connection, $enum_length, $inout, $types;
@@ -1169,7 +1169,7 @@ if (!defined("DRIVER")) {
*/ */
function driver_config() { function driver_config() {
$types = array(); ///< @var array [$type => $maximum_unsigned_length, ...] $types = array(); ///< @var array [$type => $maximum_unsigned_length, ...]
$structured_types = array(); ///< @var array [$description => array($type, ...), ...] $structured_types = array(); ///< @var array [$description => [$type, ...], ...]
foreach (array( foreach (array(
lang('Numbers') => array("tinyint" => 3, "smallint" => 5, "mediumint" => 8, "int" => 10, "bigint" => 20, "decimal" => 66, "float" => 12, "double" => 21), lang('Numbers') => array("tinyint" => 3, "smallint" => 5, "mediumint" => 8, "int" => 10, "bigint" => 20, "decimal" => 66, "float" => 12, "double" => 21),
lang('Date and time') => array("date" => 10, "datetime" => 19, "timestamp" => 19, "time" => 10, "year" => 4), lang('Date and time') => array("date" => 10, "datetime" => 19, "timestamp" => 19, "time" => 10, "year" => 4),

View File

@@ -446,7 +446,7 @@ if (isset($_GET["sqlite"])) {
* @param array [$original => idf_escape($new_column)], empty to preserve * @param array [$original => idf_escape($new_column)], empty to preserve
* @param string [format_foreign_key()], empty to preserve * @param string [format_foreign_key()], empty to preserve
* @param int set auto_increment to this value, 0 to preserve * @param int set auto_increment to this value, 0 to preserve
* @param array [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 drop
* @param string CHECK constraint to add * @param string CHECK constraint to add
* @return bool * @return bool

View File

@@ -512,7 +512,7 @@ class Adminer {
/** Process columns box in select /** Process columns box in select
* @param array selectable columns * @param array selectable columns
* @param array * @param array
* @return array [array(select_expressions), array(group_expressions)] * @return array [[select_expressions], [group_expressions]]
*/ */
function selectColumnsProcess($columns, $indexes) { function selectColumnsProcess($columns, $indexes) {
global $functions, $grouping; global $functions, $grouping;

View File

@@ -6,7 +6,7 @@ if (!ob_get_level()) {
/** Print HTML header /** Print HTML header
* @param string used in title, breadcrumb and heading, should be HTML escaped * @param string used in title, breadcrumb and heading, should be HTML escaped
* @param string * @param string
* @param mixed array("key" => "link", "key2" => array("link", "desc")), null for nothing, false for driver only, true for driver and server * @param mixed ["key" => "link", "key2" => ["link", "desc"]], null for nothing, false for driver only, true for driver and server
* @param string used after colon in title and heading, should be HTML escaped * @param string used after colon in title and heading, should be HTML escaped
* @return null * @return null
*/ */

View File

@@ -633,7 +633,7 @@ function query_redirect($query, $location, $message, $redirect = true, $execute
/** Execute and remember query /** Execute and remember query
* @param string or null to return remembered queries, end with ';' to use DELIMITER * @param string or null to return remembered queries, end with ';' to use DELIMITER
* @return Min_Result or array($queries, $time) if $query = null * @return Min_Result or [$queries, $time] if $query = null
*/ */
function queries($query) { function queries($query) {
global $connection; global $connection;
@@ -851,7 +851,7 @@ function table_status1($table, $fast = false) {
/** Find out foreign keys for each column /** Find out foreign keys for each column
* @param string * @param string
* @return array [$col => array()] * @return array [$col => []]
*/ */
function column_foreign_keys($table) { function column_foreign_keys($table) {
global $adminer; global $adminer;

View File

@@ -11,7 +11,7 @@ class AdminerLoginServers {
var $servers; var $servers;
/** Set supported servers /** Set supported servers
* @param array [$description => array("server" => , "driver" => "server|pgsql|sqlite|...")] * @param array [$description => ["server" => , "driver" => "server|pgsql|sqlite|..."]]
*/ */
function __construct($servers) { function __construct($servers) {
$this->servers = $servers; $this->servers = $servers;