Skip to content

Commit 27ee2d8

Browse files
committed
fix: fix failing tests
1 parent 90e8b7b commit 27ee2d8

3 files changed

Lines changed: 0 additions & 18 deletions

File tree

src/Prometheus/Storage/RedisClients/PHPRedis.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,6 @@ public function getOption(string $option): mixed
6666
return $this->redis->getOption(self::OPTIONS_MAP[$option]);
6767
}
6868

69-
public function stripKeyPrefix(string $key): string
70-
{
71-
/** @var mixed $prefix */
72-
$prefix = $this->redis->getOption(\Redis::OPT_PREFIX);
73-
if (!is_string($prefix) || $prefix === '') {
74-
return $key;
75-
}
76-
77-
return substr($key, strlen($prefix));
78-
}
79-
8069
public function eval(string $script, array $args = [], int $num_keys = 0): void
8170
{
8271
$this->redis->eval($script, $args, $num_keys);

src/Prometheus/Storage/RedisClients/Predis.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ public function getOption(string $option): mixed
6161
return $this->options[$mappedOption] ?? null;
6262
}
6363

64-
public function stripKeyPrefix(string $key): string
65-
{
66-
return $key;
67-
}
68-
6964
private function getClient(): Client
7065
{
7166
if ($this->client === null) {

src/Prometheus/Storage/RedisClients/RedisClient.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ interface RedisClient
1010

1111
public function getOption(string $option): mixed;
1212

13-
public function stripKeyPrefix(string $key): string;
14-
1513
/**
1614
* @param mixed[] $args
1715
*/

0 commit comments

Comments
 (0)