mirror of
https://github.com/friendica/friendica
synced 2024-11-09 16:22:56 +00:00
Both declarations must be the same
This commit is contained in:
parent
cd3b01fd82
commit
9c80dd35e5
2 changed files with 6 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue