mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 09:04:02 +02:00
Doc-comments: Fix type errors
This commit is contained in:
@@ -116,11 +116,11 @@ if (isset($_GET["mssql"])) {
|
||||
return $row;
|
||||
}
|
||||
|
||||
function fetch_assoc(): array {
|
||||
function fetch_assoc() {
|
||||
return $this->convert(sqlsrv_fetch_array($this->result, SQLSRV_FETCH_ASSOC));
|
||||
}
|
||||
|
||||
function fetch_row(): array {
|
||||
function fetch_row() {
|
||||
return $this->convert(sqlsrv_fetch_array($this->result, SQLSRV_FETCH_NUMERIC));
|
||||
}
|
||||
|
||||
|
@@ -132,16 +132,16 @@ if (!defined('Adminer\DRIVER')) {
|
||||
}
|
||||
|
||||
/** Fetch next row as associative array
|
||||
* @return array<?string>
|
||||
* @return array<?string>|false
|
||||
*/
|
||||
function fetch_assoc(): array {
|
||||
function fetch_assoc() {
|
||||
return mysql_fetch_assoc($this->result);
|
||||
}
|
||||
|
||||
/** Fetch next row as numbered array
|
||||
* @return list<?string>
|
||||
* @return list<?string>|false
|
||||
*/
|
||||
function fetch_row(): array {
|
||||
function fetch_row() {
|
||||
return mysql_fetch_row($this->result);
|
||||
}
|
||||
|
||||
@@ -623,7 +623,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
}
|
||||
|
||||
/** Find out if database is information_schema */
|
||||
function information_schema(string $db): bool {
|
||||
function information_schema(?string $db): bool {
|
||||
return ($db == "information_schema")
|
||||
|| (min_version(5.5) && $db == "performance_schema");
|
||||
}
|
||||
@@ -951,7 +951,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
}
|
||||
|
||||
/** Get SQL command to create table */
|
||||
function create_sql(string $table, bool $auto_increment, string $style): string {
|
||||
function create_sql(string $table, ?bool $auto_increment, string $style): string {
|
||||
$return = get_val("SHOW CREATE TABLE " . table($table), 1);
|
||||
if (!$auto_increment) {
|
||||
$return = preg_replace('~ AUTO_INCREMENT=\d+~', '', $return); //! skip comments
|
||||
|
@@ -79,11 +79,11 @@ if (isset($_GET["oracle"])) {
|
||||
return $row;
|
||||
}
|
||||
|
||||
function fetch_assoc(): array {
|
||||
function fetch_assoc() {
|
||||
return $this->convert(oci_fetch_assoc($this->result));
|
||||
}
|
||||
|
||||
function fetch_row(): array {
|
||||
function fetch_row() {
|
||||
return $this->convert(oci_fetch_row($this->result));
|
||||
}
|
||||
|
||||
|
@@ -101,11 +101,11 @@ if (isset($_GET["pgsql"])) {
|
||||
$this->num_rows = pg_num_rows($result);
|
||||
}
|
||||
|
||||
function fetch_assoc(): array {
|
||||
function fetch_assoc() {
|
||||
return pg_fetch_assoc($this->result);
|
||||
}
|
||||
|
||||
function fetch_row(): array {
|
||||
function fetch_row() {
|
||||
return pg_fetch_row($this->result);
|
||||
}
|
||||
|
||||
|
@@ -48,11 +48,11 @@ if (isset($_GET["sqlite"])) {
|
||||
$this->result = $result;
|
||||
}
|
||||
|
||||
function fetch_assoc(): array {
|
||||
function fetch_assoc() {
|
||||
return $this->result->fetchArray(SQLITE3_ASSOC);
|
||||
}
|
||||
|
||||
function fetch_row(): array {
|
||||
function fetch_row() {
|
||||
return $this->result->fetchArray(SQLITE3_NUM);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user