Code Duplication    Length = 23-23 lines in 2 locations

src/Comodojo/Cache/Manager.php 1 location

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

src/Comodojo/SimpleCache/Manager.php 1 location

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