Code Duplication    Length = 7-10 lines in 2 locations

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

@@ 1496-1502 (lines=7) @@
1493
            );
1494
        }
1495
1496
        if (!$this->repository->canUser('content', 'versionremove', $versionInfo)) {
1497
            throw new UnauthorizedException(
1498
                'content',
1499
                'versionremove',
1500
                array('contentId' => $versionInfo->contentInfo->id, 'versionNo' => $versionInfo->versionNo)
1501
            );
1502
        }
1503
1504
        $versionList = $this->persistenceHandler->contentHandler()->listVersions(
1505
            $versionInfo->contentInfo->id
@@ 1583-1592 (lines=10) @@
1580
     */
1581
    public function copyContent(ContentInfo $contentInfo, LocationCreateStruct $destinationLocationCreateStruct, APIVersionInfo $versionInfo = null)
1582
    {
1583
        if (!$this->repository->canUser('content', 'create', $contentInfo, $destinationLocationCreateStruct)) {
1584
            throw new UnauthorizedException(
1585
                'content',
1586
                'create',
1587
                array(
1588
                    'parentLocationId' => $destinationLocationCreateStruct->parentLocationId,
1589
                    'sectionId' => $contentInfo->sectionId,
1590
                )
1591
            );
1592
        }
1593
1594
        $defaultObjectStates = $this->getDefaultObjectStates();
1595