Code Duplication    Length = 6-6 lines in 2 locations

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
    }

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

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