*/
const NULL_DATETIME = '0001-01-01 00:00:00';
- public static function connect()
+ public static function connect(): bool
{
return DI::dba()->connect();
}
/**
* Perform a reconnect of an existing database connection
*/
- public static function reconnect()
+ public static function reconnect(): bool
{
return DI::dba()->reconnect();
}
*
* @return bool|void
*/
- public function connect()
+ public function connect(): bool
{
if (!is_null($this->connection) && $this->connected()) {
return true;
}
/** Mock for locking tables */
- public function lock($table)
+ public function lock($table): bool
{
if ($this->_locked) {
return false;
}
/** 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();
*
* @return bool Was the command executed successfully?
*/
- public function commit()
+ public function commit(): bool
{
if (!$this->performCommit()) {
return false;