Code Duplication    Length = 17-17 lines in 2 locations

src/Comodojo/Cache/Cache.php 2 locations

@@ 262-278 (lines=17) @@
259
260
    }
261
262
    public function delete($name=null) {
263
264
        if ( !$this->isEnabled() ) return false;
265
266
        $delete = array();
267
268
        foreach ($this->stack->getAll() as $id => $provider) {
269
270
            $delete[] = $provider->delete($name);
271
272
            if ( $provider->getErrorState() ) $this->stack->disable($id);
273
274
        };
275
276
        return !in_array(false, $delete);
277
278
    }
279
280
    public function flush() {
281
@@ 280-296 (lines=17) @@
277
278
    }
279
280
    public function flush() {
281
282
        if ( !$this->isEnabled() ) return false;
283
284
        $flush = array();
285
286
        foreach ($this->stack->getAll() as $id => $provider) {
287
288
            $flush[] = $provider->flush();
289
290
            if ( $provider->getErrorState() ) $this->stack->disable($id);
291
292
        };
293
294
        return !in_array(false, $flush);
295
296
    }
297
298
    public function status() {
299