Code Duplication    Length = 37-37 lines in 2 locations

src/Comodojo/Cache/Components/StackManager.php 1 location

@@ 23-59 (lines=37) @@
20
 * THE SOFTWARE.
21
 */
22
23
class StackManager extends AbstractStackManager {
24
25
    public function add(EnhancedCacheItemPoolInterface $provider, $weight) {
26
27
        return $this->genericAdd($provider, $weight);
28
29
    }
30
31
    public function remove($id) {
32
33
        try {
34
35
            return parent::remove($id);
36
37
        } catch (Exception $e) {
38
39
            throw new CacheException($e->getMessage());
40
41
        }
42
43
    }
44
45
    public function get($id) {
46
47
        try {
48
49
            return parent::get($id);
50
51
        } catch (Exception $e) {
52
53
            throw new CacheException($e->getMessage());
54
55
        }
56
57
    }
58
59
}
60

src/Comodojo/SimpleCache/Components/StackManager.php 1 location

@@ 24-60 (lines=37) @@
21
 * THE SOFTWARE.
22
 */
23
24
class StackManager extends AbstractStackManager {
25
26
    public function add(EnhancedSimpleCacheInterface $provider, $weight) {
27
28
        return $this->genericAdd($provider, $weight);
29
30
    }
31
32
    public function remove($id) {
33
34
        try {
35
36
            return parent::remove($id);
37
38
        } catch (Exception $e) {
39
40
            throw new SimpleCacheException($e->getMessage());
41
42
        }
43
44
    }
45
46
    public function get($id) {
47
48
        try {
49
50
            return parent::get($id);
51
52
        } catch (Exception $e) {
53
54
            throw new SimpleCacheException($e->getMessage());
55
56
        }
57
58
    }
59
60
}
61