Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 6404-6414 (lines=11) @@
6401
        /** @var Content[] $contents */
6402
        $contents = [];
6403
6404
        foreach ($contentNames as $contentName) {
6405
            $contentCreate = $contentService->newContentCreateStruct($contentType, 'eng-US');
6406
            $contentCreate->setField('name', $contentName);
6407
6408
            $content = $contentService->createContent($contentCreate, [$parentLocation]);
6409
            $contents[] = $publishedContent = $contentService->publishVersion($content->versionInfo);
6410
6411
            $parentLocation = $locationService->newLocationCreateStruct(
6412
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
6413
            );
6414
        }
6415
6416
        $contentService->hideContent($contents[0]->contentInfo);
6417
        $contentService->hideContent($contents[2]->contentInfo);
@@ 6466-6476 (lines=11) @@
6463
        /** @var Content[] $contents */
6464
        $contents = [];
6465
6466
        foreach ($contentNames as $contentName) {
6467
            $contentCreate = $contentService->newContentCreateStruct($contentType, 'eng-US');
6468
            $contentCreate->setField('name', $contentName);
6469
6470
            $content = $contentService->createContent($contentCreate, [$parentLocation]);
6471
            $contents[] = $publishedContent = $contentService->publishVersion($content->versionInfo);
6472
6473
            $parentLocation = $locationService->newLocationCreateStruct(
6474
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
6475
            );
6476
        }
6477
6478
        $contentService->hideContent($contents[0]->contentInfo);
6479
        $contentService->hideContent($contents[2]->contentInfo);