From dab6a62d3463a4f003ebfbaedddbf9eaff103f90 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Thu, 30 May 2024 11:46:36 -0700 Subject: [PATCH] Code formatting --- tests/RedisClusterTest.php | 2 +- tests/RedisTest.php | 6 +++--- tests/TestSuite.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/RedisClusterTest.php b/tests/RedisClusterTest.php index 3e081e9..968ed92 100644 --- a/tests/RedisClusterTest.php +++ b/tests/RedisClusterTest.php @@ -391,7 +391,7 @@ class Redis_Cluster_Test extends Redis_Test { $this->assertIsArray($this->redis->slowlog($key, 'get', 10)); $this->assertIsInt($this->redis->slowlog($key, 'len')); $this->assertTrue($this->redis->slowlog($key, 'reset')); - $this->assertFalse($this->redis->slowlog($key, 'notvalid')); + $this->assertFalse(@$this->redis->slowlog($key, 'notvalid')); } /* INFO COMMANDSTATS requires a key or ip:port for node direction */ diff --git a/tests/RedisTest.php b/tests/RedisTest.php index 0d371d2..ea97859 100644 --- a/tests/RedisTest.php +++ b/tests/RedisTest.php @@ -6467,7 +6467,7 @@ class Redis_Test extends TestSuite { $this->assertEquals(count(explode('-', $id)), 2); /* Empty message should fail */ - $this->redis->xAdd('stream', '*', []); + @$this->redis->xAdd('stream', '*', []); } protected function doXRangeTest($reverse) { @@ -6662,7 +6662,7 @@ class Redis_Test extends TestSuite { ); /* Empty query should fail */ - $this->assertFalse($this->redis->xRead([])); + $this->assertFalse(@$this->redis->xRead([])); } public function testXRead() { @@ -6809,7 +6809,7 @@ class Redis_Test extends TestSuite { } /* Empty array should fail */ - $this->assertFalse($this->redis->xDel('s', [])); + $this->assertFalse(@$this->redis->xDel('s', [])); } public function testXTrim() { diff --git a/tests/TestSuite.php b/tests/TestSuite.php index be38c61..b4f9d73 100644 --- a/tests/TestSuite.php +++ b/tests/TestSuite.php @@ -523,8 +523,8 @@ class TestSuite ?string $host = NULL, ?int $port = NULL, $auth = NULL) { - /* Lowercase our limit arg if we're passed one */ - $limit ??= strtolower($limit); + if ($limit) + $limit = strtolower($limit); $rc = new ReflectionClass($class_name); $methods = $rc->GetMethods(ReflectionMethod::IS_PUBLIC);