Code Duplication    Length = 8-8 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Content/Handler.php 2 locations

@@ 622-629 (lines=8) @@
619
                $this->fieldHandler->createNewFields($versionContent, $contentType);
620
621
                // Create names
622
                foreach ($versionContent->versionInfo->names as $language => $name) {
623
                    $this->contentGateway->setName(
624
                        $content->versionInfo->contentInfo->id,
625
                        $versionInfo->versionNo,
626
                        $name,
627
                        $language
628
                    );
629
                }
630
            }
631
632
            // Batch copy relations for all versions
@@ 175-182 (lines=8) @@
172
        }
173
174
        // Create names
175
        foreach ($content->versionInfo->names as $language => $name) {
176
            $this->contentGateway->setName(
177
                $content->versionInfo->contentInfo->id,
178
                $content->versionInfo->versionNo,
179
                $name,
180
                $language
181
            );
182
        }
183
184
        return $content;
185
    }