Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 1716-1727 (lines=12) @@
1713
1714
        /** @var $relations \eZ\Publish\API\Repository\Values\Content\Relation[] */
1715
        $relations = array();
1716
        foreach ($spiRelations as $spiRelation) {
1717
            $destinationContentInfo = $this->internalLoadContentInfo($spiRelation->destinationContentId);
1718
            if (!$this->repository->canUser('content', 'read', $destinationContentInfo)) {
1719
                continue;
1720
            }
1721
1722
            $relations[] = $this->domainMapper->buildRelationDomainObject(
1723
                $spiRelation,
1724
                $contentInfo,
1725
                $destinationContentInfo
1726
            );
1727
        }
1728
1729
        return $relations;
1730
    }
@@ 1754-1765 (lines=12) @@
1751
        );
1752
1753
        $returnArray = array();
1754
        foreach ($spiRelations as $spiRelation) {
1755
            $sourceContentInfo = $this->internalLoadContentInfo($spiRelation->sourceContentId);
1756
            if (!$this->repository->canUser('content', 'read', $sourceContentInfo)) {
1757
                continue;
1758
            }
1759
1760
            $returnArray[] = $this->domainMapper->buildRelationDomainObject(
1761
                $spiRelation,
1762
                $sourceContentInfo,
1763
                $contentInfo
1764
            );
1765
        }
1766
1767
        return $returnArray;
1768
    }