Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 6411-6421 (lines=11) @@
6408
        /** @var Content[] $contents */
6409
        $contents = [];
6410
6411
        foreach ($contentNames as $contentName) {
6412
            $contentCreate = $contentService->newContentCreateStruct($contentType, 'eng-US');
6413
            $contentCreate->setField('name', $contentName);
6414
6415
            $content = $contentService->createContent($contentCreate, [$parentLocation]);
6416
            $contents[] = $publishedContent = $contentService->publishVersion($content->versionInfo);
6417
6418
            $parentLocation = $locationService->newLocationCreateStruct(
6419
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
6420
            );
6421
        }
6422
6423
        $contentService->hideContent($contents[0]->contentInfo);
6424
        $contentService->hideContent($contents[2]->contentInfo);
@@ 6473-6483 (lines=11) @@
6470
        /** @var Content[] $contents */
6471
        $contents = [];
6472
6473
        foreach ($contentNames as $contentName) {
6474
            $contentCreate = $contentService->newContentCreateStruct($contentType, 'eng-US');
6475
            $contentCreate->setField('name', $contentName);
6476
6477
            $content = $contentService->createContent($contentCreate, [$parentLocation]);
6478
            $contents[] = $publishedContent = $contentService->publishVersion($content->versionInfo);
6479
6480
            $parentLocation = $locationService->newLocationCreateStruct(
6481
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
6482
            );
6483
        }
6484
6485
        $contentService->hideContent($contents[0]->contentInfo);
6486
        $contentService->hideContent($contents[2]->contentInfo);