diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index badd34d5c077..5f141b73c21c 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -456,7 +456,8 @@ abstract protected function _close(); /** * Create a persistent database connection. * - * @return mixed + * @return false|object|resource + * @phpstan-return false|TConnection */ public function persistentConnect() { @@ -558,7 +559,7 @@ abstract protected function execute(string $sql); * Should automatically handle different connections for read/write * queries if needed. * - * @param mixed ...$binds + * @param array|string|null $binds * * @return BaseResult|bool|Query BaseResult when “read” type query, bool when “write” type query, Query when prepared query * @phpstan-return BaseResult|bool|Query @@ -1747,7 +1748,7 @@ protected function _enableForeignKeyChecks() /** * Accessor for properties if they exist. * - * @return mixed + * @return array|bool|float|int|object|resource|string|null */ public function __get(string $key) { diff --git a/system/Database/ConnectionInterface.php b/system/Database/ConnectionInterface.php index 7cbae20d2ec6..57fca79df428 100644 --- a/system/Database/ConnectionInterface.php +++ b/system/Database/ConnectionInterface.php @@ -62,7 +62,7 @@ public function getConnection(?string $alias = null); /** * Select a specific database table to use. * - * @return mixed + * @return bool */ public function setDatabase(string $databaseName); @@ -98,7 +98,7 @@ public function getVersion(): string; * Should automatically handle different connections for read/write * queries if needed. * - * @param mixed ...$binds + * @param array|string|null $binds * * @return BaseResult|bool|Query * @phpstan-return BaseResult|bool|Query @@ -127,7 +127,7 @@ public function table($tableName); /** * Returns the last query's statement object. * - * @return mixed + * @return Query */ public function getLastQuery(); @@ -150,7 +150,7 @@ public function escape($str); * * @param array ...$params * - * @return mixed + * @return array|bool|float|int|object|resource|string|null */ public function callFunction(string $functionName, ...$params); diff --git a/system/Database/Postgre/Connection.php b/system/Database/Postgre/Connection.php index 4e4fd3b8e4e5..d5074d0ce595 100644 --- a/system/Database/Postgre/Connection.php +++ b/system/Database/Postgre/Connection.php @@ -533,7 +533,7 @@ protected function _transRollback(): bool * * Overrides BaseConnection::isWriteType, adding additional read query types. * - * @param mixed $sql + * @param string $sql */ public function isWriteType($sql): bool { diff --git a/system/Database/SQLSRV/Connection.php b/system/Database/SQLSRV/Connection.php index 5d9b208d6010..4e0ca987df9a 100755 --- a/system/Database/SQLSRV/Connection.php +++ b/system/Database/SQLSRV/Connection.php @@ -44,7 +44,7 @@ class Connection extends BaseConnection * FALSE or SQLSRV_CURSOR_FORWARD would increase performance, * but would disable num_rows() (and possibly insert_id()) * - * @var mixed + * @var false|string */ public $scrollable; @@ -436,7 +436,7 @@ public function affectedRows(): int /** * Select a specific database table to use. * - * @return mixed + * @return bool */ public function setDatabase(?string $databaseName = null) { @@ -485,7 +485,7 @@ protected function execute(string $sql) /** * Returns the last error encountered by this connection. * - * @return mixed + * @return array * * @deprecated Use `error()` instead. */ @@ -546,7 +546,7 @@ public function getVersion(): string * * Overrides BaseConnection::isWriteType, adding additional read query types. * - * @param mixed $sql + * @param string $sql */ public function isWriteType($sql): bool {