Code Duplication    Length = 11-11 lines in 2 locations

eZ/Publish/API/Repository/Tests/ContentServiceTest.php 2 locations

@@ 6446-6456 (lines=11) @@
6443
        /** @var Content[] $contents */
6444
        $contents = [];
6445
6446
        foreach ($contentNames as $contentName) {
6447
            $contentCreate = $contentService->newContentCreateStruct($contentType, 'eng-US');
6448
            $contentCreate->setField('name', $contentName);
6449
6450
            $content = $contentService->createContent($contentCreate, [$parentLocation]);
6451
            $contents[] = $publishedContent = $contentService->publishVersion($content->versionInfo);
6452
6453
            $parentLocation = $locationService->newLocationCreateStruct(
6454
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
6455
            );
6456
        }
6457
6458
        $contentService->hideContent($contents[0]->contentInfo);
6459
        $contentService->hideContent($contents[2]->contentInfo);
@@ 6508-6518 (lines=11) @@
6505
        /** @var Content[] $contents */
6506
        $contents = [];
6507
6508
        foreach ($contentNames as $contentName) {
6509
            $contentCreate = $contentService->newContentCreateStruct($contentType, 'eng-US');
6510
            $contentCreate->setField('name', $contentName);
6511
6512
            $content = $contentService->createContent($contentCreate, [$parentLocation]);
6513
            $contents[] = $publishedContent = $contentService->publishVersion($content->versionInfo);
6514
6515
            $parentLocation = $locationService->newLocationCreateStruct(
6516
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
6517
            );
6518
        }
6519
6520
        $contentService->hideContent($contents[0]->contentInfo);
6521
        $contentService->hideContent($contents[2]->contentInfo);