diff --git a/src/Database/DBA.php b/src/Database/DBA.php index 4eff592f0..d7c0421b7 100644 --- a/src/Database/DBA.php +++ b/src/Database/DBA.php @@ -42,7 +42,7 @@ class DBA */ const NULL_DATETIME = '0001-01-01 00:00:00'; - public static function connect() + public static function connect(): bool { return DI::dba()->connect(); } @@ -58,7 +58,7 @@ class DBA /** * Perform a reconnect of an existing database connection */ - public static function reconnect() + public static function reconnect(): bool { return DI::dba()->reconnect(); } diff --git a/tests/Util/Database/StaticDatabase.php b/tests/Util/Database/StaticDatabase.php index a6b2575f5..0782a9745 100644 --- a/tests/Util/Database/StaticDatabase.php +++ b/tests/Util/Database/StaticDatabase.php @@ -47,7 +47,7 @@ class StaticDatabase extends Database * * @return bool|void */ - public function connect() + public function connect(): bool { if (!is_null($this->connection) && $this->connected()) { return true; @@ -81,7 +81,7 @@ class StaticDatabase extends Database } /** Mock for locking tables */ - public function lock($table) + public function lock($table): bool { if ($this->_locked) { return false; @@ -94,7 +94,7 @@ class StaticDatabase extends Database } /** Mock for unlocking tables */ - public function unlock() + public function unlock(): bool { // See here: https://dev.mysql.com/doc/refman/5.7/en/lock-tables-and-transactions.html $this->performCommit(); @@ -110,7 +110,7 @@ class StaticDatabase extends Database * * @return bool Was the command executed successfully? */ - public function commit() + public function commit(): bool { if (!$this->performCommit()) { return false;