Code Duplication    Length = 8-9 lines in 2 locations

eZ/Publish/Core/Persistence/Cache/UrlAliasHandler.php 1 location

@@ 380-387 (lines=8) @@
377
    {
378
        $tags[] = 'urlAlias-' . $urlAlias->id;
379
380
        if ($urlAlias->type === UrlAlias::LOCATION) {
381
            $cacheTags[] = 'urlAlias-location-' . $urlAlias->destination;
382
            $location = $this->persistenceHandler->locationHandler()->load($urlAlias->destination);
383
            foreach (explode('/', trim($location->pathString, '/')) as $pathId) {
384
                $tags[] = 'urlAlias-location-path-' . $pathId;
385
            }
386
        }
387
388
        return array_unique($tags);
389
    }
390
}

eZ/Publish/Core/Persistence/Cache/ContentHandler.php 1 location

@@ 425-433 (lines=9) @@
422
            $tags[] = 'content-fields-type-' . $contentInfo->contentTypeId;
423
        }
424
425
        if ($contentInfo->mainLocationId) {
426
            $locations = $this->persistenceHandler->locationHandler()->loadLocationsByContent($contentInfo->id);
427
            foreach ($locations as $location) {
428
                $tags[] = 'location-' . $location->id;
429
                foreach (explode('/', trim($location->pathString, '/')) as $pathId) {
430
                    $tags[] = 'location-path-' . $pathId;
431
                }
432
            }
433
        }
434
435
        return array_unique($tags);
436
    }