Code Duplication    Length = 7-10 lines in 2 locations

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

@@ 1593-1599 (lines=7) @@
1590
            );
1591
        }
1592
1593
        if (!$this->repository->canUser('content', 'versionremove', $versionInfo)) {
1594
            throw new UnauthorizedException(
1595
                'content',
1596
                'versionremove',
1597
                array('contentId' => $versionInfo->contentInfo->id, 'versionNo' => $versionInfo->versionNo)
1598
            );
1599
        }
1600
1601
        $versionList = $this->persistenceHandler->contentHandler()->listVersions(
1602
            $versionInfo->contentInfo->id,
@@ 1674-1683 (lines=10) @@
1671
        $destinationLocation = $this->repository->getLocationService()->loadLocation(
1672
            $destinationLocationCreateStruct->parentLocationId
1673
        );
1674
        if (!$this->repository->canUser('content', 'create', $contentInfo, [$destinationLocation])) {
1675
            throw new UnauthorizedException(
1676
                'content',
1677
                'create',
1678
                [
1679
                    'parentLocationId' => $destinationLocationCreateStruct->parentLocationId,
1680
                    'sectionId' => $contentInfo->sectionId,
1681
                ]
1682
            );
1683
        }
1684
1685
        $defaultObjectStates = $this->getDefaultObjectStates();
1686