Code Duplication    Length = 9-17 lines in 2 locations

src/Comodojo/Cache/Providers/Memcached.php 1 location

@@ 275-283 (lines=9) @@
272
     *
273
     * @return  mixed
274
     */
275
    private function setNamespaceKey() {
276
277
        $uId = self::getUniqueId();
278
279
        $return = $this->instance->set($this->getNamespace(), $uId, 0);
280
281
        return $return === false ? false : $uId;
282
283
    }
284
285
    /**
286
     * Get key for namespace

src/Comodojo/Cache/Providers/PhpRedis.php 1 location

@@ 341-357 (lines=17) @@
338
     *
339
     * @return  string
340
     */
341
    private function setNamespaceKey() {
342
343
        $uId = self::getUniqueId();
344
345
        try {
346
347
            $return = $this->instance->set($this->getNamespace(), $uId);
348
349
        } catch (RedisException $re ) {
350
351
            throw $re;
352
353
        }
354
355
        return $return === false ? false : $uId;
356
357
    }
358
359
    /**
360
     * Get key for namespace