Code Duplication    Length = 7-10 lines in 2 locations

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

@@ 1560-1566 (lines=7) @@
1557
            );
1558
        }
1559
1560
        if (!$this->repository->canUser('content', 'versionremove', $versionInfo)) {
1561
            throw new UnauthorizedException(
1562
                'content',
1563
                'versionremove',
1564
                array('contentId' => $versionInfo->contentInfo->id, 'versionNo' => $versionInfo->versionNo)
1565
            );
1566
        }
1567
1568
        $versionList = $this->persistenceHandler->contentHandler()->listVersions(
1569
            $versionInfo->contentInfo->id,
@@ 1641-1650 (lines=10) @@
1638
        $destinationLocation = $this->repository->getLocationService()->loadLocation(
1639
            $destinationLocationCreateStruct->parentLocationId
1640
        );
1641
        if (!$this->repository->canUser('content', 'create', $contentInfo, [$destinationLocation])) {
1642
            throw new UnauthorizedException(
1643
                'content',
1644
                'create',
1645
                [
1646
                    'parentLocationId' => $destinationLocationCreateStruct->parentLocationId,
1647
                    'sectionId' => $contentInfo->sectionId,
1648
                ]
1649
            );
1650
        }
1651
1652
        $defaultObjectStates = $this->getDefaultObjectStates();
1653