1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 22:56:46 +02:00

Return Db from connection()

It's not a real type declaration because compile.php passes stdClass here.
This commit is contained in:
Jakub Vrana
2025-03-30 08:18:25 +02:00
parent 7ee6f4f7ac
commit a93e4cb694
8 changed files with 29 additions and 32 deletions

View File

@@ -4,7 +4,7 @@ namespace Adminer;
// this could be interface when "Db extends \mysqli" can have compatible type declarations (PHP 7)
// interfaces can include properties only since PHP 8.4
abstract class SqlDb {
/** @var Db|string */ static $instance = ''; // string means error
/** @var Db */ static $instance;
public string $extension; // extension name
public string $flavor = ''; // different vendor with the same API, e.g. MariaDB; usually stays empty