Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 185-192 (lines=8) @@
182
        }
183
184
        // Create names
185
        foreach ($content->versionInfo->names as $language => $name) {
186
            $this->contentGateway->setName(
187
                $content->versionInfo->contentInfo->id,
188
                $content->versionInfo->versionNo,
189
                $name,
190
                $language
191
            );
192
        }
193
194
        return $content;
195
    }
@@ 752-759 (lines=8) @@
749
                $this->fieldHandler->createNewFields($versionContent, $contentType);
750
751
                // Create names
752
                foreach ($versionContent->versionInfo->names as $language => $name) {
753
                    $this->contentGateway->setName(
754
                        $content->versionInfo->contentInfo->id,
755
                        $versionInfo->versionNo,
756
                        $name,
757
                        $language
758
                    );
759
                }
760
            }
761
762
            // Batch copy relations for all versions