Code Duplication    Length = 7-10 lines in 2 locations

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

@@ 1540-1546 (lines=7) @@
1537
            );
1538
        }
1539
1540
        if (!$this->repository->canUser('content', 'versionremove', $versionInfo)) {
1541
            throw new UnauthorizedException(
1542
                'content',
1543
                'versionremove',
1544
                array('contentId' => $versionInfo->contentInfo->id, 'versionNo' => $versionInfo->versionNo)
1545
            );
1546
        }
1547
1548
        $versionList = $this->persistenceHandler->contentHandler()->listVersions(
1549
            $versionInfo->contentInfo->id,
@@ 1618-1627 (lines=10) @@
1615
     */
1616
    public function copyContent(ContentInfo $contentInfo, LocationCreateStruct $destinationLocationCreateStruct, APIVersionInfo $versionInfo = null)
1617
    {
1618
        if (!$this->repository->canUser('content', 'create', $contentInfo, $destinationLocationCreateStruct)) {
1619
            throw new UnauthorizedException(
1620
                'content',
1621
                'create',
1622
                array(
1623
                    'parentLocationId' => $destinationLocationCreateStruct->parentLocationId,
1624
                    'sectionId' => $contentInfo->sectionId,
1625
                )
1626
            );
1627
        }
1628
1629
        $defaultObjectStates = $this->getDefaultObjectStates();
1630