Code Duplication    Length = 23-25 lines in 2 locations

src/ApcCache.php 1 location

@@ 32-54 (lines=23) @@
29
     *
30
     * @throws \Comodojo\Exception\CacheException
31
     */
32
    public function __construct(\Monolog\Logger $logger = null) {
33
34
        try {
35
            
36
            parent::__construct($logger);
37
            
38
        }
39
        
40
        catch (CacheException $ce) {
41
            
42
            throw $ce;
43
            
44
        }
45
46
        if ( self::getApcStatus() === false ) {
47
48
            $this->raiseError("Apc extension not available, disabling cache administratively");
49
50
            $this->disable();
51
52
        }
53
54
    }
55
56
    /**
57
     * Set cache element

src/XCacheCache.php 1 location

@@ 34-58 (lines=25) @@
31
     * 
32
     * @throws \Comodojo\Exception\CacheException
33
     */
34
    public function __construct( \Monolog\Logger $logger=null ) {
35
36
        if ( self::getXCacheStatus() === false ) {
37
38
            $this->raiseError("XCache extension not available, disabling cache administratively");
39
40
            $this->disable();
41
42
        } else {
43
44
            try {
45
            
46
                parent::__construct( $logger );
47
                
48
            }
49
            
50
            catch ( CacheException $ce ) {
51
                
52
                throw $ce;
53
                
54
            }
55
56
        }
57
58
    }
59
60
    /**
61
     * Set cache element