Code Duplication    Length = 19-19 lines in 2 locations

src/Comodojo/Cache/Providers/AbstractEnhancedProvider.php 1 location

@@ 190-208 (lines=19) @@
187
188
    }
189
190
    public function test() {
191
192
        if ( $this->driver->test() ) {
193
194
            $this->setState(self::CACHE_SUCCESS);
195
196
            return true;
197
198
        }
199
200
        $error = $this->driver->getName()." driver unavailable, disabling provider ".$this->getId()." administratively";
201
202
        $this->logger->error($error);
203
204
        $this->setState(self::CACHE_ERROR, $error);
205
206
        return false;
207
208
    }
209
210
    public function getItems(array $keys = []) {
211

src/Comodojo/SimpleCache/Providers/AbstractEnhancedProvider.php 1 location

@@ 294-312 (lines=19) @@
291
292
    }
293
294
    public function test() {
295
296
        if ( $this->driver->test() ) {
297
298
            $this->setState(self::CACHE_SUCCESS);
299
300
            return true;
301
302
        }
303
304
        $error = $this->driver->getName()." driver unavailable, disabling provider ".$this->getId()." administratively";
305
306
        $this->logger->error($error);
307
308
        $this->setState(self::CACHE_ERROR, $error);
309
310
        return false;
311
312
    }
313
314
}
315