Code Duplication    Length = 3-3 lines in 3 locations

modules/payment/libraries/Payment.php 1 location

@@ 84-86 (lines=3) @@
81
        $this->driver = new $driver($this->config);
82
83
        // Validate the driver
84
        if (! ($this->driver instanceof Payment_Driver)) {
85
            throw new Kohana_Exception('core.driver_implements', $this->config['driver'], get_class($this), 'Payment_Driver');
86
        }
87
    }
88
89
    /**

system/libraries/Cache.php 1 location

@@ 83-85 (lines=3) @@
80
        $this->driver = new $driver($this->config['params']);
81
82
        // Validate the driver
83
        if (! ($this->driver instanceof Cache_Driver)) {
84
            throw new Kohana_Exception('core.driver_implements', $this->config['driver'], get_class($this), 'Cache_Driver');
85
        }
86
87
        Kohana::log('debug', 'Cache Library initialized');
88

system/libraries/Image.php 1 location

@@ 123-125 (lines=3) @@
120
        $this->driver = new $driver($this->config['params']);
121
122
        // Validate the driver
123
        if (! ($this->driver instanceof Image_Driver)) {
124
            throw new Kohana_Exception('core.driver_implements', $this->config['driver'], get_class($this), 'Image_Driver');
125
        }
126
    }
127
128
    /**