From aefbc703f24c04e54895050a5fa95ccf8eda587f Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sat, 27 Jul 2019 15:35:53 +0200 Subject: [PATCH] Add some phpdoc --- tests/Util/Database/StaticDatabase.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/Util/Database/StaticDatabase.php b/tests/Util/Database/StaticDatabase.php index 6f9bdbe8b5..63544c4f67 100644 --- a/tests/Util/Database/StaticDatabase.php +++ b/tests/Util/Database/StaticDatabase.php @@ -6,6 +6,10 @@ use Friendica\Database\Database; use PDO; use PDOException; +/** + * Overrides the Friendica database class for re-using the connection + * for different tests + */ class StaticDatabase extends Database { /** @@ -99,13 +103,16 @@ class StaticDatabase extends Database } /** - * @return ExtendedPDO + * @return ExtendedPDO The global, static connection */ public static function getGlobConnection() { return self::$staticConnection; } + /** + * Perform a global commit for every nested transaction of the static connection + */ public static function statCommit() { if (isset(self::$staticConnection)) { @@ -115,6 +122,9 @@ class StaticDatabase extends Database } } + /** + * Perform a global rollback for every nested transaction of the static connection + */ public static function statRollback() { if (isset(self::$staticConnection)) {