Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 6364-6374 (lines=11) @@
6361
        /** @var Content[] $contents */
6362
        $contents = [];
6363
6364
        foreach ($contentNames as $contentName) {
6365
            $contentCreate = $contentService->newContentCreateStruct($contentType, 'eng-US');
6366
            $contentCreate->setField('name', $contentName);
6367
6368
            $content = $contentService->createContent($contentCreate, [$parentLocation]);
6369
            $contents[] = $publishedContent = $contentService->publishVersion($content->versionInfo);
6370
6371
            $parentLocation = $locationService->newLocationCreateStruct(
6372
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
6373
            );
6374
        }
6375
6376
        $contentService->hideContent($contents[0]->contentInfo);
6377
        $contentService->hideContent($contents[2]->contentInfo);
@@ 6426-6436 (lines=11) @@
6423
        /** @var Content[] $contents */
6424
        $contents = [];
6425
6426
        foreach ($contentNames as $contentName) {
6427
            $contentCreate = $contentService->newContentCreateStruct($contentType, 'eng-US');
6428
            $contentCreate->setField('name', $contentName);
6429
6430
            $content = $contentService->createContent($contentCreate, [$parentLocation]);
6431
            $contents[] = $publishedContent = $contentService->publishVersion($content->versionInfo);
6432
6433
            $parentLocation = $locationService->newLocationCreateStruct(
6434
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
6435
            );
6436
        }
6437
6438
        $contentService->hideContent($contents[0]->contentInfo);
6439
        $contentService->hideContent($contents[2]->contentInfo);