mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Doc-comment: Use type aliases for arrays
Type aliases could be defined either globally (https://phpstan.org/writing-php-code/phpdoc-types#global-type-aliases) or just for a class. I prefer having them at the place where they are created.
This commit is contained in:
@@ -555,7 +555,7 @@ if (isset($_GET["elastic"])) {
|
||||
}
|
||||
|
||||
/** Drop types
|
||||
* @param array
|
||||
* @param list<string>
|
||||
* @return bool
|
||||
*/
|
||||
function drop_tables($tables) {
|
||||
|
@@ -10,7 +10,7 @@ class AdminerLoginServers {
|
||||
protected $servers;
|
||||
|
||||
/** Set supported servers
|
||||
* @param array[] [$description => ["server" => , "driver" => "server|pgsql|sqlite|..."]]
|
||||
* @param array{server:string, driver:string}[] [$description => ["server" => , "driver" => "server|pgsql|sqlite|..."]]
|
||||
*/
|
||||
function __construct($servers) {
|
||||
$this->servers = $servers;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
class AdminerTableIndexesStructure {
|
||||
|
||||
/** Print table structure in tabular format
|
||||
* @param array[] data about all indexes on a table
|
||||
* @param Index[] data about all indexes on a table
|
||||
* @return bool
|
||||
*/
|
||||
function tableIndexesPrint($indexes) {
|
||||
|
@@ -9,7 +9,7 @@
|
||||
class AdminerTableStructure {
|
||||
|
||||
/** Print table structure in tabular format
|
||||
* @param array[] data about individual fields
|
||||
* @param Field[] data about individual fields
|
||||
* @return bool
|
||||
*/
|
||||
function tableStructurePrint($fields, $tableStatus = null) {
|
||||
|
Reference in New Issue
Block a user