Code Duplication    Length = 7-10 lines in 2 locations

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

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