Code Duplication    Length = 19-19 lines in 2 locations

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

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

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

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