Code Duplication    Length = 23-23 lines in 2 locations

src/Comodojo/Cache/Manager.php 1 location

@@ 255-277 (lines=23) @@
252
253
            return new Item($key);
254
255
        } else {
256
257
            foreach ( $this->stack as $provider ) {
258
259
                $item = $provider[0]->hasItem($key);
260
261
                if ( $item === true ) {
262
263
                    // selected provider has no sense in this case
264
                    $this->selected = $provider[0];
265
266
                    return true;
267
268
                }
269
270
            }
271
272
            // selected provider has no sense in this case
273
            $this->selected = $this->vacuum;
274
275
            return false;
276
277
        }
278
279
    }
280

src/Comodojo/SimpleCache/Manager.php 1 location

@@ 354-376 (lines=23) @@
351
352
            return $this->vacuum->getMultiple($key, $default);
353
354
        } else {
355
356
            foreach ( $this->stack as $provider ) {
357
358
                $item = $provider[0]->has($key);
359
360
                if ( $item === true ) {
361
362
                    // selected provider has no sense in this case
363
                    $this->selected = $provider[0];
364
365
                    return true;
366
367
                }
368
369
            }
370
371
            // selected provider has no sense in this case
372
            $this->selected = $this->vacuum;
373
374
            return false;
375
376
        }
377
378
    }
379