Code Duplication    Length = 6-6 lines in 2 locations

eZ/Publish/Core/Repository/ContentService.php 1 location

@@ 149-154 (lines=6) @@
146
    {
147
        $contentInfoList = [];
148
        $spiInfoList = $this->persistenceHandler->contentHandler()->loadContentInfoList($contentIds);
149
        foreach ($spiInfoList as $id => $spiInfo) {
150
            $contentInfo = $this->domainMapper->buildContentInfoDomainObject($spiInfo);
151
            if ($this->repository->canUser('content', 'read', $contentInfo)) {
152
                $contentInfoList[$id] = $contentInfo;
153
            }
154
        }
155
156
        return $contentInfoList;
157
    }

eZ/Publish/Core/Repository/LocationService.php 1 location

@@ 297-302 (lines=6) @@
294
        $locations = [];
295
        $spiInfo = $this->persistenceHandler->contentHandler()->loadContentInfo($contentInfo->id);
296
        $content = $this->domainMapper->buildContentProxy($spiInfo, $prioritizedLanguages ?: []);
297
        foreach ($spiLocations as $spiLocation) {
298
            $location = $this->domainMapper->buildLocationWithContent($spiLocation, $content, $spiInfo);
299
            if ($this->repository->canUser('content', 'read', $location->getContentInfo(), $location)) {
300
                $locations[] = $location;
301
            }
302
        }
303
304
        return $locations;
305
    }