Code Duplication    Length = 19-19 lines in 2 locations

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

@@ 177-195 (lines=19) @@
174
175
    }
176
177
    public function test() {
178
179
        if ( $this->driver->test() ) {
180
181
            $this->setState(self::CACHE_SUCCESS);
182
183
            return true;
184
185
        }
186
187
        $error = $this->driver->getName()." driver unavailable, disabling provider ".$this->getId()." administratively";
188
189
        $this->logger->error($error);
190
191
        $this->setState(self::CACHE_ERROR, $error);
192
193
        return false;
194
195
    }
196
197
    public function getItems(array $keys = []) {
198

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

@@ 281-299 (lines=19) @@
278
279
    }
280
281
    public function test() {
282
283
        if ( $this->driver->test() ) {
284
285
            $this->setState(self::CACHE_SUCCESS);
286
287
            return true;
288
289
        }
290
291
        $error = $this->driver->getName()." driver unavailable, disabling provider ".$this->getId()." administratively";
292
293
        $this->logger->error($error);
294
295
        $this->setState(self::CACHE_ERROR, $error);
296
297
        return false;
298
299
    }
300
301
}
302