diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index 5f141b73c21c..670dd0494984 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -46,8 +46,8 @@ * @property bool $transFailure * @property bool $transStatus * - * @template TConnection of object|resource - * @template TResult of object|resource + * @template TConnection + * @template TResult * * @implements ConnectionInterface */ diff --git a/system/Database/BasePreparedQuery.php b/system/Database/BasePreparedQuery.php index 3253562f95a4..bfc0a608ea05 100644 --- a/system/Database/BasePreparedQuery.php +++ b/system/Database/BasePreparedQuery.php @@ -18,9 +18,9 @@ use ErrorException; /** - * @template TConnection of object|resource - * @template TStatement of object|resource - * @template TResult of object|resource + * @template TConnection + * @template TStatement + * @template TResult * * @implements PreparedQueryInterface */ diff --git a/system/Database/BaseResult.php b/system/Database/BaseResult.php index 6910aa98aea6..c5f603a28127 100644 --- a/system/Database/BaseResult.php +++ b/system/Database/BaseResult.php @@ -15,8 +15,8 @@ use stdClass; /** - * @template TConnection of object|resource - * @template TResult of object|resource + * @template TConnection + * @template TResult * * @implements ResultInterface */ @@ -499,6 +499,8 @@ abstract public function getFieldData(): array; /** * Frees the current result. + * + * @return void */ abstract public function freeResult(); @@ -525,7 +527,7 @@ abstract protected function fetchAssoc(); * * Overridden by child classes. * - * @return object + * @return Entity|false|object|stdClass */ abstract protected function fetchObject(string $className = 'stdClass'); } diff --git a/system/Database/ConnectionInterface.php b/system/Database/ConnectionInterface.php index 57fca79df428..85125eb1ae62 100644 --- a/system/Database/ConnectionInterface.php +++ b/system/Database/ConnectionInterface.php @@ -12,8 +12,8 @@ namespace CodeIgniter\Database; /** - * @template TConnection of object|resource - * @template TResult of object|resource + * @template TConnection + * @template TResult */ interface ConnectionInterface { diff --git a/system/Database/MySQLi/Result.php b/system/Database/MySQLi/Result.php index d41cc24d3216..afe23486d7e8 100644 --- a/system/Database/MySQLi/Result.php +++ b/system/Database/MySQLi/Result.php @@ -103,6 +103,8 @@ public function getFieldData(): array /** * Frees the current result. + * + * @return void */ public function freeResult() { diff --git a/system/Database/OCI8/Result.php b/system/Database/OCI8/Result.php index 68f663bf828a..63682e2a229c 100644 --- a/system/Database/OCI8/Result.php +++ b/system/Database/OCI8/Result.php @@ -13,6 +13,7 @@ use CodeIgniter\Database\BaseResult; use CodeIgniter\Entity\Entity; +use stdClass; /** * Result for OCI8 diff --git a/system/Database/Postgre/Result.php b/system/Database/Postgre/Result.php index 3617e2a399dc..84ee1514ec42 100644 --- a/system/Database/Postgre/Result.php +++ b/system/Database/Postgre/Result.php @@ -69,6 +69,8 @@ public function getFieldData(): array /** * Frees the current result. + * + * @return void */ public function freeResult() { diff --git a/system/Database/PreparedQueryInterface.php b/system/Database/PreparedQueryInterface.php index 7dbd985f8802..7b55991835c8 100644 --- a/system/Database/PreparedQueryInterface.php +++ b/system/Database/PreparedQueryInterface.php @@ -14,9 +14,9 @@ use BadMethodCallException; /** - * @template TConnection of object|resource - * @template TStatement of object|resource - * @template TResult of object|resource + * @template TConnection + * @template TStatement + * @template TResult */ interface PreparedQueryInterface { diff --git a/system/Database/ResultInterface.php b/system/Database/ResultInterface.php index 9aa788aba307..c959a7cb2292 100644 --- a/system/Database/ResultInterface.php +++ b/system/Database/ResultInterface.php @@ -14,8 +14,8 @@ use stdClass; /** - * @template TConnection of object|resource - * @template TResult of object|resource + * @template TConnection + * @template TResult */ interface ResultInterface { diff --git a/system/Database/SQLSRV/Result.php b/system/Database/SQLSRV/Result.php index 0aa68b01e2ac..ea1117d3bc3f 100755 --- a/system/Database/SQLSRV/Result.php +++ b/system/Database/SQLSRV/Result.php @@ -103,6 +103,8 @@ public function getFieldData(): array /** * Frees the current result. + * + * @return void */ public function freeResult() { diff --git a/system/Database/SQLite3/Result.php b/system/Database/SQLite3/Result.php index 10c0ea00d232..b2175d9d198b 100644 --- a/system/Database/SQLite3/Result.php +++ b/system/Database/SQLite3/Result.php @@ -80,6 +80,8 @@ public function getFieldData(): array /** * Frees the current result. + * + * @return void */ public function freeResult() { diff --git a/system/Test/Mock/MockResult.php b/system/Test/Mock/MockResult.php index 689a1392ec14..87654b1dd779 100644 --- a/system/Test/Mock/MockResult.php +++ b/system/Test/Mock/MockResult.php @@ -46,7 +46,7 @@ public function getFieldData(): array /** * Frees the current result. * - * @return mixed + * @return void */ public function freeResult() { @@ -59,10 +59,11 @@ public function freeResult() * * @param int $n * - * @return mixed + * @return bool */ public function dataSeek($n = 0) { + return true; } /**