Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 5929-5939 (lines=11) @@
5926
        /** @var Content[] $contents */
5927
        $contents = [];
5928
5929
        foreach ($contentNames as $contentName) {
5930
            $contentCreate = $this->contentService->newContentCreateStruct($contentType, 'eng-US');
5931
            $contentCreate->setField('name', $contentName);
5932
5933
            $content = $this->contentService->createContent($contentCreate, [$parentLocation]);
5934
            $contents[] = $publishedContent = $this->contentService->publishVersion($content->versionInfo);
5935
5936
            $parentLocation = $this->locationService->newLocationCreateStruct(
5937
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
5938
            );
5939
        }
5940
5941
        $this->contentService->hideContent($contents[0]->contentInfo);
5942
        $this->contentService->hideContent($contents[2]->contentInfo);
@@ 5987-5997 (lines=11) @@
5984
        /** @var Content[] $contents */
5985
        $contents = [];
5986
5987
        foreach ($contentNames as $contentName) {
5988
            $contentCreate = $this->contentService->newContentCreateStruct($contentType, 'eng-US');
5989
            $contentCreate->setField('name', $contentName);
5990
5991
            $content = $this->contentService->createContent($contentCreate, [$parentLocation]);
5992
            $contents[] = $publishedContent = $this->contentService->publishVersion($content->versionInfo);
5993
5994
            $parentLocation = $this->locationService->newLocationCreateStruct(
5995
                $this->generateId('location', $publishedContent->contentInfo->mainLocationId)
5996
            );
5997
        }
5998
5999
        $this->contentService->hideContent($contents[0]->contentInfo);
6000
        $this->contentService->hideContent($contents[2]->contentInfo);