Code Duplication    Length = 7-10 lines in 2 locations

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

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