Code Duplication    Length = 5-5 lines in 5 locations

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

@@ 55-59 (lines=5) @@
52
    {
53
        $this->setup($config);
54
55
        if (!$this->driverCheck()) {
56
            throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName()));
57
        } else {
58
            $this->driverConnect();
59
        }
60
    }
61
62
    /**

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

@@ 51-55 (lines=5) @@
48
    {
49
        $this->setup($config);
50
51
        if (!$this->driverCheck()) {
52
            throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName()));
53
        } else {
54
            $this->driverConnect();
55
        }
56
    }
57
58
    /**

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

@@ 50-54 (lines=5) @@
47
    {
48
        $this->setup($config);
49
50
        if (!$this->driverCheck()) {
51
            throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName()));
52
        } else {
53
            $this->driverConnect();
54
        }
55
    }
56
57
    /**

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

@@ 45-49 (lines=5) @@
42
    {
43
        $this->setup($config);
44
45
        if (!$this->driverCheck()) {
46
            throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName()));
47
        } else {
48
            $this->driverConnect();
49
        }
50
    }
51
52
    /**

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

@@ 40-44 (lines=5) @@
37
    {
38
        $this->setup($config);
39
40
        if (!$this->driverCheck()) {
41
            throw new phpFastCacheDriverCheckException(sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName()));
42
        } else {
43
            $this->driverConnect();
44
        }
45
    }
46
47
    /**