Code Duplication    Length = 7-10 lines in 2 locations

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

@@ 1613-1619 (lines=7) @@
1610
            );
1611
        }
1612
1613
        if (!$this->repository->canUser('content', 'versionremove', $versionInfo)) {
1614
            throw new UnauthorizedException(
1615
                'content',
1616
                'versionremove',
1617
                array('contentId' => $versionInfo->contentInfo->id, 'versionNo' => $versionInfo->versionNo)
1618
            );
1619
        }
1620
1621
        $versionList = $this->persistenceHandler->contentHandler()->listVersions(
1622
            $versionInfo->contentInfo->id,
@@ 1694-1703 (lines=10) @@
1691
        $destinationLocation = $this->repository->getLocationService()->loadLocation(
1692
            $destinationLocationCreateStruct->parentLocationId
1693
        );
1694
        if (!$this->repository->canUser('content', 'create', $contentInfo, [$destinationLocation])) {
1695
            throw new UnauthorizedException(
1696
                'content',
1697
                'create',
1698
                [
1699
                    'parentLocationId' => $destinationLocationCreateStruct->parentLocationId,
1700
                    'sectionId' => $contentInfo->sectionId,
1701
                ]
1702
            );
1703
        }
1704
1705
        $defaultObjectStates = $this->getDefaultObjectStates();
1706