]> git.mxchange.org Git - friendica.git/commitdiff
Both declarations must be the same
authorRoland Häder <roland@mxchange.org>
Mon, 20 Jun 2022 06:06:45 +0000 (08:06 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 20 Jun 2022 06:07:12 +0000 (08:07 +0200)
src/Database/DBA.php
tests/Util/Database/StaticDatabase.php

index 4eff592f091ef538c5b847b6ea5a303a8cfc0c6f..d7c0421b7a2a69d283e962a891e4acc64b75a008 100644 (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();
        }
index a6b2575f5909017672cea8bfd3fe59d1adb39ace..0782a9745fa67025e61c816be42b871622972e9c 100644 (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;