Skip to content

Commit 212f912

Browse files
committed
Fixes
1 parent b23c255 commit 212f912

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

src/Dashboards/Redis/Compatibility/Cluster/PredisCluster.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,11 @@ public function getInfo(?string $option = null, ?array $combine = null): array {
8989
$options = ['Server', 'Clients', 'Memory', 'Persistence', 'Stats', 'Replication', 'CPU', 'Cluster', 'Keyspace'];
9090

9191
foreach ($options as $option_name) {
92-
/**
93-
* @var array<string, array<int, mixed>|array<string, array<int, mixed>>> $combined
94-
*/
92+
/** @var array<string, array<int, mixed>|array<string, array<int, mixed>>> $combined */
9593
$combined = [];
9694

9795
foreach ($this->nodes as $node) {
98-
/**
99-
* @var array<string, mixed> $node_info
100-
*/
96+
/** @var array<string, mixed> $node_info */
10197
$node_info = $node->info()[$option_name];
10298

10399
foreach ($node_info as $key => $value) {
@@ -311,7 +307,7 @@ public function getSlowlog(int $count): ?array {
311307
foreach ($this->nodes as $node) {
312308
$logs = $node->executeRaw(['SLOWLOG', 'GET', (string) $count]);
313309

314-
if (is_array($logs) && !empty($logs)) {
310+
if (is_array($logs) && $logs !== []) {
315311
array_push($all_logs, ...$logs);
316312
}
317313
}

src/Dashboards/Redis/Compatibility/Cluster/RedisCluster.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,11 @@ public function getInfo(?string $option = null, ?array $combine = null): array {
9191
$options = ['SERVER', 'CLIENTS', 'MEMORY', 'PERSISTENCE', 'STATS', 'REPLICATION', 'CPU', 'CLUSTER', 'KEYSPACE'];
9292

9393
foreach ($options as $option_name) {
94-
/**
95-
* @var array<string, array<int, mixed>|array<string, array<int, mixed>>> $combined
96-
*/
94+
/** @var array<string, array<int, mixed>|array<string, array<int, mixed>>> $combined */
9795
$combined = [];
9896

9997
foreach ($this->nodes as $node) {
100-
/**
101-
* @var array<string, mixed> $node_info
102-
*/
98+
/** @var array<string, mixed> $node_info */
10399
$node_info = $this->info($node, $option_name);
104100

105101
foreach ($node_info as $key => $value) {

src/Dashboards/Redis/RedisTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private function panels(): string {
8989
'Cluster' => $info['cluster']['cluster_enabled'] ? 'Enabled' : 'Disabled',
9090
'Uptime' => Format::seconds((int) $info['server']['uptime_in_seconds']),
9191
$role ?? null,
92-
'Keys' => Format::number($count_of_all_keys).(!$this->is_cluster ? ' (all databases)' : ''),
92+
'Keys' => Format::number($count_of_all_keys).($this->is_cluster ? '' : ' (all databases)'),
9393
['Hits / Misses', Format::number($hits).' / '.Format::number($misses).' ('.$hit_rate.'%)', $hit_rate, 'higher'],
9494
],
9595
],

0 commit comments

Comments
 (0)