aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Db/TransactionalTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/AppFramework/Db/TransactionalTest.php')
-rw-r--r--tests/lib/AppFramework/Db/TransactionalTest.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/lib/AppFramework/Db/TransactionalTest.php b/tests/lib/AppFramework/Db/TransactionalTest.php
index a60c4386fea..72a3d9ae59f 100644
--- a/tests/lib/AppFramework/Db/TransactionalTest.php
+++ b/tests/lib/AppFramework/Db/TransactionalTest.php
@@ -28,14 +28,13 @@ class TransactionalTest extends TestCase {
$test = new class($this->db) {
use TTransactional;
- private IDBConnection $db;
-
- public function __construct(IDBConnection $db) {
- $this->db = $db;
+ public function __construct(
+ private IDBConnection $db,
+ ) {
}
public function fail(): void {
- $this->atomic(function () {
+ $this->atomic(function (): void {
throw new RuntimeException('nope');
}, $this->db);
}
@@ -55,10 +54,9 @@ class TransactionalTest extends TestCase {
$test = new class($this->db) {
use TTransactional;
- private IDBConnection $db;
-
- public function __construct(IDBConnection $db) {
- $this->db = $db;
+ public function __construct(
+ private IDBConnection $db,
+ ) {
}
public function succeed(): int {