diff --git a/system/Common.php b/system/Common.php index 367fdbd806c8..d8163f634e80 100644 --- a/system/Common.php +++ b/system/Common.php @@ -75,7 +75,7 @@ function cache(?string $key = null) $cache = service('cache'); // No params - return cache object - if ((string) $key === '') { + if ($key === null) { return $cache; } @@ -1128,7 +1128,7 @@ function timer(?string $name = null, ?callable $callable = null) { $timer = service('timer'); - if ((string) $name === '') { + if ($name === null) { return $timer; } diff --git a/tests/system/Email/EmailTest.php b/tests/system/Email/EmailTest.php index 82d7145ba714..389b657e573a 100644 --- a/tests/system/Email/EmailTest.php +++ b/tests/system/Email/EmailTest.php @@ -55,7 +55,7 @@ public function testEmailSendWithClearance($autoClear): void $this->assertTrue($email->send($autoClear)); - if ($autoClear) { + if (! $autoClear) { $this->assertSame('foo@foo.com', $email->archive['recipients'][0]); } }