]> git.joonet.de Git - adminer.git/commitdiff
Doc-comments: Remove redundant info
authorJakub Vrana <jakub@vrana.cz>
Fri, 28 Mar 2025 11:03:56 +0000 (12:03 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 28 Mar 2025 11:47:09 +0000 (12:47 +0100)
adminer/drivers/mysql.inc.php
adminer/include/adminer.inc.php
adminer/include/design.inc.php
adminer/include/driver.inc.php
adminer/include/editing.inc.php
adminer/include/functions.inc.php
adminer/include/html.inc.php
plugins/login-password-less.php

index 0087035f572b7f6513e02163b990b0061a40d6dc..a55bab44163ec3fb6c51aeec470184059589419a 100644 (file)
@@ -490,7 +490,7 @@ if (!defined('Adminer\DRIVER')) {
        }
 
        /** Check if table supports foreign keys
-       * @param TableStatus $table_status result of table_status1()
+       * @param TableStatus $table_status
        */
        function fk_support(array $table_status): bool {
                return preg_match('~InnoDB|IBMDB2I' . (min_version(5.6) ? '|NDB' : '') . '~i', $table_status["Engine"]);
@@ -872,7 +872,7 @@ if (!defined('Adminer\DRIVER')) {
        * @param 'FUNCTION'|'PROCEDURE' $type
        * @return Routine
        */
-       function routine(string $name, $type): array {
+       function routine(string $name, string $type): array {
                global $driver;
                $aliases = array("bool", "boolean", "integer", "double precision", "real", "dec", "numeric", "fixed", "national char", "national varchar");
                $space = "(?:\\s|/\\*[\s\S]*?\\*/|(?:#|-- )[^\n]*\n?|--\r?\n)";
@@ -921,7 +921,7 @@ if (!defined('Adminer\DRIVER')) {
        }
 
        /** Get routine signature
-       * @param Routine $row result of routine()
+       * @param Routine $row
        */
        function routine_id(string $name, array $row): string {
                return idf_escape($name);
@@ -1000,7 +1000,7 @@ if (!defined('Adminer\DRIVER')) {
        }
 
        /** Convert field in select and edit
-       * @param Field $field one element from fields()
+       * @param Field $field
        * @return string|void
        */
        function convert_field(array $field) {
@@ -1016,7 +1016,7 @@ if (!defined('Adminer\DRIVER')) {
        }
 
        /** Convert value in edit after applying functions back
-       * @param Field $field one element from fields()
+       * @param Field $field
        * @param string $return SQL expression
        */
        function unconvert_field(array $field, string $return): string {
index 709d387de8192964b3b5d1383d86c8cac73c489a..8f9a207cc00a9e79a21139c21039ce5a7844dff2 100644 (file)
@@ -144,7 +144,7 @@ class Adminer {
        }
 
        /** Table caption used in navigation and headings
-       * @param TableStatus $tableStatus result of table_status1()
+       * @param TableStatus $tableStatus
        * @return string HTML code, "" to ignore table
        */
        function tableName(array $tableStatus): string {
@@ -152,7 +152,7 @@ class Adminer {
        }
 
        /** Field caption used in select and edit
-       * @param Field $field single field returned from fields()
+       * @param Field $field
        * @param int $order order of column in select
        * @return string HTML code, "" to ignore field
        */
@@ -163,7 +163,7 @@ class Adminer {
        }
 
        /** Print links after select heading
-       * @param TableStatus $tableStatus result of table_status1()
+       * @param TableStatus $tableStatus
        * @param ?string $set new item options, NULL for no new item
        */
        function selectLinks(array $tableStatus, ?string $set = ""): void {
@@ -208,7 +208,7 @@ class Adminer {
        }
 
        /** Print backward keys for row
-       * @param BackwardKey[] $backwardKeys result of $this->backwardKeys()
+       * @param BackwardKey[] $backwardKeys
        * @param string[] $row
        */
        function backwardKeysPrint(array $backwardKeys, array $row): void {
@@ -263,7 +263,7 @@ class Adminer {
 
        /** Get a link to use in select table
        * @param string $val raw value of the field
-       * @param Field $field single field returned from fields()
+       * @param Field $field
        * @return string|void null to create the default link
        */
        function selectLink(?string $val, array $field) {
@@ -272,7 +272,7 @@ class Adminer {
        /** Value printed in select table
        * @param ?string $val HTML-escaped value to print
        * @param ?string $link link to foreign key
-       * @param Field $field single field returned from fields()
+       * @param Field $field
        * @param string $original original value before applying editVal() and escaping
        */
        function selectVal(?string $val, ?string $link, array $field, ?string $original): string {
@@ -288,14 +288,14 @@ class Adminer {
        }
 
        /** Value conversion used in select and edit
-       * @param Field $field single field returned from fields()
+       * @param Field $field
        */
        function editVal(?string $val, array $field): ?string {
                return $val;
        }
 
        /** Print table structure in tabular format
-       * @param Field[] $fields data about individual fields
+       * @param Field[] $fields
        * @param TableStatus $tableStatus
        */
        function tableStructurePrint(array $fields, array $tableStatus = null): void {
@@ -326,7 +326,7 @@ class Adminer {
        }
 
        /** Print list of indexes on table in tabular format
-       * @param Index[] $indexes data about all indexes on a table
+       * @param Index[] $indexes
        */
        function tableIndexesPrint(array $indexes): void {
                echo "<table>\n";
@@ -657,7 +657,7 @@ class Adminer {
        }
 
        /** Functions displayed in edit form
-       * @param Field $field single field from fields()
+       * @param Field $field
        * @return list<string>
        */
        function editFunctions(array $field): array {
@@ -683,8 +683,7 @@ class Adminer {
        }
 
        /** Get options to display edit field
-       * @param string $table table name
-       * @param Field $field single field from fields()
+       * @param Field $field
        * @param string $attrs attributes to use inside the tag
        * @return string custom input field or empty string for default
        */
@@ -699,15 +698,14 @@ class Adminer {
        }
 
        /** Get hint for edit field
-       * @param string $table table name
-       * @param Field $field single field from fields()
+       * @param Field $field
        */
        function editHint(string $table, array $field, ?string $value): string {
                return "";
        }
 
        /** Process sent input
-       * @param Field $field single field from fields()
+       * @param Field $field
        * @return string expression to use in a query
        */
        function processInput(array $field, string $value, ?string $function = ""): string {
@@ -995,7 +993,7 @@ class Adminer {
        }
 
        /** Set up syntax highlight for code and <textarea>
-       * @param TableStatus[] $tables result of table_status('', true)
+       * @param TableStatus[] $tables
        */
        function syntaxHighlighting(array $tables): void {
                global $connection;
@@ -1057,7 +1055,7 @@ class Adminer {
        }
 
        /** Print table list in menu
-       * @param TableStatus[] $tables result of table_status('', true)
+       * @param TableStatus[] $tables
        */
        function tablesPrint(array $tables): void {
                global $adminer;
index 9fada1bf02f38eda99c0d62af82fbb9239f13278..a2a125e21ef5317a1a27a1c25a27efac43cb31af 100644 (file)
@@ -189,7 +189,7 @@ function page_messages(string $error): void {
 }
 
 /** Print HTML footer
-* @param string $missing "auth", "db", "ns"
+* @param ''|'auth'|'db'|'ns' $missing
 */
 function page_footer(string $missing = ""): void {
        global $adminer;
index 2b2083bf31e2e3217a9889ce594ed66753a9b8c2..cc99fa732586c890d914dd84010aab4efe101fc9 100644 (file)
@@ -227,7 +227,7 @@ abstract class SqlDriver {
        }
 
        /** Check whether table supports indexes
-       * @param TableStatus $table_status result of table_status1()
+       * @param TableStatus $table_status
        */
        function supportsIndex(array $table_status): bool {
                return !is_view($table_status);
index dfbea8b95486e591d916c075cab3e18db937f0b8..59338d2b4e098e3559f43373185380b145c84165 100644 (file)
@@ -408,7 +408,7 @@ function normalize_enum(array $match): string {
 }
 
 /** Issue grant or revoke commands
-* @param string $grant GRANT or REVOKE
+* @param 'GRANT'|'REVOKE' $grant
 * @param list<string> $privileges
 * @return Result|bool
 */
@@ -455,7 +455,7 @@ function drop_create(string $drop, string $create, string $drop_created, string
 }
 
 /** Generate SQL query for creating trigger
-* @param Trigger $row result of trigger()
+* @param Trigger $row
 */
 function create_trigger(string $on, array $row): string {
        $timing_event = " $row[Timing] $row[Event]" . (preg_match('~ OF~', $row["Event"]) ? " $row[Of]" : ""); // SQL injection
@@ -469,7 +469,7 @@ function create_trigger(string $on, array $row): string {
 
 /** Generate SQL query for creating routine
 * @param 'PROCEDURE'|'FUNCTION' $routine
-* @param Routine $row result of routine()
+* @param Routine $row
 */
 function create_routine($routine, array $row): string {
        global $driver;
index d2093376efe5a46e72c1c63039b90dc463e8ca1e..050b579ceb7bdfbf9c6004ff0b6d2e48fcd6b453 100644 (file)
@@ -229,7 +229,7 @@ function get_rows(string $query, Db $connection2 = null, string $error = "<p cla
 
 /** Find unique identifier of a row
 * @param string[] $row
-* @param Index[] $indexes result of indexes()
+* @param Index[] $indexes
 * @return string[]|void null if there is no unique identifier
 */
 function unique_array(?array $row, array $indexes) {
@@ -416,9 +416,9 @@ function is_ajax(): bool {
 }
 
 /** Send Location header and exit
-* @param string $location null to only set a message
+* @param ?string $location null to only set a message
 */
-function redirect(string $location, string $message = null): void {
+function redirect(?string $location, string $message = null): void {
        if ($message !== null) {
                restart_session();
                $_SESSION["messages"][preg_replace('~^[^?]*~', '', ($location !== null ? $location : $_SERVER["REQUEST_URI"]))][] = $message;
index 1679d31d90d775fa324e1e9f82471515562c4607..c17fe1b23b90da398017874923545a2b501b9b01 100644 (file)
@@ -171,7 +171,7 @@ function hidden_fields_get(): void {
 }
 
 /** Print enum or set input field
-* @param string $type "radio"|"checkbox"
+* @param 'radio'|'checkbox' $type
 * @param Field $field
 * @param mixed $value string|array
 */
@@ -188,7 +188,7 @@ function enum_input(string $type, string $attrs, array $field, $value, string $e
 }
 
 /** Print edit input field
-* @param Field|RoutineField $field one field from fields()
+* @param Field|RoutineField $field
 * @param mixed $value
 */
 function input(array $field, $value, string $function, bool $autofocus = false): void {
@@ -282,7 +282,7 @@ function input(array $field, $value, string $function, bool $autofocus = false):
 }
 
 /** Process edit input field
-* @param Field|RoutineField $field one field from fields()
+* @param Field|RoutineField $field
 * @return mixed false to leave the original value
 */
 function process_input(array $field) {
index c70da0b44cb7fb42a796d60a8e495025ebce1f99..dad6f1222d7dd18e032989a43b54f4ec57487951 100644 (file)
@@ -10,7 +10,7 @@ class AdminerLoginPasswordLess {
        protected $password_hash;
 
        /** Set allowed password
-       * @param string $password_hash result of password_hash
+       * @param string $password_hash result of password_hash()
        */
        function __construct(string $password_hash) {
                $this->password_hash = $password_hash;