Code Duplication    Length = 11-11 lines in 2 locations

src/RedisProxy.php 2 locations

@@ 174-184 (lines=11) @@
171
     * @return boolean true on success
172
     * @throws RedisProxyException if number of arguments is wrong
173
     */
174
    public function mset(...$dictionary)
175
    {
176
        $this->init();
177
        if (is_array($dictionary[0])) {
178
            $result = $this->driver->mset(...$dictionary);
179
            return $this->transformResult($result);
180
        }
181
        $dictionary = $this->prepareKeyValue($dictionary, 'mset');
182
        $result = $this->driver->mset($dictionary);
183
        return $this->transformResult($result);
184
    }
185
186
    /**
187
     * @param string $key
@@ 300-310 (lines=11) @@
297
     * @return boolean true on success
298
     * @throws RedisProxyException if number of arguments is wrong
299
     */
300
    public function hmset($key, ...$dictionary)
301
    {
302
        $this->init();
303
        if (is_array($dictionary[0])) {
304
            $result = $this->driver->hmset($key, ...$dictionary);
305
            return $this->transformResult($result);
306
        }
307
        $dictionary = $this->prepareKeyValue($dictionary, 'hmset');
308
        $result = $this->driver->hmset($key, $dictionary);
309
        return $this->transformResult($result);
310
    }
311
312
    /**
313
     * Incrementally iterate hash fields and associated values