1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 09:34:10 +02:00

Doc-comments: Use array shapes in @return

This uses https://phpstan.org/writing-php-code/phpdoc-types#array-shapes
I'm not going to do this in @param, it would be better to use https://phpstan.org/writing-php-code/phpdoc-types#global-type-aliases
This commit is contained in:
Jakub Vrana
2025-03-25 15:08:13 +01:00
parent 4d2b5144b1
commit 01e2fe4234
4 changed files with 15 additions and 15 deletions

View File

@@ -15,14 +15,14 @@ class Adminer {
}
/** Connection parameters
* @return array [$server, $username, $password]
* @return array{string, string, string}
*/
function credentials() {
return array(SERVER, $_GET["username"], get_password());
}
/** Get SSL connection options
* @return array ["key" => filename, "cert" => filename, "ca" => filename] or null
* @return string[] or null
*/
function connectSsl() {
}
@@ -220,7 +220,7 @@ class Adminer {
/** Find backward keys for table
* @param string
* @param string
* @return array[] $return[$target_table]["keys"][$key_name][$target_column] = $source_column; $return[$target_table]["name"] = $this->tableName($target_table);
* @return array{keys:string[][], name:string}[]
*/
function backwardKeys($table, $tableName) {
return array();