]> git.joonet.de Git - adminer.git/commitdiff
Use more [] in doc-comments
authorJan Tojnar <jtojnar@gmail.com>
Sun, 2 Mar 2025 02:17:14 +0000 (03:17 +0100)
committerJakub Vrána <jakub@vrana.cz>
Mon, 3 Mar 2025 07:39:17 +0000 (08:39 +0100)
Follow up to 42de70d032b3376006954820f1ee2ec7c7bce57b

adminer/drivers/mysql.inc.php
adminer/drivers/sqlite.inc.php
adminer/include/adminer.inc.php
adminer/include/design.inc.php
adminer/include/functions.inc.php
plugins/login-servers.php

index 3c3bd46bd6ce600f568b7598a4b8c32244ad83a0..ab0fd55cb1b8be71f7ded4417e1603d4626d3ade 100644 (file)
@@ -501,7 +501,7 @@ if (!defined("DRIVER")) {
 
        /** Count tables in all databases
        * @param array
-       * @return array arra($db => $tables)
+       * @return array [$db => $tables]
        */
        function count_tables($databases) {
                $return = array();
@@ -514,7 +514,7 @@ if (!defined("DRIVER")) {
        /** Get table status
        * @param string
        * @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) {
                $return = array();
@@ -558,7 +558,7 @@ if (!defined("DRIVER")) {
 
        /** Get information about fields
        * @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) {
                $return = array();
@@ -588,7 +588,7 @@ if (!defined("DRIVER")) {
        /** Get table indexes
        * @param string
        * @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) {
                $return = array();
@@ -604,7 +604,7 @@ if (!defined("DRIVER")) {
 
        /** Get foreign keys in table
        * @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) {
                global $connection, $on_actions;
@@ -740,7 +740,7 @@ if (!defined("DRIVER")) {
        /** Run commands to create or alter table
        * @param string "" to create
        * @param string new name
-       * @param array of array($orig, $process_field, $after)
+       * @param array of [$orig, $process_field, $after]
        * @param array of strings
        * @param string
        * @param string
@@ -777,7 +777,7 @@ if (!defined("DRIVER")) {
 
        /** Run commands to alter indexes
        * @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
        */
        function alter_indexes($table, $alter) {
@@ -892,7 +892,7 @@ if (!defined("DRIVER")) {
 
        /** Get defined triggers
        * @param string
-       * @return array [$name => array($timing, $event)]
+       * @return array [$name => [$timing, $event]]
        */
        function triggers($table) {
                $return = array();
@@ -903,7 +903,7 @@ if (!defined("DRIVER")) {
        }
 
        /** Get trigger options
-       * @return array ["Timing" => array(), "Event" => array(), "Type" => array()]
+       * @return array ["Timing" => [], "Event" => [], "Type" => []]
        */
        function trigger_options() {
                return array(
@@ -916,7 +916,7 @@ if (!defined("DRIVER")) {
        /** Get information about stored routine
        * @param string
        * @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) {
                global $connection, $enum_length, $inout, $types;
@@ -1169,7 +1169,7 @@ if (!defined("DRIVER")) {
        */
        function driver_config() {
                $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(
                        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),
index ec7bdd7a11b844d1aba7c31189bca5b5d0803452..524f9e1266f935ee1e03ba7b76202c05a5ac8e19 100644 (file)
@@ -446,7 +446,7 @@ if (isset($_GET["sqlite"])) {
        * @param array [$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 [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
index 73e45a573a4105285d4b6b3360516e1b350727fa..217dbeb61786c7356691970186bb00eb5d7332e7 100644 (file)
@@ -512,7 +512,7 @@ class Adminer {
        /** Process columns box in select
        * @param array selectable columns
        * @param array
-       * @return array [array(select_expressions), array(group_expressions)]
+       * @return array [[select_expressions], [group_expressions]]
        */
        function selectColumnsProcess($columns, $indexes) {
                global $functions, $grouping;
index 4818df5c25a4fc34fff37c9de99461a87d4d5a0e..ac031267124ab4e9886e0301b9e135d87aabd799 100644 (file)
@@ -6,7 +6,7 @@ if (!ob_get_level()) {
 /** Print HTML header
 * @param string used in title, breadcrumb and heading, should be HTML escaped
 * @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
 * @return null
 */
index 71e2de0bd3fca9f3933d2e24cea4a0f17f0c2bdb..bb841de29a8412c0c1601bb42e531526e80a9ac3 100644 (file)
@@ -633,7 +633,7 @@ function query_redirect($query, $location, $message, $redirect = true, $execute
 
 /** Execute and remember query
 * @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) {
        global $connection;
@@ -851,7 +851,7 @@ function table_status1($table, $fast = false) {
 
 /** Find out foreign keys for each column
 * @param string
-* @return array [$col => array()]
+* @return array [$col => []]
 */
 function column_foreign_keys($table) {
        global $adminer;
index cac6b28f6f28fb74c1d9be0e3619071f85f2edc0..d8ee2ca098a0400f5798aea56656826284dbb060 100644 (file)
@@ -11,7 +11,7 @@ class AdminerLoginServers {
        var $servers;
 
        /** Set supported servers
-       * @param array [$description => array("server" => , "driver" => "server|pgsql|sqlite|...")]
+       * @param array [$description => ["server" => , "driver" => "server|pgsql|sqlite|..."]]
        */
        function __construct($servers) {
                $this->servers = $servers;