Code Duplication    Length = 7-10 lines in 2 locations

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

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