Code Duplication    Length = 10-10 lines in 2 locations

src/Buffered/Utils/Buffer.php 1 location

@@ 78-87 (lines=10) @@
75
     *
76
     * @return bool
77
     */
78
    public function expired($key)
79
    {
80
        if ($this->get($key) !== false) {
81
            // returned a value, clearly not yet expired
82
            return false;
83
        }
84
85
        // a known item, not returned by get, is expired
86
        return array_key_exists($key, $this->items);
87
    }
88
89
    /**
90
     * {@inheritdoc}

src/Buffered/Utils/BufferCollection.php 1 location

@@ 44-53 (lines=10) @@
41
     *
42
     * @return bool
43
     */
44
    public function expired($key)
45
    {
46
        if ($this->get($key) !== false) {
47
            // returned a value, clearly not yet expired
48
            return false;
49
        }
50
51
        // a known item, not returned by get, is expired
52
        return array_key_exists($key, $this->cache->items);
53
    }
54
}
55