summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorjerkob <jsterry@gmail.com>2020-01-28 17:20:47 +0100
committerGitHub <noreply@github.com>2020-01-28 17:20:47 +0100
commit1cce9697265382853d9646ae3963fc20e6e97aa9 (patch)
tree76ceacd37e6a8bc63698486d54ee293c1a02f748 /system/database/DB_driver.php
parentdc8ebd3a5abaabe69e23f95097594ab4d431944f (diff)
Replace `trans_depth()` with `trans_active()`
Per code review, replace `trans_depth()` function that returns the protected `_trans_depth` property with a `trans_active()` function that returns a boolean indicating whether a transaction is currently active.
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 733522284..96becd767 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -829,13 +829,13 @@ abstract class CI_DB_driver {
// --------------------------------------------------------------------
/**
- * Lets you retrieve the transaction depth
+ * Returns whether a transaction is currently active
*
- * @return int
+ * @return bool
*/
- public function trans_depth()
+ public function trans_active()
{
- return $this->_trans_depth;
+ return (bool) $this->_trans_depth;
}
// --------------------------------------------------------------------