Code Duplication    Length = 7-10 lines in 2 locations

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

@@ 1622-1628 (lines=7) @@
1619
            );
1620
        }
1621
1622
        if (!$this->repository->canUser('content', 'versionremove', $versionInfo)) {
1623
            throw new UnauthorizedException(
1624
                'content',
1625
                'versionremove',
1626
                array('contentId' => $versionInfo->contentInfo->id, 'versionNo' => $versionInfo->versionNo)
1627
            );
1628
        }
1629
1630
        $versionList = $this->persistenceHandler->contentHandler()->listVersions(
1631
            $versionInfo->contentInfo->id,
@@ 1703-1712 (lines=10) @@
1700
        $destinationLocation = $this->repository->getLocationService()->loadLocation(
1701
            $destinationLocationCreateStruct->parentLocationId
1702
        );
1703
        if (!$this->repository->canUser('content', 'create', $contentInfo, [$destinationLocation])) {
1704
            throw new UnauthorizedException(
1705
                'content',
1706
                'create',
1707
                [
1708
                    'parentLocationId' => $destinationLocationCreateStruct->parentLocationId,
1709
                    'sectionId' => $contentInfo->sectionId,
1710
                ]
1711
            );
1712
        }
1713
1714
        $defaultObjectStates = $this->getDefaultObjectStates();
1715