Code Duplication    Length = 7-10 lines in 2 locations

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

@@ 1514-1520 (lines=7) @@
1511
            );
1512
        }
1513
1514
        if (!$this->repository->canUser('content', 'versionremove', $versionInfo)) {
1515
            throw new UnauthorizedException(
1516
                'content',
1517
                'versionremove',
1518
                array('contentId' => $versionInfo->contentInfo->id, 'versionNo' => $versionInfo->versionNo)
1519
            );
1520
        }
1521
1522
        $versionList = $this->persistenceHandler->contentHandler()->listVersions(
1523
            $versionInfo->contentInfo->id
@@ 1590-1599 (lines=10) @@
1587
     */
1588
    public function copyContent(ContentInfo $contentInfo, LocationCreateStruct $destinationLocationCreateStruct, APIVersionInfo $versionInfo = null)
1589
    {
1590
        if (!$this->repository->canUser('content', 'create', $contentInfo, $destinationLocationCreateStruct)) {
1591
            throw new UnauthorizedException(
1592
                'content',
1593
                'create',
1594
                array(
1595
                    'parentLocationId' => $destinationLocationCreateStruct->parentLocationId,
1596
                    'sectionId' => $contentInfo->sectionId,
1597
                )
1598
            );
1599
        }
1600
1601
        $defaultObjectStates = $this->getDefaultObjectStates();
1602