Code Duplication    Length = 12-12 lines in 2 locations

eZ/Publish/Core/Repository/ContentService.php 2 locations

@@ 1882-1893 (lines=12) @@
1879
1880
        /** @var $relations \eZ\Publish\API\Repository\Values\Content\Relation[] */
1881
        $relations = array();
1882
        foreach ($spiRelations as $spiRelation) {
1883
            $destinationContentInfo = $this->internalLoadContentInfo($spiRelation->destinationContentId);
1884
            if (!$this->repository->canUser('content', 'read', $destinationContentInfo)) {
1885
                continue;
1886
            }
1887
1888
            $relations[] = $this->domainMapper->buildRelationDomainObject(
1889
                $spiRelation,
1890
                $contentInfo,
1891
                $destinationContentInfo
1892
            );
1893
        }
1894
1895
        return $relations;
1896
    }
@@ 1920-1931 (lines=12) @@
1917
        );
1918
1919
        $returnArray = array();
1920
        foreach ($spiRelations as $spiRelation) {
1921
            $sourceContentInfo = $this->internalLoadContentInfo($spiRelation->sourceContentId);
1922
            if (!$this->repository->canUser('content', 'read', $sourceContentInfo)) {
1923
                continue;
1924
            }
1925
1926
            $returnArray[] = $this->domainMapper->buildRelationDomainObject(
1927
                $spiRelation,
1928
                $sourceContentInfo,
1929
                $contentInfo
1930
            );
1931
        }
1932
1933
        return $returnArray;
1934
    }