summaryrefslogtreecommitdiff
path: root/src/Database/Db.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Database/Db.php')
-rw-r--r--src/Database/Db.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Database/Db.php b/src/Database/Db.php
index c1efa058..4116ffda 100644
--- a/src/Database/Db.php
+++ b/src/Database/Db.php
@@ -81,31 +81,31 @@ class Db
}
/**
- * Run a insert query
+ * Run an insert query
*
* @param string $query
* @param array $bindings
- * @return bool
+ * @return int|bool
*/
public static function insert($query, array $bindings = [])
{
self::query($query, $bindings);
- return self::$lastStatus;
+ return (self::$lastStatus ? self::$stm->rowCount() : false);
}
/**
- * Run a update query
+ * Run an update query
*
* @param string $query
* @param array $bindings
- * @return int|null
+ * @return int|bool
*/
public static function update($query, array $bindings = [])
{
self::query($query, $bindings);
- return (self::$lastStatus ? self::$stm->rowCount() : null);
+ return (self::$lastStatus ? self::$stm->rowCount() : false);
}
/**
@@ -113,13 +113,13 @@ class Db
*
* @param string $query
* @param array $bindings
- * @return int|null
+ * @return int|bool
*/
public static function delete($query, array $bindings = [])
{
self::query($query, $bindings);
- return (self::$lastStatus ? self::$stm->rowCount() : null);
+ return (self::$lastStatus ? self::$stm->rowCount() : false);
}
/**