Code Duplication    Length = 10-11 lines in 2 locations

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

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

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

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