Code Duplication    Length = 23-23 lines in 2 locations

src/Comodojo/Cache/Manager.php 1 location

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

src/Comodojo/SimpleCache/Manager.php 1 location

@@ 345-367 (lines=23) @@
342
343
            return $this->vacuum->getMultiple($key, $default);
344
345
        } else {
346
347
            foreach ($this->stack as $provider) {
348
349
                $item = $provider[0]->has($key);
350
351
                if ( $item === true ) {
352
353
                    // selected provider has no sense in this case
354
                    $this->selected = $provider[0];
355
356
                    return true;
357
358
                }
359
360
            }
361
362
            // selected provider has no sense in this case
363
            $this->selected = $this->vacuum;
364
365
            return false;
366
367
        }
368
369
    }
370