Code Duplication    Length = 7-10 lines in 2 locations

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

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