File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -456,7 +456,7 @@ abstract protected function _close();
456456 /**
457457 * Create a persistent database connection.
458458 *
459- * @return mixed
459+ * @return false|object|resource
460460 */
461461 public function persistentConnect ()
462462 {
@@ -558,7 +558,7 @@ abstract protected function execute(string $sql);
558558 * Should automatically handle different connections for read/write
559559 * queries if needed.
560560 *
561- * @param mixed ...$binds
561+ * @param array|string|null ...$binds
562562 *
563563 * @return BaseResult|bool|Query BaseResult when “read” type query, bool when “write” type query, Query when prepared query
564564 * @phpstan-return BaseResult<TConnection, TResult>|bool|Query
@@ -1747,7 +1747,7 @@ protected function _enableForeignKeyChecks()
17471747 /**
17481748 * Accessor for properties if they exist.
17491749 *
1750- * @return mixed
1750+ * @return array|bool|float|int|object|resource|string|null
17511751 */
17521752 public function __get (string $ key )
17531753 {
Original file line number Diff line number Diff line change 1212namespace CodeIgniter \Database ;
1313
1414/**
15+ * @property Query $lastQuery
16+ *
1517 * @template TConnection of object|resource
1618 * @template TResult of object|resource
1719 */
@@ -62,7 +64,7 @@ public function getConnection(?string $alias = null);
6264 /**
6365 * Select a specific database table to use.
6466 *
65- * @return mixed
67+ * @return bool
6668 */
6769 public function setDatabase (string $ databaseName );
6870
@@ -98,7 +100,7 @@ public function getVersion(): string;
98100 * Should automatically handle different connections for read/write
99101 * queries if needed.
100102 *
101- * @param mixed ...$binds
103+ * @param array|string|null ...$binds
102104 *
103105 * @return BaseResult|bool|Query
104106 * @phpstan-return BaseResult<TConnection, TResult>|bool|Query
@@ -127,7 +129,7 @@ public function table($tableName);
127129 /**
128130 * Returns the last query's statement object.
129131 *
130- * @return mixed
132+ * @return Query
131133 */
132134 public function getLastQuery ();
133135
@@ -150,7 +152,7 @@ public function escape($str);
150152 *
151153 * @param array ...$params
152154 *
153- * @return mixed
155+ * @return array|bool|float|int|object|resource|string|null
154156 */
155157 public function callFunction (string $ functionName , ...$ params );
156158
Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ protected function _transRollback(): bool
533533 *
534534 * Overrides BaseConnection::isWriteType, adding additional read query types.
535535 *
536- * @param mixed $sql
536+ * @param string $sql
537537 */
538538 public function isWriteType ($ sql ): bool
539539 {
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class Connection extends BaseConnection
4444 * FALSE or SQLSRV_CURSOR_FORWARD would increase performance,
4545 * but would disable num_rows() (and possibly insert_id())
4646 *
47- * @var mixed
47+ * @var bool|string
4848 */
4949 public $ scrollable ;
5050
@@ -436,7 +436,7 @@ public function affectedRows(): int
436436 /**
437437 * Select a specific database table to use.
438438 *
439- * @return mixed
439+ * @return bool
440440 */
441441 public function setDatabase (?string $ databaseName = null )
442442 {
@@ -485,7 +485,7 @@ protected function execute(string $sql)
485485 /**
486486 * Returns the last error encountered by this connection.
487487 *
488- * @return mixed
488+ * @return array<string, int|string>
489489 *
490490 * @deprecated Use `error()` instead.
491491 */
@@ -546,7 +546,7 @@ public function getVersion(): string
546546 *
547547 * Overrides BaseConnection::isWriteType, adding additional read query types.
548548 *
549- * @param mixed $sql
549+ * @param string $sql
550550 */
551551 public function isWriteType ($ sql ): bool
552552 {
You can’t perform that action at this time.
0 commit comments