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); } }