From 84bd79564f665bafa18ad8ef4f6d44bcf86b6437 Mon Sep 17 00:00:00 2001 From: michalsn Date: Tue, 20 Jan 2026 09:19:35 +0100 Subject: [PATCH] fix: rector --- tests/system/Database/Live/OCI8/LastInsertIDTest.php | 2 +- tests/system/Database/Live/PreparedQueryTest.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/system/Database/Live/OCI8/LastInsertIDTest.php b/tests/system/Database/Live/OCI8/LastInsertIDTest.php index 716cef2ff09d..0a041fbcd073 100644 --- a/tests/system/Database/Live/OCI8/LastInsertIDTest.php +++ b/tests/system/Database/Live/OCI8/LastInsertIDTest.php @@ -79,7 +79,7 @@ public function testGetInsertIDWithHasCommentQuery(): void public function testGetInsertIDWithPreparedQuery(): void { - $query = $this->db->prepare(static function ($db) { + $query = $this->db->prepare(static function ($db): Query { $sql = 'INSERT INTO "db_job" ("name", "description") VALUES (?, ?)'; return (new Query($db))->setQuery($sql); diff --git a/tests/system/Database/Live/PreparedQueryTest.php b/tests/system/Database/Live/PreparedQueryTest.php index b645c5992413..c66202c191af 100644 --- a/tests/system/Database/Live/PreparedQueryTest.php +++ b/tests/system/Database/Live/PreparedQueryTest.php @@ -83,7 +83,7 @@ public function testPrepareReturnsPreparedQuery(): void public function testPrepareReturnsManualPreparedQuery(): void { - $this->query = $this->db->prepare(static function ($db) { + $this->query = $this->db->prepare(static function ($db): Query { $sql = "INSERT INTO {$db->protectIdentifiers($db->DBPrefix . 'user')} (" . $db->protectIdentifiers('name') . ', ' . $db->protectIdentifiers('email') . ', ' @@ -127,7 +127,7 @@ public function testExecuteRunsQueryAndReturnsTrue(): void public function testExecuteRunsQueryManualAndReturnsTrue(): void { - $this->query = $this->db->prepare(static function ($db) { + $this->query = $this->db->prepare(static function ($db): Query { $sql = "INSERT INTO {$db->protectIdentifiers($db->DBPrefix . 'user')} (" . $db->protectIdentifiers('name') . ', ' . $db->protectIdentifiers('email') . ', ' @@ -164,7 +164,7 @@ public function testExecuteRunsQueryAndReturnsFalse(): void public function testExecuteRunsQueryManualAndReturnsFalse(): void { - $this->query = $this->db->prepare(static function ($db) { + $this->query = $this->db->prepare(static function ($db): Query { $sql = "INSERT INTO {$db->protectIdentifiers($db->DBPrefix . 'without_auto_increment')} (" . $db->protectIdentifiers('key') . ', ' . $db->protectIdentifiers('value') @@ -200,7 +200,7 @@ public function testExecuteSelectQueryAndCheckTypeAndResult(): void public function testExecuteSelectQueryManualAndCheckTypeAndResult(): void { - $this->query = $this->db->prepare(static function ($db) { + $this->query = $this->db->prepare(static function ($db): Query { $sql = 'SELECT ' . $db->protectIdentifiers('name') . ', ' . $db->protectIdentifiers('email') . ', '