Both declarations must be the same

This commit is contained in:
Roland Häder 2022-06-20 08:06:45 +02:00
parent cd3b01fd82
commit 9c80dd35e5
No known key found for this signature in database
GPG Key ID: C82EDE5DDFA0BA77
2 changed files with 6 additions and 6 deletions

View File

@ -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();
}

View File

@ -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;