Code Duplication    Length = 11-11 lines in 2 locations

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

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