Code Duplication    Length = 9-9 lines in 2 locations

src/RedisProxy.php 2 locations

@@ 219-227 (lines=9) @@
216
     * @param string $key
217
     * @return string
218
     */
219
    public function get($key)
220
    {
221
        $this->init();
222
        $result = $this->driver->get($key);
223
        if ($this->driver instanceof Client) {
224
            $result = $result === null ? false : $result;
225
        }
226
        return $result;
227
    }
228
229
    public function del(...$key)
230
    {
@@ 257-265 (lines=9) @@
254
     * @param string $field
255
     * @return string|boolean false if hash field is not set
256
     */
257
    public function hget($key, $field)
258
    {
259
        $this->init();
260
        $result = $this->driver->hget($key, $field);
261
        if ($this->driver instanceof Client) {
262
            $result = $result === null ? false : $result;
263
        }
264
        return $result;
265
    }
266
267
    /**
268
     * Delete one or more hash fields, returns number of deleted fields