Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 1646-1657 (lines=12) @@
1643
1644
        /** @var $relations \eZ\Publish\API\Repository\Values\Content\Relation[] */
1645
        $relations = array();
1646
        foreach ($spiRelations as $spiRelation) {
1647
            $destinationContentInfo = $this->internalLoadContentInfo($spiRelation->destinationContentId);
1648
            if (!$this->repository->canUser('content', 'read', $destinationContentInfo)) {
1649
                continue;
1650
            }
1651
1652
            $relations[] = $this->domainMapper->buildRelationDomainObject(
1653
                $spiRelation,
1654
                $contentInfo,
1655
                $destinationContentInfo
1656
            );
1657
        }
1658
1659
        return $relations;
1660
    }
@@ 1684-1695 (lines=12) @@
1681
        );
1682
1683
        $returnArray = array();
1684
        foreach ($spiRelations as $spiRelation) {
1685
            $sourceContentInfo = $this->internalLoadContentInfo($spiRelation->sourceContentId);
1686
            if (!$this->repository->canUser('content', 'read', $sourceContentInfo)) {
1687
                continue;
1688
            }
1689
1690
            $returnArray[] = $this->domainMapper->buildRelationDomainObject(
1691
                $spiRelation,
1692
                $sourceContentInfo,
1693
                $contentInfo
1694
            );
1695
        }
1696
1697
        return $returnArray;
1698
    }