Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 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
    }
@@ 672-679 (lines=8) @@
669
                $this->fieldHandler->createNewFields($versionContent, $contentType);
670
671
                // Create names
672
                foreach ($versionContent->versionInfo->names as $language => $name) {
673
                    $this->contentGateway->setName(
674
                        $content->versionInfo->contentInfo->id,
675
                        $versionInfo->versionNo,
676
                        $name,
677
                        $language
678
                    );
679
                }
680
            }
681
682
            // Batch copy relations for all versions