Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 6452-6462 (lines=11) @@
6449
        /** @var Content[] $contents */
6450
        $contents = [];
6451
6452
        foreach ($contentNames as $contentName) {
6453
            $contentCreate = $contentService->newContentCreateStruct($contentType, 'eng-US');
6454
            $contentCreate->setField('name', $contentName);
6455
6456
            $content = $contentService->createContent($contentCreate, [$parentLocation]);
6457
            $contents[] = $publishedContent = $contentService->publishVersion($content->versionInfo);
6458
6459
            $parentLocation = $locationService->newLocationCreateStruct(
6460
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
6461
            );
6462
        }
6463
6464
        $contentService->hideContent($contents[0]->contentInfo);
6465
        $contentService->hideContent($contents[2]->contentInfo);
@@ 6514-6524 (lines=11) @@
6511
        /** @var Content[] $contents */
6512
        $contents = [];
6513
6514
        foreach ($contentNames as $contentName) {
6515
            $contentCreate = $contentService->newContentCreateStruct($contentType, 'eng-US');
6516
            $contentCreate->setField('name', $contentName);
6517
6518
            $content = $contentService->createContent($contentCreate, [$parentLocation]);
6519
            $contents[] = $publishedContent = $contentService->publishVersion($content->versionInfo);
6520
6521
            $parentLocation = $locationService->newLocationCreateStruct(
6522
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
6523
            );
6524
        }
6525
6526
        $contentService->hideContent($contents[0]->contentInfo);
6527
        $contentService->hideContent($contents[2]->contentInfo);