Code Duplication    Length = 6-6 lines in 2 locations

eZ/Publish/Core/Persistence/Cache/AbstractInMemoryHandler.php 2 locations

@@ 146-151 (lines=6) @@
143
144
        // Cache pool
145
        $cacheItem = $this->cache->getItem($key);
146
        if ($cacheItem->isHit()) {
147
            $this->logger->logCacheHit($arguments, 3);
148
            $this->inMemory->setMulti($objects = $cacheItem->get(), $cacheIndexes, $key);
149
150
            return $objects;
151
        }
152
153
        // Backend
154
        // (log misses first in case of $backendLoader ends up throwing NotFound)
@@ 246-251 (lines=6) @@
243
        }
244
245
        // No cache pool misses, cache loaded items in-memory and return
246
        if (empty($cacheMisses)) {
247
            $this->logger->logCacheHit($arguments ?: $ids, 3);
248
            $this->inMemory->setMulti($loaded, $cacheIndexes);
249
250
            return $list;
251
        }
252
253
        // Load missing items, save to cache & apply to list if found
254
        $backendLoadedList = $backendLoader($cacheMisses);