1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 20:01:25 +02:00

Doc-comments: Sync method signatures

This commit is contained in:
Jakub Vrana
2025-03-28 09:57:33 +01:00
parent ab4208dcb8
commit 54f8d731b3
13 changed files with 161 additions and 170 deletions

View File

@@ -46,7 +46,7 @@ abstract class SqlDriver {
/** Get structured types
* @return list<string>[]|list<string> [$description => [$type, ...], ...]
*/
function structuredTypes() {
function structuredTypes(): array {
return array_map('array_keys', $this->types);
}

View File

@@ -20,11 +20,11 @@ if (extension_loaded('pdo')) {
$this->server_info = @$this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION);
}
function quote($string) {
function quote(string $string): string {
return $this->pdo->quote($string);
}
function query($query, $unbuffered = false) {
function query(string $query, bool $unbuffered = false) {
/** @var Result|bool */
$result = $this->pdo->query($query);
$this->error = "";
@@ -54,7 +54,7 @@ if (extension_loaded('pdo')) {
return true;
}
function next_result() {
function next_result(): bool {
/** @var PdoResult|bool */
$result = $this->multi;
if (!is_object($result)) {
@@ -68,15 +68,15 @@ if (extension_loaded('pdo')) {
class PdoResult extends \PDOStatement {
public $_offset = 0, $num_rows;
function fetch_assoc() {
function fetch_assoc(): array {
return $this->fetch(\PDO::FETCH_ASSOC);
}
function fetch_row() {
function fetch_row(): array {
return $this->fetch(\PDO::FETCH_NUM);
}
function fetch_field() {
function fetch_field(): object {
$row = (object) $this->getColumnMeta($this->_offset++);
$type = $row->pdo_type;
$row->type = ($type == \PDO::PARAM_INT ? 0 : 15);