Code Duplication    Length = 10-12 lines in 2 locations

src/phpFastCache/Drivers/Ssdb/Driver.php 1 location

@@ 45-54 (lines=10) @@
42
     * @param array $config
43
     * @throws phpFastCacheDriverException
44
     */
45
    public function __construct(array $config = [])
46
    {
47
        $this->setup($config);
48
49
        if (!$this->driverCheck()) {
50
            throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName()));
51
        } elseif (!$this->driverConnect()) {
52
            throw new phpFastCacheDriverException('Ssdb is not connected, cannot continue.');
53
        }
54
    }
55
56
    /**
57
     * @return bool

src/phpFastCache/Drivers/Memcached/Driver.php 1 location

@@ 39-50 (lines=12) @@
36
     * @param array $config
37
     * @throws phpFastCacheDriverException
38
     */
39
    public function __construct(array $config = [])
40
    {
41
        self::checkCollision('Memcached');
42
        $this->setup($config);
43
44
        if (!$this->driverCheck()) {
45
            throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName()));
46
        } else {
47
            $this->instance = new MemcachedSoftware();
48
            $this->driverConnect();
49
        }
50
    }
51
52
    /**
53
     * @return bool