From aec500ad5b41934d09e75548280c86cc62e1dffc Mon Sep 17 00:00:00 2001 From: michalsn Date: Sun, 17 Nov 2024 12:48:00 +0100 Subject: [PATCH] apply rector rules --- system/Validation/StrictRules/FileRules.php | 2 +- tests/system/Database/Live/MySQLi/FoundRowsTest.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/system/Validation/StrictRules/FileRules.php b/system/Validation/StrictRules/FileRules.php index e808d4b2a382..9176716ef561 100644 --- a/system/Validation/StrictRules/FileRules.php +++ b/system/Validation/StrictRules/FileRules.php @@ -38,7 +38,7 @@ class FileRules */ public function __construct(?RequestInterface $request = null) { - if ($request === null) { + if (! $request instanceof RequestInterface) { $request = service('request'); } diff --git a/tests/system/Database/Live/MySQLi/FoundRowsTest.php b/tests/system/Database/Live/MySQLi/FoundRowsTest.php index d5b88b49af28..b39f8999085d 100644 --- a/tests/system/Database/Live/MySQLi/FoundRowsTest.php +++ b/tests/system/Database/Live/MySQLi/FoundRowsTest.php @@ -81,7 +81,7 @@ public function testAffectedRowsAfterEnableFoundRowsWithNoChange(): void $affectedRows = $db1->affectedRows(); - $this->assertSame($affectedRows, 2); + $this->assertSame(2, $affectedRows); } public function testAffectedRowsAfterDisableFoundRowsWithNoChange(): void @@ -97,7 +97,7 @@ public function testAffectedRowsAfterDisableFoundRowsWithNoChange(): void $affectedRows = $db1->affectedRows(); - $this->assertSame($affectedRows, 0); + $this->assertSame(0, $affectedRows); } public function testAffectedRowsAfterEnableFoundRowsWithChange(): void @@ -113,7 +113,7 @@ public function testAffectedRowsAfterEnableFoundRowsWithChange(): void $affectedRows = $db1->affectedRows(); - $this->assertSame($affectedRows, 2); + $this->assertSame(2, $affectedRows); } public function testAffectedRowsAfterDisableFoundRowsWithChange(): void @@ -129,7 +129,7 @@ public function testAffectedRowsAfterDisableFoundRowsWithChange(): void $affectedRows = $db1->affectedRows(); - $this->assertSame($affectedRows, 2); + $this->assertSame(2, $affectedRows); } public function testAffectedRowsAfterEnableFoundRowsWithPartialChange(): void @@ -145,7 +145,7 @@ public function testAffectedRowsAfterEnableFoundRowsWithPartialChange(): void $affectedRows = $db1->affectedRows(); - $this->assertSame($affectedRows, 2); + $this->assertSame(2, $affectedRows); } public function testAffectedRowsAfterDisableFoundRowsWithPartialChange(): void @@ -161,6 +161,6 @@ public function testAffectedRowsAfterDisableFoundRowsWithPartialChange(): void $affectedRows = $db1->affectedRows(); - $this->assertSame($affectedRows, 1); + $this->assertSame(1, $affectedRows); } }