Code Duplication    Length = 13-13 lines in 2 locations

src/Adapter/PhpredisAdapter.php 1 location

@@ 61-73 (lines=13) @@
58
        return $result;
59
    }
60
61
    public function getMulti(array $keys): array
62
    {
63
        $result = $this->getClient()->mGet($keys);
64
        $values = [];
65
66
        foreach ($keys as $index => $key) {
67
            if ($result[$index]) {
68
                $values[$key] = $result[$index];
69
            }
70
        }
71
72
        return $values;
73
    }
74
75
    public function set(string $key, $value): bool
76
    {

src/Adapter/RedisAdapter.php 1 location

@@ 59-71 (lines=13) @@
56
        return $value;
57
    }
58
59
    public function getMulti(array $keys): array
60
    {
61
        $result = $this->getClient()->mget($keys);
62
        $values = [];
63
64
        foreach ($keys as $index => $key) {
65
            if ($result[$index] !== null) {
66
                $values[$key] = $result[$index];
67
            }
68
        }
69
70
        return $values;
71
    }
72
73
    public function set(string $key, $value): bool
74
    {