Code Duplication    Length = 8-12 lines in 3 locations

src/Runtime.php 1 location

@@ 102-113 (lines=12) @@
99
    /**
100
     * {@inheritdoc}
101
     */
102
    public function delete($key)
103
    {
104
        $key = $this->mapKey($key);
105
106
        if ( isset($this->items[$key]) ) {
107
            unset($this->items[$key]);
108
109
            return true;
110
        }
111
112
        return false;
113
    }
114
115
    /**
116
     * {@inheritdoc}

src/AbstractPdo.php 1 location

@@ 286-293 (lines=8) @@
283
    /**
284
     * {@inheritdoc}
285
     */
286
    public function getTtl($key)
287
    {
288
        $mKey = $this->mapKey($key);
289
290
        return isset($this->ttls[$mKey])
291
                ? $this->ttls[$mKey]-time()
292
                : false;
293
    }
294
295
}
296

src/Mongo.php 1 location

@@ 271-278 (lines=8) @@
268
    /**
269
     * {@inheritdoc}
270
     */
271
    public function getTtl($key)
272
    {
273
        $mKey = $this->mapKey($key);
274
275
        return !isset($this->ttls[$mKey]) && null === $this->get($mKey)
276
                ? false
277
                : $this->ttls[$mKey];
278
    }
279
280
}
281