Code Duplication    Length = 14-14 lines in 2 locations

src/RedisTaggedCacheTrait.php 2 locations

@@ 101-114 (lines=14) @@
98
     *
99
     * @throws RedisTaggedCacheException
100
     */
101
    public function removeTaggedValue(string $key): void
102
    {
103
        $isOk = $this->evalScript(
104
            RedisTaggedScripts::REMOVE_VALUE_SCRIPT_INDEX,
105
            [$key, $this->getInternalKeysPrefix(), $this->getInternalTagsPrefix()],
106
            1
107
        );
108
109
        if ($isOk === false) {
110
            throw new class extends RuntimeException implements RedisTaggedCacheException
111
            {
112
            };
113
        }
114
    }
115
116
    /** @noinspection PhpDocRedundantThrowsInspection
117
     * @param string $tag
@@ 123-136 (lines=14) @@
120
     *
121
     * @throws RedisTaggedCacheException
122
     */
123
    public function invalidateTag(string $tag): void
124
    {
125
        $isOk = $this->evalScript(
126
            RedisTaggedScripts::INVALIDATE_TAG_SCRIPT_INDEX,
127
            [$tag, $this->getInternalKeysPrefix(), $this->getInternalTagsPrefix()],
128
            1
129
        );
130
131
        if ($isOk === false) {
132
            throw new class extends RuntimeException implements RedisTaggedCacheException
133
            {
134
            };
135
        }
136
    }
137
138
    /**
139
     * @param int   $scriptIndex