diff --git a/phpstan-baseline.php b/phpstan-baseline.php index cc669afb1e74..3b79f9639943 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -1026,16 +1026,6 @@ 'count' => 1, 'path' => __DIR__ . '/system/Database/Config.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Access to an undefined property CodeIgniter\\\\Database\\\\ConnectionInterface\\:\\:\\$DBDriver\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/system/Database/Database.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Access to an undefined property CodeIgniter\\\\Database\\\\ConnectionInterface\\:\\:\\$connID\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/system/Database/Database.php', -]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 2, diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index a024d938f386..4e34e0fdb699 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -18,33 +18,33 @@ use Throwable; /** - * @property array $aliasedTables - * @property string $charset - * @property bool $compress - * @property float $connectDuration - * @property float $connectTime - * @property string $database - * @property string $DBCollat - * @property bool $DBDebug - * @property string $DBDriver - * @property string $DBPrefix - * @property string $DSN - * @property array|bool $encrypt - * @property array $failover - * @property string $hostname - * @property Query $lastQuery - * @property string $password - * @property bool $pConnect - * @property int|string $port - * @property bool $pretend - * @property string $queryClass - * @property array $reservedIdentifiers - * @property bool $strictOn - * @property string $subdriver - * @property string $swapPre - * @property int $transDepth - * @property bool $transFailure - * @property bool $transStatus + * @property-read array $aliasedTables + * @property-read string $charset + * @property-read bool $compress + * @property-read float $connectDuration + * @property-read float $connectTime + * @property-read string $database + * @property-read string $DBCollat + * @property-read bool $DBDebug + * @property-read string $DBDriver + * @property-read string $DBPrefix + * @property-read string $DSN + * @property-read array|bool $encrypt + * @property-read array $failover + * @property-read string $hostname + * @property-read Query $lastQuery + * @property-read string $password + * @property-read bool $pConnect + * @property-read int|string $port + * @property-read bool $pretend + * @property-read string $queryClass + * @property-read array $reservedIdentifiers + * @property-read bool $strictOn + * @property-read string $subdriver + * @property-read string $swapPre + * @property-read int $transDepth + * @property-read bool $transFailure + * @property-read bool $transStatus * * @template TConnection * @template TResult diff --git a/system/Database/ConnectionInterface.php b/system/Database/ConnectionInterface.php index a8493f897ec7..ed45933734a2 100644 --- a/system/Database/ConnectionInterface.php +++ b/system/Database/ConnectionInterface.php @@ -14,6 +14,9 @@ /** * @template TConnection * @template TResult + * + * @property false|object|resource $connID + * @property-read string $DBDriver */ interface ConnectionInterface {